Commit b8827db6 authored by Nico Mack's avatar Nico Mack

Bug Fixes in Coronas.

Added support for MapVariables to SQLExecutor.
Added new Declaration class to allow access to fields of maps and
indices of vectors in variable declarations in equation system
Added invoking flag allowing to disable equation trigger by individual
parameters.
parent 05a76f9a
......@@ -2,6 +2,7 @@ ABOVE_ELEMENT=above
BELOW_ELEMENT=below
BLINK_ON_OUT_OF_RANGE_NODE=blinkOnOutOfRange
CAPPED_DISPLAY_NODE=cappedDisplay
FACE_IS_TOUCHABLE_NODE=faceIsTouchable
ITEMS_VARIABLE_NODE=itemsVariable
HTML_TEMPLATE_NODE=htmlTemplate
LABEL_NODE=label
......
......@@ -18,6 +18,7 @@ INDEX_ATTRIBUTE=index
FORMAT_ATTRIBUTE=format
FIELD_ATTRIBUTE=field
INVOKE_ELEMENT=invoke
INVOKING_ATTRIBUTE=invoking
EPSILON_ATTRIBUTE=epsilon
EXECUTOR_ATTRIBUTE=executor
NAME_ATTRIBUTE=name
......
......@@ -37,6 +37,7 @@ public class Declaration implements Cloneable {
protected String format;
protected int index;
protected Variable<?> variable;
protected boolean invoking;
// ---------------------------------------------------------------------------
// ***************************************************************************
......@@ -47,6 +48,7 @@ public class Declaration implements Cloneable {
public Declaration(Variable<?> variable) {
this.variable = variable;
this.index = -1;
this.invoking = true;
}
// ---------------------------------------------------------------------------
......@@ -56,6 +58,8 @@ public class Declaration implements Cloneable {
this.variable = variable;
this.field = field;
this.index = -1;
this.invoking = true;
}
// ---------------------------------------------------------------------------
......@@ -64,6 +68,8 @@ public class Declaration implements Cloneable {
Preconditions.checkArgument((variable instanceof VectorVariable), StringUtils.build("Variable {} is not a VectorVariable!", variable.getName())); //$NON-NLS-1$
this.variable = variable;
this.index = index;
this.invoking = true;
}
// ---------------------------------------------------------------------------
......@@ -74,6 +80,7 @@ public class Declaration implements Cloneable {
this.equate = other.equate;
this.index = other.index;
this.format = other.format;
this.invoking = other.invoking;
}
// ---------------------------------------------------------------------------
......@@ -106,6 +113,18 @@ public class Declaration implements Cloneable {
// ---------------------------------------------------------------------------
public void setInvoking(boolean invoking) {
this.invoking = invoking;
}
// ---------------------------------------------------------------------------
public boolean isInvoking() {
return this.invoking;
}
// ---------------------------------------------------------------------------
public void setFormat(String format) {
this.format = format;
}
......
......@@ -34,6 +34,7 @@ import org.slf4j.LoggerFactory;
import java.util.HashMap;
import java.util.LinkedHashSet;
import java.util.Map.Entry;
import javax.script.ScriptEngine;
......@@ -142,9 +143,8 @@ public class Equation {
}
if (!isolated && consolidated && consolidatedListeners != null) {
for (InputChangeListener listener : consolidatedListeners.keySet()) {
Variable<?> variable = consolidatedListeners.get(listener);
listener.inputChanged(new InputEvent(variable));
for (Entry<InputChangeListener, Variable<?>> entry : consolidatedListeners.entrySet()) {
entry.getKey().inputChanged(new InputEvent(entry.getValue()));
}
}
......
......@@ -21,6 +21,8 @@
package lu.list.itis.dkd.tui.cps.system;
import lu.list.itis.dkd.dbc.annotation.NonNullByDefault;
import lu.list.itis.dkd.tui.cps.InputChangeListener;
import lu.list.itis.dkd.tui.cps.InputEvent;
import lu.list.itis.dkd.tui.cps.Phenomenon;
import lu.list.itis.dkd.tui.cps.system.executor.Executor;
import lu.list.itis.dkd.tui.cps.utility.EquationSystemBundle;
......@@ -30,6 +32,7 @@ import lu.list.itis.dkd.tui.utility.Point;
import lu.list.itis.dkd.tui.utility.StringUtils;
import com.google.common.base.Strings;
import com.jgoodies.common.base.Preconditions;
import org.jdom2.Document;
import org.jdom2.Element;
......@@ -287,6 +290,9 @@ public class EquationSystemBuilder {
attribute = this.getAttribute(element, EquationSystemBundle.FIELD_ATTRIBUTE);
attributes.put(EquationSystemBundle.FIELD_ATTRIBUTE, attribute);
attribute = this.getAttribute(element, EquationSystemBundle.INVOKING_ATTRIBUTE);
attributes.put(EquationSystemBundle.INVOKING_ATTRIBUTE, attribute);
attribute = this.getAttribute(element, EquationSystemBundle.DECIMALS_ATTRIBUTE);
attributes.put(EquationSystemBundle.DECIMALS_ATTRIBUTE, attribute);
......@@ -531,9 +537,17 @@ public class EquationSystemBuilder {
for (Element parameter : parameters) {
parameterAttributes = this.extractAttributesForVariables(parameter);
String identifier = parameterAttributes.get(EquationSystemBundle.NAME_ATTRIBUTE);
String invoking = parameterAttributes.get(EquationSystemBundle.INVOKING_ATTRIBUTE);
Variable<?> variable = this.getIndependentVariable(parameterAttributes);
if (variable != null) {
Declaration declaration = this.buildDeclaration(variable, parameterAttributes);
if (!Strings.isNullOrEmpty(invoking)) {
Matcher regex = booleanPattern.matcher(invoking);
declaration.setInvoking(regex.matches());
}
declarations.add(declaration);
} else {
String message = StringUtils.build("Undefined parameter {} encountered! Check equation file!", identifier); //$NON-NLS-1$
......@@ -679,7 +693,6 @@ public class EquationSystemBuilder {
} else {
executor = DEFAULT_EXECUTOR;
}
}
Mapping variableMapping = new Mapping(equationInputs, equationOutputs);
......@@ -693,7 +706,11 @@ public class EquationSystemBuilder {
if (!periodic) {
for (Declaration declaration : equationInputs) {
Variable<?> parameter = declaration.getVariable();
parameter.addListener(equationSystem);
if (declaration.isInvoking()) {
parameter.addListener(equationSystem);
} else {
LOGGER.info("Parameter {} is non invoking and won't invoke equation {}!", declaration.getIdentifier(), equationName); //$NON-NLS-1$
}
}
equations.put(equationName, equationSystem);
} else {
......@@ -753,6 +770,31 @@ public class EquationSystemBuilder {
}
}
// ---------------------------------------------------------------------------
// ***************************************************************************
// * Class Body *
// ***************************************************************************
// ---------------------------------------------------------------------------
public void atomicUpdate(List<Variable<?>> variables, List<Object> values) {
Preconditions.checkArgument(!variables.isEmpty(), "No variables to update!");
Preconditions.checkArgument(variables.size() == values.size(), "Sizes of variables and values lists must match!");
HashMap<InputChangeListener, Variable<?>> consolidated = new HashMap<>();
for (int i = 0; i < variables.size(); i++) {
Variable<?> variable = variables.get(i);
variable.suspendListenerNotification(true);
variable.setValueFromObject(values.get(i));
variable.suspendListenerNotification(false);
consolidated = variable.consolidateListeners(consolidated);
}
for (Entry<InputChangeListener, Variable<?>> entry : consolidated.entrySet()) {
entry.getKey().inputChanged(new InputEvent(entry.getValue()));
}
}
// ---------------------------------------------------------------------------
/**
* Method used to parse the file containing the XML representation of the equation system.
......
......@@ -145,7 +145,7 @@ public class Mapping {
public boolean catersTo(Variable<?> variable) {
for (Declaration declaration : independentVariables) {
if (variable.equals(declaration.getVariable())) {
return true;
return declaration.isInvoking();
}
}
return false;
......
......@@ -305,10 +305,14 @@ public class PythonExecutor extends Executor {
PyObject item = array.__getitem__(index);
vector.set(index, (B) item.__tojava__(clazz));
} else {
if (vector.isEmpty()) {
clazz = null;
}
vector.suspendListenerNotification(true);
vector.clear();
for (PyObject item : array.asIterable()) {
clazz = (clazz != null) ? clazz : TYPE_MAPPING.get(item.getType());
vector.add(item.__tojava__(clazz));
}
......
......@@ -14,6 +14,7 @@
package lu.list.itis.dkd.tui.cps.system.executor;
import lu.list.itis.dkd.tui.cps.system.Declaration;
import lu.list.itis.dkd.tui.cps.variable.MapVariable;
import lu.list.itis.dkd.tui.cps.variable.Variable;
import lu.list.itis.dkd.tui.cps.variable.VectorVariable;
......@@ -36,6 +37,7 @@ import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Properties;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
......@@ -53,6 +55,7 @@ public class SqlExecutor extends Executor {
private String driverClass;
private String userName;
private String password;
private boolean autoCommit;
private List<Object[]> columnValues = null;
private List<Integer> columnTypes = null;
......@@ -62,8 +65,9 @@ public class SqlExecutor extends Executor {
private static final String SQL_DRIVER_CLASS = "sql.driver.class"; //$NON-NLS-1$
private static final String SQL_USER_NAME = "sql.user.name"; //$NON-NLS-1$
private static final String SQL_USER_PASSWORD = "sql.user.password"; //$NON-NLS-1$
private static final String SQL_AUTO_COMMIT = "sql.autoCommit"; //$NON-NLS-1$
private static final Pattern SQL_VAR_PATTERN = Pattern.compile("([\\$@])\\{([a-z0-9\\-_]+)\\}", Pattern.CASE_INSENSITIVE); //$NON-NLS-1$
private static final Pattern SQL_VAR_PATTERN = Pattern.compile("([\\$@%])\\{([a-z0-9\\-_]+)\\}", Pattern.CASE_INSENSITIVE); //$NON-NLS-1$
private static final String SQL_PLACEHOLDER = "?"; //$NON-NLS-1$
private static final Logger LOGGER = LoggerFactory.getLogger(SqlExecutor.class.getSimpleName());
......@@ -81,6 +85,7 @@ public class SqlExecutor extends Executor {
private static final String SCALAR = "$"; //$NON-NLS-1$
private static final String VECTOR = "@"; //$NON-NLS-1$
private static final String MAP = "%"; //$NON-NLS-1$
// ***************************************************************************
// * Constructor(s) *
......@@ -95,6 +100,7 @@ public class SqlExecutor extends Executor {
driverClass = properties.getProperty(SQL_DRIVER_CLASS);
userName = properties.getProperty(SQL_USER_NAME);
password = properties.getProperty(SQL_USER_PASSWORD);
autoCommit = Boolean.parseBoolean(properties.getProperty(SQL_AUTO_COMMIT, "false"));
connectionPool = this.setupConnectionPool();
}
......@@ -138,7 +144,7 @@ public class SqlExecutor extends Executor {
do {
try {
connection = connectionPool.getConnection();
connection.setAutoCommit(false);
connection.setAutoCommit(autoCommit);
numberOfConnections = connectionPool.getNumConnections();
} catch (SQLException p_Exception) {
LOGGER.warn("Failed to acquire connection from Connection Pool for Datasource {}! Reconnection pool...", connectionUrl); //$NON-NLS-1$
......@@ -158,6 +164,15 @@ public class SqlExecutor extends Executor {
return connection;
}
// ---------------------------------------------------------------------------
private int appendPlaceholder(StringBuffer buffer, boolean positionalParameters, int positionalIndex) {
buffer.append(SQL_PLACEHOLDER);
if (positionalParameters)
buffer.append(positionalIndex++);
return positionalIndex;
}
// ---------------------------------------------------------------------------
/**
* replaces every occurrence of the previously specified interpolation pattern with the previously
......@@ -200,9 +215,7 @@ public class SqlExecutor extends Executor {
placeholders.add(variable);
if (SCALAR.equals(type)) {
interpolated.append(SQL_PLACEHOLDER);
if (positionalParameters)
interpolated.append(index++);
index = this.appendPlaceholder(interpolated, positionalParameters, index);
}
if (VECTOR.equals(type)) {
Object value = parameters.get(variable);
......@@ -212,23 +225,45 @@ public class SqlExecutor extends Executor {
if (!collection.isEmpty()) {
for (int count = 0; count < collection.size(); count++) {
interpolated.append(separator);
interpolated.append(SQL_PLACEHOLDER);
if (positionalParameters)
interpolated.append(index++);
index = this.appendPlaceholder(interpolated, positionalParameters, index);
separator = ",";
}
} else {
interpolated.append(SQL_PLACEHOLDER);
if (positionalParameters)
interpolated.append(index++);
index = this.appendPlaceholder(interpolated, positionalParameters, index);
}
} else {
interpolated.append(SQL_PLACEHOLDER);
if (positionalParameters)
interpolated.append(index++);
index = this.appendPlaceholder(interpolated, positionalParameters, index);
}
}
if (MAP.equals(type)) {
Object value = parameters.get(variable);
if (value instanceof Map) {
Map<?, ?> map = (Map<?, ?>) value;
String separator = "";
if (!map.isEmpty()) {
for (int count = 0; count < map.size(); count++) {
interpolated.append(separator);
interpolated.append("(");
index = this.appendPlaceholder(interpolated, positionalParameters, index);
interpolated.append(",");
index = this.appendPlaceholder(interpolated, positionalParameters, index);
interpolated.append(")");
separator = ",";
}
} else {
interpolated.append("(");
index = this.appendPlaceholder(interpolated, positionalParameters, index);
interpolated.append(",");
index = this.appendPlaceholder(interpolated, positionalParameters, index);
interpolated.append(")");
}
} else {
index = this.appendPlaceholder(interpolated, positionalParameters, index);
}
}
} else {
interpolated.append(interpolated.substring(interpolator.start(), interpolator.end()));
}
......@@ -248,13 +283,23 @@ public class SqlExecutor extends Executor {
Object value = context.get(placeholder);
if (value instanceof Collection) {
Collection<?> collection = (Collection<?>) value;
if (collection.size() > 0) {
if (!collection.isEmpty()) {
for (Object item : collection) {
statement.setObject(index++, item);
}
} else {
statement.setObject(index++, null);
}
} else if (value instanceof Map) {
Map<?, ?> map = (Map<?, ?>) value;
if (!map.isEmpty()) {
for (Entry<?, ?> entry : map.entrySet()) {
statement.setObject(index++, entry.getKey());
statement.setObject(index++, entry.getValue());
}
} else {
statement.setObject(index++, null);
}
} else {
statement.setObject(index++, value);
}
......@@ -349,10 +394,25 @@ public class SqlExecutor extends Executor {
public void set(Declaration declaration) {
Variable<?> variable = declaration.getVariable();
String identifier = (Strings.isNullOrEmpty(declaration.getEquate())) ? variable.getName() : declaration.getEquate();
String field = declaration.getField();
int index = declaration.getIndex();
Object value;
if (!Strings.isNullOrEmpty(field) && (variable instanceof MapVariable<?, ?>)) {
MapVariable<?, ?> map = (MapVariable<?, ?>) declaration.getVariable();
value = map.get(field);
parameters.put(identifier, value);
} else if ((index >= 0) && (variable instanceof VectorVariable<?>)) {
VectorVariable<?> vector = (VectorVariable<?>) declaration.getVariable();
value = vector.get(index);
parameters.put(identifier, value);
} else {
value = variable.getValue();
parameters.put(identifier, value);
}
parameters.put(identifier, variable.getValue());
if (LOGGER.isInfoEnabled()) {
LOGGER.info("Parameter -> {} = {}", variable.getName(), variable.getValue()); //$NON-NLS-1$
LOGGER.info("Parameter -> {} = {}", identifier, value); //$NON-NLS-1$
}
}
......@@ -471,7 +531,9 @@ public class SqlExecutor extends Executor {
/** {@inheritDoc} */
@Override
public void resetContext() {
// TODO Auto-generated method stub
columnNames.clear();
columnTypes.clear();
columnValues.clear();
}
}
......@@ -48,6 +48,7 @@ public class EquationSystemBundle extends NLS {
public static String INDEX_ATTRIBUTE;
public static String FORMAT_ATTRIBUTE;
public static String FIELD_ATTRIBUTE;
public static String INVOKING_ATTRIBUTE;
public static String INVOKE_ELEMENT;
public static String EXECUTOR_ATTRIBUTE;
public static String NAME_ATTRIBUTE;
......
......@@ -168,8 +168,7 @@ public class MapVariable<K, V> extends Variable<Map<K, V>> implements Map<K, V>
@Override
public void setValueFromObject(Object object) {
// TODO Auto-generated method stub
this.value = this.valueFromObject(object);
}
// ---------------------------------------------------------------------------
......@@ -197,9 +196,12 @@ public class MapVariable<K, V> extends Variable<Map<K, V>> implements Map<K, V>
/** {@inheritDoc} */
// ---------------------------------------------------------------------------
@SuppressWarnings("unchecked")
@Override
public Map<K, V> valueFromObject(Object objectValue) {
// TODO Auto-generated method stub
if (objectValue instanceof Map) {
return (Map<K, V>) objectValue;
}
return null;
}
......
......@@ -147,7 +147,7 @@ public class NumericalVariable extends Variable<Double> {
}
if (this.valueRange != 0) {
double val = newValue + 0.0;
double val = this.roundToPrecision(newValue);
if (val < this.minValue)
val = this.minValue;
......@@ -392,7 +392,8 @@ public class NumericalVariable extends Variable<Double> {
// ---------------------------------------------------------------------------
public double getConstrainedValue() {
return this.normalizedValue * this.valueRange;
this.normalizedValue = this.normalizeValue(this.value);
return this.minValue + (this.normalizedValue * this.valueRange);
}
// ---------------------------------------------------------------------------
......
......@@ -235,14 +235,14 @@ public class VectorVariable<B> extends Variable<List<B>> implements List<B> {
/** {@inheritDoc} */
@Override
public void clear() {
value.clear();
if (value != null)
value.clear();
}
/** {@inheritDoc} */
@Override
public void setValueFromObject(Object object) {
// TODO Auto-generated method stub
this.value = this.valueFromObject(object);
}
/** {@inheritDoc} */
......@@ -268,10 +268,14 @@ public class VectorVariable<B> extends Variable<List<B>> implements List<B> {
}
/** {@inheritDoc} */
@SuppressWarnings("unchecked")
@Override
public List<B> valueFromObject(Object objectValue) {
// TODO Auto-generated method stub
return null;
if (objectValue instanceof List) {
return (List<B>) objectValue;
}
return new ArrayList<>();
}
......
......@@ -31,6 +31,7 @@ public class CpsNamespace extends NLS {
public static String BLINK_ON_OUT_OF_RANGE_NODE;
public static String CAPPED_DISPLAY_NODE;
public static String FACE_IS_TOUCHABLE_NODE;
public static String HTML_TEMPLATE_NODE;
......
......@@ -75,7 +75,10 @@ public class HtmlTemplate implements VariableBased {
// ---------------------------------------------------------------------------
public String render() {
return Interpolator.render(chunks);
if (dependsOnVariables()) {
return Interpolator.render(chunks);
}
return this.template;
}
// ---------------------------------------------------------------------------
......
......@@ -61,6 +61,7 @@ public class CoxcombSlice extends ValueCorona implements InformationProvider<Obj
protected String label;
protected boolean radialLayout;
protected boolean blinkOnOutOfRange;
protected boolean faceIsTouchable;
protected double innerRadius;
protected double lowerBoundRadius;
......@@ -125,6 +126,8 @@ public class CoxcombSlice extends ValueCorona implements InformationProvider<Obj
this.textFont = builder.textFont;
this.strokeWidth = builder.strokeWidth;
this.faceIsTouchable = builder.faceIsTouchable;
this.buildFromProperties();
touchManager = new TouchManager(isLatching);
......@@ -154,6 +157,8 @@ public class CoxcombSlice extends ValueCorona implements InformationProvider<Obj
this.textFont = original.textFont;
this.strokeWidth = original.strokeWidth;
this.faceIsTouchable = original.faceIsTouchable;
this.buildFromProperties();
touchManager = new TouchManager(isLatching);
......@@ -189,10 +194,16 @@ public class CoxcombSlice extends ValueCorona implements InformationProvider<Obj
outer = new Area(new Ellipse2D.Double(-lowerBoundRadius, -lowerBoundRadius, diameter, diameter));
Shape sector = new Arc2D.Double(-lowerBoundRadius, -lowerBoundRadius, diameter, diameter, angle, -arcSpan, Arc2D.PIE);
Area initial = new Area(sector);
initial.subtract(inner);
outer.subtract(inner);
shape = initial;
diameter = 2 * upperBoundRadius;
sector = new Arc2D.Double(-upperBoundRadius, -upperBoundRadius, diameter, diameter, startAngle, arcSpan, Arc2D.PIE);
face = new Area(sector);
face.subtract(inner);
outer.subtract(inner);
shape = face;
borderStroke = (strokeWidth > 0) ? new BasicStroke(strokeWidth) : null;
Shape labelPath;
......@@ -220,6 +231,7 @@ public class CoxcombSlice extends ValueCorona implements InformationProvider<Obj
TextStroke stroke = new TextStroke(label, textFont, false, true, false);
labelShape = stroke.createStrokedShape(labelPath);
this.setInformation(this.variable.getValue());
this.setSelected(this.isSelected);
}
// ---------------------------------------------------------------------------
......@@ -250,7 +262,8 @@ public class CoxcombSlice extends ValueCorona implements InformationProvider<Obj
Point eventVector = PolarCoordinateHelper.carthesianToPolar(origin, dragged);
double normalized = (eventVector.getX() - lowerBoundRadius) / (upperBoundRadius - lowerBoundRadius);
this.setInformation(normalized * this.variable.getValueRange());
double newValues = this.variable.getNormalizedValueOf(normalized * this.variable.getValueRange()) * this.variable.getValueRange();
this.setInformation(newValues);
}
// ---------------------------------------------------------------------------
......@@ -338,6 +351,8 @@ public class CoxcombSlice extends ValueCorona implements InformationProvider<Obj
localCanvas.fill(labelShape);
}
this.touchManager.paint(canvas);
localCanvas.dispose();
}
......@@ -346,11 +361,21 @@ public class CoxcombSlice extends ValueCorona implements InformationProvider<Obj
@Override
public boolean touched(TouchEvent event) {
boolean touched = false;
boolean eventIsInsideCorona = false;
if (isTouchable() && touchManager.eventInsideCorona(this, event)) {
touched = touchManager.touch(event);
if (touched)
this.setSelected(!this.isSelected);
if (isTouchable()) {
eventIsInsideCorona = touchManager.eventInsideCorona(this, event);
if (!eventIsInsideCorona && faceIsTouchable) {
Point touchPosition = this.getPointRelativeToCentre(event.getPosition());
eventIsInsideCorona = face.contains(touchPosition);
}
if (eventIsInsideCorona) {
touched = touchManager.touch(event);
if (touched)
this.setSelected(!this.isSelected);
}
}
return touched;
}
......@@ -377,10 +402,8 @@ public class CoxcombSlice extends ValueCorona implements InformationProvider<Obj
public boolean released(TouchEvent event) {
boolean released = false;
if (isTouchable()) {// && touchManager.eventInsideCorona(this, event)) {
if (isTouchable()) {
released = touchManager.release(event);
// if (released)
// this.setSelected(false);
}
return released;
}
......
......@@ -50,9 +50,10 @@ public class VariableHtmlBox extends HtmlBox implements VariableBased, InputChan
public VariableHtmlBox(BaseVariableHtmlBoxBuilder<?> builder) {
super(builder);
htmlTemplate = new HtmlTemplate(builder.htmlTemplate);
this.htmlTemplate = new HtmlTemplate(builder.htmlTemplate);
if (!htmlTemplate.dependsOnVariables()) {
this.setInformation(builder.htmlTemplate);
this.htmlContent = this.htmlTemplate.render();
this.setInformation(this.htmlContent);
}
}
......@@ -64,9 +65,10 @@ public class VariableHtmlBox extends HtmlBox implements VariableBased, InputChan
public VariableHtmlBox(VariableHtmlBox original) {
super(original);
htmlTemplate = new HtmlTemplate(original.htmlTemplate.getTemplate());
this.htmlTemplate = new HtmlTemplate(original.htmlTemplate.getTemplate());
if (!htmlTemplate.dependsOnVariables()) {
this.setInformation(original.htmlTemplate.getTemplate());
this.htmlContent = this.htmlTemplate.render();
this.setInformation(this.htmlContent);
}
}
......
......@@ -43,6 +43,7 @@ public abstract class BaseCoxcombSliceBuilder<B extends BaseCoxcombSliceBuilder<
public String label;
public boolean radialLayout;
public boolean blinkOnOutOfRange;
public boolean faceIsTouchable;
public double innerRadius;
public double lowerBoundRadius;
......@@ -127,6 +128,7 @@ public abstract class BaseCoxcombSliceBuilder<B extends BaseCoxcombSliceBuilder<
radialLayout = BootstrappingUtils.getContentAsBoolean(rootElement, CpsNamespace.RADIAL_LAYOUT_NODE, BootstrappingUtils.OPTIONAL, Boolean.FALSE, context);
cappedDisplay = BootstrappingUtils.getContentAsBoolean(rootElement, CpsNamespace.CAPPED_DISPLAY_NODE, BootstrappingUtils.OPTIONAL, Boolean.FALSE, context);
blinkOnOutOfRange = BootstrappingUtils.getContentAsBoolean(rootElement, CpsNamespace.BLINK_ON_OUT_OF_RANGE_NODE, BootstrappingUtils.OPTIONAL, Boolean.FALSE, context);
faceIsTouchable = BootstrappingUtils.getContentAsBoolean(rootElement, CpsNamespace.FACE_IS_TOUCHABLE_NODE, BootstrappingUtils.OPTIONAL, Boolean.FALSE, context);
strokeWidth = BootstrappingUtils.getContentAsInteger(rootElement, Externalization.STROKE_WIDTH_NODE, BootstrappingUtils.OPTIONAL, 1, context);
rampingTime = BootstrappingUtils.getContentAsInteger(rootElement, Externalization.RAMPING_TIME_NODE, BootstrappingUtils.OPTIONAL, 500, context);
......
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