Commit 06fb434f authored by Nico Mack's avatar Nico Mack

Minor bug fixes

parent 56e8aca4
...@@ -252,11 +252,7 @@ public class SqlExecutor extends Executor { ...@@ -252,11 +252,7 @@ public class SqlExecutor extends Executor {
separator = ","; separator = ",";
} }
} else { } else {
interpolated.append("("); interpolated.append("()");
index = this.appendPlaceholder(interpolated, positionalParameters, index);
interpolated.append(",");
index = this.appendPlaceholder(interpolated, positionalParameters, index);
interpolated.append(")");
} }
} else { } else {
index = this.appendPlaceholder(interpolated, positionalParameters, index); index = this.appendPlaceholder(interpolated, positionalParameters, index);
......
...@@ -16,6 +16,7 @@ package lu.list.itis.dkd.tui.cps.variable; ...@@ -16,6 +16,7 @@ package lu.list.itis.dkd.tui.cps.variable;
import lu.list.itis.dkd.tui.cps.utility.EquationSystemBundle; import lu.list.itis.dkd.tui.cps.utility.EquationSystemBundle;
import java.util.Collection; import java.util.Collection;
import java.util.HashMap;
import java.util.Map; import java.util.Map;
import java.util.Set; import java.util.Set;
import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentHashMap;
...@@ -206,6 +207,17 @@ public class MapVariable<K, V> extends Variable<Map<K, V>> implements Map<K, V> ...@@ -206,6 +207,17 @@ public class MapVariable<K, V> extends Variable<Map<K, V>> implements Map<K, V>
/** {@inheritDoc} */ /** {@inheritDoc} */
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
@Override
public Map<K, V> getValue() {
Map<K, V> clone = new HashMap<K, V>();
clone.putAll(this.value);
return clone;
}
// ---------------------------------------------------------------------------
/** {@inheritDoc} */
// ---------------------------------------------------------------------------
@Override @Override
public Map<K, V> valueFromString(String stringValue) { public Map<K, V> valueFromString(String stringValue) {
// TODO Auto-generated method stub // TODO Auto-generated method stub
......
...@@ -73,7 +73,9 @@ public class VectorVariable<B> extends Variable<List<B>> implements List<B> { ...@@ -73,7 +73,9 @@ public class VectorVariable<B> extends Variable<List<B>> implements List<B> {
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override @Override
public List<B> getValue() { public List<B> getValue() {
return value; List<B> clone = new ArrayList<B>();
clone.addAll(this.value);
return clone;
} }
/** {@inheritDoc} */ /** {@inheritDoc} */
......
...@@ -42,6 +42,7 @@ public class ArcGraph extends ValueCorona { ...@@ -42,6 +42,7 @@ public class ArcGraph extends ValueCorona {
private int arcSpan; private int arcSpan;
private boolean relative; private boolean relative;
private boolean cappedDisplay; private boolean cappedDisplay;
private boolean blinkOnOutOfRange;
private double reference; private double reference;
private ColorPair fillColour; private ColorPair fillColour;
...@@ -89,6 +90,7 @@ public class ArcGraph extends ValueCorona { ...@@ -89,6 +90,7 @@ public class ArcGraph extends ValueCorona {
this.arcSpan = builder.arcSpan; this.arcSpan = builder.arcSpan;
this.relative = builder.relative; this.relative = builder.relative;
this.cappedDisplay = builder.cappedDisplay; this.cappedDisplay = builder.cappedDisplay;
this.blinkOnOutOfRange = builder.blinkOnOutOfRange;
this.reference = builder.reference; this.reference = builder.reference;
this.innerRadius = builder.innerRadius; this.innerRadius = builder.innerRadius;
...@@ -123,6 +125,7 @@ public class ArcGraph extends ValueCorona { ...@@ -123,6 +125,7 @@ public class ArcGraph extends ValueCorona {
this.arcSpan = original.arcSpan; this.arcSpan = original.arcSpan;
this.relative = original.relative; this.relative = original.relative;
this.cappedDisplay = original.cappedDisplay; this.cappedDisplay = original.cappedDisplay;
this.blinkOnOutOfRange = original.blinkOnOutOfRange;
this.reference = original.reference; this.reference = original.reference;
this.innerRadius = original.innerRadius; this.innerRadius = original.innerRadius;
...@@ -268,12 +271,14 @@ public class ArcGraph extends ValueCorona { ...@@ -268,12 +271,14 @@ public class ArcGraph extends ValueCorona {
extend = arcSpan * normalizedValue; extend = arcSpan * normalizedValue;
} }
double epsilon = this.variable.getEpsilon(); if (blinkOnOutOfRange) {
if (NumericalVariable.isEqual(normalizedValue, 1d, epsilon) double epsilon = this.variable.getEpsilon();
|| (relative && NumericalVariable.isEqual(normalizedValue, 0d, epsilon))) if (NumericalVariable.isEqual(normalizedValue, 1d, epsilon)
this.startBlinking(); || (relative && NumericalVariable.isEqual(normalizedValue, 0d, epsilon)))
else this.startBlinking();
this.stopBlinking(); else
this.stopBlinking();
}
double diameter = 2 * outerRadius; double diameter = 2 * outerRadius;
Shape sector = new Arc2D.Double(-outerRadius, -outerRadius, diameter, diameter, start, extend, Arc2D.PIE); Shape sector = new Arc2D.Double(-outerRadius, -outerRadius, diameter, diameter, start, extend, Arc2D.PIE);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment