public class ListViewBehavior<T> extends BehaviorBase<ListView<T>>
Modifier and Type | Field and Description |
---|---|
protected static List<KeyBinding> |
LIST_VIEW_BINDINGS
Setup KeyBindings *
|
IS_TOUCH_SUPPORTED, TRAVERSAL_BINDINGS
Constructor and Description |
---|
ListViewBehavior(ListView<T> control) |
Modifier and Type | Method and Description |
---|---|
protected void |
callAction(String name)
Called to invoke the action associated with the given name.
|
protected void |
callActionForEvent(KeyEvent e)
Invokes the appropriate action for this key event.
|
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 |
mousePressed(MouseEvent e)
Invoked by a Skin when the body of the control has been pressed by
the mouse.
|
void |
setOnFocusNextRow(Runnable r) |
void |
setOnFocusPreviousRow(Runnable r) |
void |
setOnMoveToFirstCell(Runnable r) |
void |
setOnMoveToLastCell(Runnable r) |
void |
setOnScrollPageDown(Callback<Boolean,Integer> c) |
void |
setOnScrollPageUp(Callback<Boolean,Integer> c) |
void |
setOnSelectNextRow(Runnable r) |
void |
setOnSelectPreviousRow(Runnable r) |
contextMenuRequested, focusChanged, getControl, mouseDragged, mouseEntered, mouseExited, mouseReleased, traverse, traverseDown, traverseLeft, traverseNext, traversePrevious, traverseRight, traverseUp
protected static final List<KeyBinding> LIST_VIEW_BINDINGS
protected String matchActionForEvent(KeyEvent e)
BehaviorBase
matchActionForEvent
in class BehaviorBase<ListView<T>>
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<ListView<T>>
protected void callActionForEvent(KeyEvent e)
BehaviorBase
callActionForEvent
in class BehaviorBase<ListView<T>>
e
- The key event. Must not be null.public void setOnFocusPreviousRow(Runnable r)
public void setOnFocusNextRow(Runnable r)
public void setOnSelectPreviousRow(Runnable r)
public void setOnSelectNextRow(Runnable r)
public void setOnMoveToFirstCell(Runnable r)
public void setOnMoveToLastCell(Runnable r)
public void dispose()
BehaviorBase
dispose
in class BehaviorBase<ListView<T>>
public void mousePressed(MouseEvent e)
BehaviorBase
mousePressed
in class BehaviorBase<ListView<T>>
e
- the mouse eventCopyright © 2020. All rights reserved.