public class SpinnerBehavior<T> extends BehaviorBase<Spinner<T>>
Modifier and Type | Field and Description |
---|---|
private static double |
INITIAL_DURATION_MS |
private boolean |
isIncrementing |
private boolean |
keyDown
Indicates that a keyboard key has been pressed which represents the
event (this could be space bar for example).
|
protected static java.util.List<KeyBinding> |
SPINNER_BINDINGS |
(package private) EventHandler<ActionEvent> |
spinningKeyFrameEventHandler |
private int |
STEP_AMOUNT |
private Timeline |
timeline |
IS_TOUCH_SUPPORTED, TRAVERSAL_BINDINGS, TRAVERSE_DOWN, TRAVERSE_LEFT, TRAVERSE_NEXT, TRAVERSE_PREVIOUS, TRAVERSE_RIGHT, TRAVERSE_UP
Constructor and Description |
---|
SpinnerBehavior(Spinner<T> spinner)
*
Constructors *
*
|
Modifier and Type | Method and Description |
---|---|
private boolean |
arrowsAreVertical()
*
Implementation *
*
|
protected void |
callAction(java.lang.String name)
Called to invoke the action associated with the given name.
|
void |
decrement(int steps) |
void |
increment(int steps)
*
API *
*
|
void |
startSpinning(boolean increment) |
void |
stopSpinning() |
callActionForEvent, contextMenuRequested, dispose, focusChanged, getControl, matchActionForEvent, mouseDragged, mouseEntered, mouseExited, mousePressed, mouseReleased, traverse, traverseDown, traverseLeft, traverseNext, traversePrevious, traverseRight, traverseUp
private static final double INITIAL_DURATION_MS
private final int STEP_AMOUNT
private boolean isIncrementing
private Timeline timeline
final EventHandler<ActionEvent> spinningKeyFrameEventHandler
private boolean keyDown
protected static final java.util.List<KeyBinding> SPINNER_BINDINGS
protected void callAction(java.lang.String name)
BehaviorBase
When a KeyEvent is handled, it is first passed through callActionForEvent which resolves which "action" should be executed based on the key event. This action is indicated by name. This name is then passed to this function which is responsible for invoking the right function based on the name.
callAction
in class BehaviorBase<Spinner<T>>
public void increment(int steps)
public void decrement(int steps)
public void startSpinning(boolean increment)
public void stopSpinning()
private boolean arrowsAreVertical()