ItemType
- the type of item that this model contains.public class SubsetSelectionModel<ItemType> extends DefaultListenable<ItemType>
SubsetSelectionPanel
. We use List
here so
that the order of the elements will not change (this might screw up AWT).Constructor and Description |
---|
SubsetSelectionModel(java.util.List<ItemType> allItems) |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clear the selection
|
java.util.List<ItemType> |
getAllItems() |
java.util.List<ItemType> |
getSelectedItems() |
void |
remove(java.util.List<ItemType> items)
Remove items from the selection
|
void |
select(java.util.List<ItemType> items) |
void |
setAllItems(java.util.List<ItemType> allItems) |
addListener, notifyChange, removeListener
public SubsetSelectionModel(java.util.List<ItemType> allItems)
public void setAllItems(java.util.List<ItemType> allItems)
public void select(java.util.List<ItemType> items)
items
- the new selectionpublic void clear()
public void remove(java.util.List<ItemType> items)
items
- public java.util.List<ItemType> getAllItems()
public java.util.List<ItemType> getSelectedItems()