O - the type of the object in the listpublic class BeanDoubleListModel<O>
extends org.jdesktop.beans.AbstractSerializableBean
BeanDoubleList widgetBeanDoubleList,
Serialized Form| Modifier and Type | Field and Description |
|---|---|
protected boolean |
addEnabled |
protected Collection<Predicate<List<O>>> |
canRemoveItemsPredicates |
static String |
PROPERTY_ADD_ENABLED |
static String |
PROPERTY_REMOVE_ENABLED |
static String |
PROPERTY_SELECTED_DOWN_ENABLED |
static String |
PROPERTY_SELECTED_UP_ENABLED |
static String |
PROPERTY_USE_MULTI_SELECT |
protected boolean |
removeEnabled |
protected List<O> |
selected
List of the selected items
|
protected boolean |
selectedDownEnabled |
protected JaxxDefaultListModel<O> |
selectedModel
Model containing the selected items
|
protected boolean |
selectedUpEnabled |
protected List<O> |
universe
List of all the available items
|
protected JaxxFilterableListModel<O> |
universeModel
Model containing the remaining available items
|
protected boolean |
useMultiSelect |
| Constructor and Description |
|---|
BeanDoubleListModel() |
| Modifier and Type | Method and Description |
|---|---|
void |
addCanRemoveItemsPredicate(Predicate<List<O>> canRemoveItemsPredicate) |
void |
addToSelected(List<O> items)
Adds a list of items to the selected items.
|
void |
addToSelected(O item)
Adds an item to the selected items.
|
protected void |
addToUniverseList(O item)
Adds an item to the available items list at the right index
to keep always the same order.
|
boolean |
computeRemoveEnabled(List<O> toRemoveItems) |
List<O> |
getSelected()
To get the selected items.
|
int |
getSelectedListSize() |
ListModel<O> |
getSelectedModel() |
List<O> |
getUniverse()
To get all the available items.
|
JaxxFilterableListModel<O> |
getUniverseModel() |
boolean |
isAddEnabled() |
boolean |
isRemoveEnabled() |
boolean |
isSelectedDownEnabled() |
boolean |
isSelectedUpEnabled() |
boolean |
isUseMultiSelect() |
void |
moveDownSelected(O item)
Move down a selected item.
|
void |
moveUpSelected(O item)
Move up a selected item.
|
void |
removeCanRemoveItemsPredicate(Predicate<List<O>> canRemoveItemsPredicate) |
void |
removeFromSelected(List<O> items)
Removes a list of items from the list of selected items.
|
void |
removeFromSelected(O item)
Removes an item from the selected items.
|
protected void |
resetUniverse() |
void |
setAddEnabled(boolean addEnabled) |
void |
setRemoveEnabled(boolean removeEnabled) |
void |
setSelected(List<O> selected)
Sets the list of selected items.
|
void |
setSelectedDownEnabled(boolean selectedDownEnabled) |
void |
setSelectedUpEnabled(boolean selectedUpEnabled) |
void |
setUniverse(List<O> universe)
Sets the list of the available items.
|
void |
setUseMultiSelect(boolean useMultiSelect) |
addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, addVetoableChangeListener, clone, fireIndexedPropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, fireVetoableChange, getPropertyChangeListeners, getPropertyChangeListeners, getVetoableChangeListeners, getVetoableChangeListeners, hasPropertyChangeListeners, hasVetoableChangeListeners, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, removeVetoableChangeListenerpublic static final String PROPERTY_ADD_ENABLED
public static final String PROPERTY_REMOVE_ENABLED
public static final String PROPERTY_SELECTED_UP_ENABLED
public static final String PROPERTY_SELECTED_DOWN_ENABLED
public static final String PROPERTY_USE_MULTI_SELECT
protected final JaxxFilterableListModel<O> universeModel
protected final JaxxDefaultListModel<O> selectedModel
protected boolean addEnabled
protected boolean removeEnabled
protected boolean selectedUpEnabled
protected boolean selectedDownEnabled
protected boolean useMultiSelect
protected final Collection<Predicate<List<O>>> canRemoveItemsPredicates
public void setSelected(List<O> selected)
selected - a list of Opublic void setUniverse(List<O> universe)
universe - a list of Oprotected void resetUniverse()
public JaxxFilterableListModel<O> getUniverseModel()
public void addToSelected(O item)
item - the item to selectpublic void addToSelected(List<O> items)
items - the list of the items to selectpublic void removeFromSelected(O item)
item - the item to unselectpublic void removeFromSelected(List<O> items)
items - the list of the items to unselectpublic void moveUpSelected(O item)
item - the selected itempublic void moveDownSelected(O item)
item - the selected itempublic boolean isAddEnabled()
public void setAddEnabled(boolean addEnabled)
public boolean isRemoveEnabled()
public void setRemoveEnabled(boolean removeEnabled)
public boolean isSelectedUpEnabled()
public void setSelectedUpEnabled(boolean selectedUpEnabled)
public boolean isSelectedDownEnabled()
public void setSelectedDownEnabled(boolean selectedDownEnabled)
public boolean isUseMultiSelect()
public void setUseMultiSelect(boolean useMultiSelect)
protected void addToUniverseList(O item)
item - the item to add to the universe listpublic int getSelectedListSize()
public void addCanRemoveItemsPredicate(Predicate<List<O>> canRemoveItemsPredicate)
public void removeCanRemoveItemsPredicate(Predicate<List<O>> canRemoveItemsPredicate)
Copyright © 2008–2018 Ultreia.io. All rights reserved.