public class ListViewBehavior<T> extends BehaviorBase<ListView<T>>
Modifier and Type | Class and Description |
---|---|
private static class |
ListViewBehavior.ListViewKeyBinding |
IS_TOUCH_SUPPORTED, TRAVERSAL_BINDINGS, TRAVERSE_DOWN, TRAVERSE_LEFT, TRAVERSE_NEXT, TRAVERSE_PREVIOUS, TRAVERSE_RIGHT, TRAVERSE_UP
Constructor and Description |
---|
ListViewBehavior(ListView<T> control) |
Modifier and Type | Method and Description |
---|---|
private void |
activate() |
private void |
alsoSelectNextRow() |
private void |
alsoSelectPreviousRow() |
protected void |
callAction(java.lang.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.
|
private void |
cancelEdit() |
private void |
clearSelection() |
private void |
clearSelectionOutsideRange(int start,
int end) |
private void |
discontinuousSelectAllToFirstRow() |
private void |
discontinuousSelectAllToLastRow() |
private void |
discontinuousSelectNextRow() |
private void |
discontinuousSelectPageDown() |
private void |
discontinuousSelectPageUp() |
private void |
discontinuousSelectPreviousRow()
Discontinuous Selection *
|
void |
dispose()
Called by a Skin when the Skin is disposed.
|
private void |
focusFirstRow() |
private void |
focusLastRow() |
private void |
focusNextRow() |
private void |
focusPageDown() |
private void |
focusPageUp() |
private void |
focusPreviousRow() |
private int |
getAnchor() |
private int |
getRowCount() |
private boolean |
hasAnchor() |
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 |
mousePressed(MouseEvent e)
Invoked by a Skin when the body of the control has been pressed by
the mouse.
|
private void |
scrollPageDown() |
private void |
scrollPageUp() |
private void |
selectAll() |
private void |
selectAllPageDown() |
private void |
selectAllPageUp() |
private void |
selectAllToFirstRow() |
private void |
selectAllToFocus(boolean setAnchorToFocusIndex) |
private void |
selectAllToLastRow() |
private void |
selectFirstRow() |
private void |
selectLastRow() |
private void |
selectNextRow() |
private void |
selectPreviousRow() |
private void |
setAnchor(int anchor) |
void |
setOnFocusNextRow(java.lang.Runnable r) |
void |
setOnFocusPreviousRow(java.lang.Runnable r) |
void |
setOnMoveToFirstCell(java.lang.Runnable r) |
void |
setOnMoveToLastCell(java.lang.Runnable r) |
void |
setOnScrollPageDown(Callback<java.lang.Boolean,java.lang.Integer> c) |
void |
setOnScrollPageUp(Callback<java.lang.Boolean,java.lang.Integer> c) |
void |
setOnSelectNextRow(java.lang.Runnable r) |
void |
setOnSelectPreviousRow(java.lang.Runnable r) |
private void |
toggleFocusOwnerSelection() |
contextMenuRequested, focusChanged, getControl, mouseDragged, mouseEntered, mouseExited, mouseReleased, traverse, traverseDown, traverseLeft, traverseNext, traversePrevious, traverseRight, traverseUp
protected static final java.util.List<KeyBinding> LIST_VIEW_BINDINGS
private boolean isShiftDown
private boolean isShortcutDown
private Callback<java.lang.Boolean,java.lang.Integer> onScrollPageUp
private Callback<java.lang.Boolean,java.lang.Integer> onScrollPageDown
private java.lang.Runnable onFocusPreviousRow
private java.lang.Runnable onFocusNextRow
private java.lang.Runnable onSelectPreviousRow
private java.lang.Runnable onSelectNextRow
private java.lang.Runnable onMoveToFirstCell
private java.lang.Runnable onMoveToLastCell
private boolean selectionChanging
private final ListChangeListener<java.lang.Integer> selectedIndicesListener
private final ListChangeListener<T> itemsListListener
private final ChangeListener<ObservableList<T>> itemsListener
private final ChangeListener<MultipleSelectionModel<T>> selectionModelListener
private final WeakChangeListener<ObservableList<T>> weakItemsListener
private final WeakListChangeListener<java.lang.Integer> weakSelectedIndicesListener
private final WeakListChangeListener<T> weakItemsListListener
private final WeakChangeListener<MultipleSelectionModel<T>> weakSelectionModelListener
private TwoLevelFocusListBehavior tlFocus
protected java.lang.String matchActionForEvent(KeyEvent e)
BehaviorBase
matchActionForEvent
in class BehaviorBase<ListView<T>>
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<ListView<T>>
protected void callActionForEvent(KeyEvent e)
BehaviorBase
callActionForEvent
in class BehaviorBase<ListView<T>>
e
- The key event. Must not be null.public void setOnScrollPageUp(Callback<java.lang.Boolean,java.lang.Integer> c)
public void setOnScrollPageDown(Callback<java.lang.Boolean,java.lang.Integer> c)
public void setOnFocusPreviousRow(java.lang.Runnable r)
public void setOnFocusNextRow(java.lang.Runnable r)
public void setOnSelectPreviousRow(java.lang.Runnable r)
public void setOnSelectNextRow(java.lang.Runnable r)
public void setOnMoveToFirstCell(java.lang.Runnable r)
public void setOnMoveToLastCell(java.lang.Runnable r)
public void dispose()
BehaviorBase
dispose
in class BehaviorBase<ListView<T>>
private void setAnchor(int anchor)
private int getAnchor()
private boolean hasAnchor()
public void mousePressed(MouseEvent e)
BehaviorBase
mousePressed
in class BehaviorBase<ListView<T>>
e
- the mouse eventprivate int getRowCount()
private void clearSelection()
private void scrollPageUp()
private void scrollPageDown()
private void focusFirstRow()
private void focusLastRow()
private void focusPreviousRow()
private void focusNextRow()
private void focusPageUp()
private void focusPageDown()
private void alsoSelectPreviousRow()
private void alsoSelectNextRow()
private void clearSelectionOutsideRange(int start, int end)
private void selectPreviousRow()
private void selectNextRow()
private void selectFirstRow()
private void selectLastRow()
private void selectAllPageUp()
private void selectAllPageDown()
private void selectAllToFirstRow()
private void selectAllToLastRow()
private void selectAll()
private void selectAllToFocus(boolean setAnchorToFocusIndex)
private void cancelEdit()
private void activate()
private void toggleFocusOwnerSelection()
private void discontinuousSelectPreviousRow()
private void discontinuousSelectNextRow()
private void discontinuousSelectPageUp()
private void discontinuousSelectPageDown()
private void discontinuousSelectAllToFirstRow()
private void discontinuousSelectAllToLastRow()