public class SliderBehavior extends BehaviorBase<Slider>
Modifier and Type | Class and Description |
---|---|
static class |
SliderBehavior.SliderKeyBinding |
Modifier and Type | Field and Description |
---|---|
protected static java.util.List<KeyBinding> |
SLIDER_BINDINGS
Setup KeyBindings *
*
We manually specify the focus traversal keys because Slider has *
different usage for up/down arrow keys.
|
private TwoLevelFocusBehavior |
tlFocus |
IS_TOUCH_SUPPORTED, TRAVERSAL_BINDINGS, TRAVERSE_DOWN, TRAVERSE_LEFT, TRAVERSE_NEXT, TRAVERSE_PREVIOUS, TRAVERSE_RIGHT, TRAVERSE_UP
Constructor and Description |
---|
SliderBehavior(Slider slider) |
Modifier and Type | Method and Description |
---|---|
protected void |
callAction(java.lang.String name)
Called to invoke the action associated with the given name.
|
(package private) double |
computeIncrement() |
(package private) void |
decrementValue() |
void |
dispose()
Called by a Skin when the Skin is disposed.
|
(package private) void |
end() |
(package private) void |
home() |
(package private) void |
incrementValue() |
protected java.lang.String |
matchActionForEvent(KeyEvent e)
Given a key event, this method will find the matching action name, or null if there
is not one.
|
void |
thumbDragged(MouseEvent e,
double position) |
void |
thumbPressed(MouseEvent e,
double position) |
void |
thumbReleased(MouseEvent e)
When thumb is released valueChanging should be set to false.
|
void |
trackPress(MouseEvent e,
double position)
Invoked by the Slider
Skin implementation whenever a mouse press
occurs on the "track" of the slider. |
callActionForEvent, contextMenuRequested, focusChanged, getControl, mouseDragged, mouseEntered, mouseExited, mousePressed, mouseReleased, traverse, traverseDown, traverseLeft, traverseNext, traversePrevious, traverseRight, traverseUp
protected static final java.util.List<KeyBinding> SLIDER_BINDINGS
private TwoLevelFocusBehavior tlFocus
public SliderBehavior(Slider slider)
protected java.lang.String matchActionForEvent(KeyEvent e)
BehaviorBase
matchActionForEvent
in class BehaviorBase<Slider>
e
- The key event. Must not be null.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<Slider>
public void dispose()
BehaviorBase
dispose
in class BehaviorBase<Slider>
public void trackPress(MouseEvent e, double position)
Skin
implementation whenever a mouse press
occurs on the "track" of the slider. This will cause the thumb to be
moved by some amount.position
- The mouse position on track with 0.0 being beginning of
track and 1.0 being the endpublic void thumbPressed(MouseEvent e, double position)
position
- The mouse position on track with 0.0 being beginning of
track and 1.0 being the endpublic void thumbDragged(MouseEvent e, double position)
position
- The mouse position on track with 0.0 being beginning of
track and 1.0 being the endpublic void thumbReleased(MouseEvent e)
void home()
void decrementValue()
void end()
void incrementValue()
double computeIncrement()