Dear users, Please note that, from Monday, August 16, 2019, RSA keys shorter than 2048bit will no longer be accepted for security reasons. Please update your keys as needed before this date. If you need assistance with regard to this process, please contact sia@list.lu

Thank you for your understanding.

Commit 4db94d92 authored by Nico Mack's avatar Nico Mack

Added multiTurn property to ValueWidget

parent cd7fb3bf
......@@ -12,6 +12,7 @@ LOWER_STOP_ANGLE_NODE=lowerStopAngle
MAXIMUM_VALUE_NODE=maximumValue
MINIMUM_VALUE_NODE=minimumValue
MODIFY_VALUE_ON_ROTATION_NODE=modifyValueOnRotation
MULTITURN_NODE=multiTurn
RADIAL_LAYOUT_NODE=radialLayout
REFERENCE_NODE=reference
RELATIVE_NODE=relative
......
......@@ -46,6 +46,7 @@ public class CpsNamespace extends NLS {
public static String MAXIMUM_VALUE_NODE;
public static String MINIMUM_VALUE_NODE;
public static String MODIFY_VALUE_ON_ROTATION_NODE;
public static String MULTITURN_NODE;
public static String RADIAL_LAYOUT_NODE;
public static String REFERENCE_NODE;
......
......@@ -7,6 +7,7 @@ import lu.list.itis.dkd.tui.utility.Point;
import lu.list.itis.dkd.tui.widget.builder.SelectorWidgetBuilder;
import lu.list.itis.dkd.tui.widget.corona.SelectableCorona;
import lu.list.itis.dkd.tui.widget.state.StateManager;
import lu.list.itis.dkd.tui.widget.state.StateManager.Direction;
import com.google.common.collect.Multimap;
import com.google.common.collect.TreeMultimap;
......@@ -115,24 +116,15 @@ public class SelectorWidget extends ValueWidget {
// ---------------------------------------------------------------------------
@Override
protected void updateFromRotation(double angle) {
protected void updateFromRotation(double angle, Direction direction) {
// Empty to disable features implemented in inherited class
}
// ---------------------------------------------------------------------------
// protected float moduloTwoPi(float rawAngle) {
// double angle = rawAngle % TWO_PI;
// if (angle < 0)
// angle += TWO_PI;
// return (float) angle;
//
// }
// ---------------------------------------------------------------------------
protected int getCurrentPosition(float newAngle) {
double range = (constrainted) ? Math.toRadians(upperStopAngle - lowerStopAngle) : TWO_PI;
double range = (constrainted) ? Math.toRadians(upperStopAngle - lowerStopAngle) : AngleUtils.TWO_PI;
double segment = range / numberOfPositions;
int current = 0;
......
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