Commit 955abdb6 authored by Nico Mack's avatar Nico Mack

Added Interaction support to SelectorWidget

parent c5fb473a
......@@ -5,6 +5,7 @@ import lu.list.itis.dkd.tui.cps.system.VariableBased;
import lu.list.itis.dkd.tui.cps.variable.Variable;
import lu.list.itis.dkd.tui.event.conditional.Condition;
import lu.list.itis.dkd.tui.event.conditional.Conditional;
import lu.list.itis.dkd.tui.event.interaction.Interaction;
import lu.list.itis.dkd.tui.utility.AngleUtils;
import lu.list.itis.dkd.tui.utility.Point;
import lu.list.itis.dkd.tui.utility.ValueRange;
......@@ -50,6 +51,8 @@ public class SelectorWidget extends ValueWidget {
public static final int NONE = -1;
private static final Interaction ON_POSITION_CHANGE = new Interaction("onPositionChanged");
private static final Logger LOGGER = LoggerFactory.getLogger(SelectorWidget.class.getSimpleName());
// ***************************************************************************
......@@ -272,6 +275,11 @@ public class SelectorWidget extends ValueWidget {
variable.setValue((double) position);
this.updateTethers((double) position);
}
if ((currentPosition != NONE) && (position != NONE)) {
this.respondTo(ON_POSITION_CHANGE);
}
currentPosition = position;
}
}
......
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