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

Minor bug fixes

parent 56e8aca4
......@@ -252,11 +252,7 @@ public class SqlExecutor extends Executor {
separator = ",";
}
} else {
interpolated.append("(");
index = this.appendPlaceholder(interpolated, positionalParameters, index);
interpolated.append(",");
index = this.appendPlaceholder(interpolated, positionalParameters, index);
interpolated.append(")");
interpolated.append("()");
}
} else {
index = this.appendPlaceholder(interpolated, positionalParameters, index);
......
......@@ -16,6 +16,7 @@ package lu.list.itis.dkd.tui.cps.variable;
import lu.list.itis.dkd.tui.cps.utility.EquationSystemBundle;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
......@@ -206,6 +207,17 @@ public class MapVariable<K, V> extends Variable<Map<K, V>> implements Map<K, V>
/** {@inheritDoc} */
// ---------------------------------------------------------------------------
@Override
public Map<K, V> getValue() {
Map<K, V> clone = new HashMap<K, V>();
clone.putAll(this.value);
return clone;
}
// ---------------------------------------------------------------------------
/** {@inheritDoc} */
// ---------------------------------------------------------------------------
@Override
public Map<K, V> valueFromString(String stringValue) {
// TODO Auto-generated method stub
......
......@@ -73,7 +73,9 @@ public class VectorVariable<B> extends Variable<List<B>> implements List<B> {
/** {@inheritDoc} */
@Override
public List<B> getValue() {
return value;
List<B> clone = new ArrayList<B>();
clone.addAll(this.value);
return clone;
}
/** {@inheritDoc} */
......
......@@ -42,6 +42,7 @@ public class ArcGraph extends ValueCorona {
private int arcSpan;
private boolean relative;
private boolean cappedDisplay;
private boolean blinkOnOutOfRange;
private double reference;
private ColorPair fillColour;
......@@ -89,6 +90,7 @@ public class ArcGraph extends ValueCorona {
this.arcSpan = builder.arcSpan;
this.relative = builder.relative;
this.cappedDisplay = builder.cappedDisplay;
this.blinkOnOutOfRange = builder.blinkOnOutOfRange;
this.reference = builder.reference;
this.innerRadius = builder.innerRadius;
......@@ -123,6 +125,7 @@ public class ArcGraph extends ValueCorona {
this.arcSpan = original.arcSpan;
this.relative = original.relative;
this.cappedDisplay = original.cappedDisplay;
this.blinkOnOutOfRange = original.blinkOnOutOfRange;
this.reference = original.reference;
this.innerRadius = original.innerRadius;
......@@ -268,12 +271,14 @@ public class ArcGraph extends ValueCorona {
extend = arcSpan * normalizedValue;
}
double epsilon = this.variable.getEpsilon();
if (NumericalVariable.isEqual(normalizedValue, 1d, epsilon)
|| (relative && NumericalVariable.isEqual(normalizedValue, 0d, epsilon)))
this.startBlinking();
else
this.stopBlinking();
if (blinkOnOutOfRange) {
double epsilon = this.variable.getEpsilon();
if (NumericalVariable.isEqual(normalizedValue, 1d, epsilon)
|| (relative && NumericalVariable.isEqual(normalizedValue, 0d, epsilon)))
this.startBlinking();
else
this.stopBlinking();
}
double diameter = 2 * outerRadius;
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