public class SliderBehavior extends BehaviorBase<Slider>
Modifier and Type | Class and Description |
---|---|
static class |
SliderBehavior.SliderKeyBinding |
Modifier and Type | Field and Description |
---|---|
protected static List<KeyBinding> |
SLIDER_BINDINGS
Setup KeyBindings *
*
We manually specify the focus traversal keys because Slider has *
different usage for up/down arrow keys.
|
IS_TOUCH_SUPPORTED, TRAVERSAL_BINDINGS
Constructor and Description |
---|
SliderBehavior(Slider slider) |
Modifier and Type | Method and Description |
---|---|
protected void |
callAction(String name)
Called to invoke the action associated with the given name.
|
void |
dispose()
Called by a Skin when the Skin is disposed.
|
protected 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 List<KeyBinding> SLIDER_BINDINGS
public SliderBehavior(Slider slider)
protected String matchActionForEvent(KeyEvent e)
BehaviorBase
matchActionForEvent
in class BehaviorBase<Slider>
e
- The key event. Must not be null.protected void callAction(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)
Copyright © 2020. All rights reserved.