public final class FXEntityListSelectionModel extends java.lang.Object implements SelectionModel<Entity>
SelectionModel
implementationConstructor and Description |
---|
FXEntityListSelectionModel(javafx.scene.control.SelectionModel<Entity> selectionModel) |
Modifier and Type | Method and Description |
---|---|
void |
addSelectedIndex(int index)
Selects the item at
index |
void |
addSelectedIndexes(java.util.Collection<java.lang.Integer> indexes)
Adds these indexes to the selection
|
void |
addSelectedIndexListener(EventDataListener<java.lang.Integer> listener) |
void |
addSelectedItem(Entity item)
Adds the given item to the selection
|
void |
addSelectedItemListener(EventDataListener<Entity> listener) |
void |
addSelectedItems(java.util.Collection<Entity> items)
Adds the given items to the selection
|
void |
addSelectedItemsListener(EventDataListener<java.util.List<Entity>> listener) |
void |
addSelectionChangedListener(EventListener listener) |
void |
clearSelection()
Clears the selection
|
StateObserver |
getMultipleSelectionObserver() |
int |
getSelectedIndex() |
java.util.List<java.lang.Integer> |
getSelectedIndexes() |
Entity |
getSelectedItem() |
java.util.List<Entity> |
getSelectedItems() |
int |
getSelectionCount() |
StateObserver |
getSelectionEmptyObserver() |
javafx.scene.control.SelectionModel<Entity> |
getSelectionModel() |
StateObserver |
getSingleSelectionObserver() |
boolean |
isSelectionEmpty() |
void |
moveSelectionDown()
Moves all selected indexes down one index, wraps around.
|
void |
moveSelectionUp()
Moves all selected indexes up one index, wraps around.
|
void |
removeSelectedIndex(int index)
Removes the item at
index from the selection |
void |
removeSelectedIndexes(java.util.Collection<java.lang.Integer> indexes)
Removes the given indexes from the selection
|
void |
removeSelectedIndexListener(EventDataListener listener) |
void |
removeSelectedItem(Entity item)
Remove the given item from the selection
|
void |
removeSelectedItemListener(EventDataListener listener) |
void |
removeSelectedItems(java.util.Collection<Entity> items)
Remove the given items from the selection
|
void |
removeSelectedItemsListener(EventDataListener listener) |
void |
removeSelectionChangedListener(EventListener listener) |
void |
selectAll()
Selects all visible entities
|
void |
setSelectedIndex(int index)
Clears the selection and selects the item at
index |
void |
setSelectedIndexes(java.util.Collection<java.lang.Integer> indexes)
Selects the given indexes
|
void |
setSelectedItem(Entity item)
Sets the selected item
|
void |
setSelectedItems(java.util.Collection<Entity> items)
Selects the given items
|
public FXEntityListSelectionModel(javafx.scene.control.SelectionModel<Entity> selectionModel)
selectionModel
- the SelectionModel
instance to base this selection model onpublic javafx.scene.control.SelectionModel<Entity> getSelectionModel()
SelectionModel
instancepublic StateObserver getSelectionEmptyObserver()
getSelectionEmptyObserver
in interface SelectionModel<Entity>
public StateObserver getMultipleSelectionObserver()
getMultipleSelectionObserver
in interface SelectionModel<Entity>
public StateObserver getSingleSelectionObserver()
getSingleSelectionObserver
in interface SelectionModel<Entity>
public void addSelectionChangedListener(EventListener listener)
addSelectionChangedListener
in interface SelectionModel<Entity>
listener
- a listener to be notified each time the selection changespublic void removeSelectionChangedListener(EventListener listener)
removeSelectionChangedListener
in interface SelectionModel<Entity>
listener
- the listener to removepublic void addSelectedIndexListener(EventDataListener<java.lang.Integer> listener)
addSelectedIndexListener
in interface SelectionModel<Entity>
listener
- a listener to be notified each time the selected index changespublic void removeSelectedIndexListener(EventDataListener listener)
removeSelectedIndexListener
in interface SelectionModel<Entity>
listener
- the listener to removepublic void addSelectedItemListener(EventDataListener<Entity> listener)
addSelectedItemListener
in interface SelectionModel<Entity>
listener
- a listener to be notified each time the selected item changespublic void removeSelectedItemListener(EventDataListener listener)
removeSelectedItemListener
in interface SelectionModel<Entity>
listener
- the listener to removepublic void addSelectedItemsListener(EventDataListener<java.util.List<Entity>> listener)
addSelectedItemsListener
in interface SelectionModel<Entity>
listener
- a listener to be notified each time the selected items changepublic void removeSelectedItemsListener(EventDataListener listener)
removeSelectedItemsListener
in interface SelectionModel<Entity>
listener
- the listener to removepublic void moveSelectionDown()
moveSelectionDown
in interface SelectionModel<Entity>
SelectionModel.addSelectionChangedListener(EventListener)
public void moveSelectionUp()
moveSelectionUp
in interface SelectionModel<Entity>
SelectionModel.addSelectionChangedListener(EventListener)
public int getSelectedIndex()
getSelectedIndex
in interface SelectionModel<Entity>
public void addSelectedIndex(int index)
index
addSelectedIndex
in interface SelectionModel<Entity>
index
- the indexpublic void removeSelectedIndex(int index)
index
from the selectionremoveSelectedIndex
in interface SelectionModel<Entity>
index
- the indexpublic void removeSelectedIndexes(java.util.Collection<java.lang.Integer> indexes)
removeSelectedIndexes
in interface SelectionModel<Entity>
indexes
- the indexespublic void removeSelectedItem(Entity item)
removeSelectedItem
in interface SelectionModel<Entity>
item
- the item to remove from the selectionpublic void removeSelectedItems(java.util.Collection<Entity> items)
removeSelectedItems
in interface SelectionModel<Entity>
items
- the items to remove from the selectionpublic void setSelectedIndex(int index)
index
setSelectedIndex
in interface SelectionModel<Entity>
index
- the indexpublic void setSelectedIndexes(java.util.Collection<java.lang.Integer> indexes)
setSelectedIndexes
in interface SelectionModel<Entity>
indexes
- the indexes to selectpublic java.util.List<java.lang.Integer> getSelectedIndexes()
getSelectedIndexes
in interface SelectionModel<Entity>
public void selectAll()
selectAll
in interface SelectionModel<Entity>
SelectionModel.addSelectionChangedListener(EventListener)
public void addSelectedIndexes(java.util.Collection<java.lang.Integer> indexes)
addSelectedIndexes
in interface SelectionModel<Entity>
indexes
- the indexes to add to the selectionpublic int getSelectionCount()
getSelectionCount
in interface SelectionModel<Entity>
public void setSelectedItems(java.util.Collection<Entity> items)
setSelectedItems
in interface SelectionModel<Entity>
items
- the items to selectpublic java.util.List<Entity> getSelectedItems()
getSelectedItems
in interface SelectionModel<Entity>
public Entity getSelectedItem()
getSelectedItem
in interface SelectionModel<Entity>
public void setSelectedItem(Entity item)
setSelectedItem
in interface SelectionModel<Entity>
item
- the item to selectpublic void addSelectedItem(Entity item)
addSelectedItem
in interface SelectionModel<Entity>
item
- the item to add to the selectionpublic void addSelectedItems(java.util.Collection<Entity> items)
addSelectedItems
in interface SelectionModel<Entity>
items
- the items to add to the selectionpublic void clearSelection()
clearSelection
in interface SelectionModel<Entity>
public boolean isSelectionEmpty()
isSelectionEmpty
in interface SelectionModel<Entity>