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 |
static String |
PROPERTY_ADD_ENABLED |
static String |
PROPERTY_REMOVE_ENABLED |
protected boolean |
removeEnabled |
protected List<O> |
selected
List of the selected items
|
protected ListModel |
selectedModel
Model containing the selected items
|
protected List<O> |
universe
List of all the available items
|
protected ListModel |
universeModel
Model containing the remaining available items
|
| Constructor and Description |
|---|
BeanDoubleListModel() |
| Modifier and Type | Method and Description |
|---|---|
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.
|
List<O> |
getSelected()
To get the selected items.
|
ListModel |
getSelectedModel() |
List<O> |
getUniverse()
To get all the available items.
|
ListModel |
getUniverseModel() |
boolean |
isAddEnabled() |
boolean |
isRemoveEnabled() |
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 |
setSelectedModel(ListModel selectedModel) |
void |
setUniverse(List<O> universe)
Sets the list of the available items.
|
void |
setUniverseModel(ListModel universeModel) |
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
protected ListModel universeModel
protected ListModel selectedModel
protected boolean addEnabled
protected boolean removeEnabled
public void setSelected(List<O> selected)
selected - a list of Opublic void setUniverse(List<O> universe)
universe - a list of Oprotected void resetUniverse()
public ListModel getSelectedModel()
public void setSelectedModel(ListModel selectedModel)
public ListModel getUniverseModel()
public void setUniverseModel(ListModel universeModel)
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 boolean isAddEnabled()
public void setAddEnabled(boolean addEnabled)
public boolean isRemoveEnabled()
public void setRemoveEnabled(boolean removeEnabled)
protected void addToUniverseList(O item)
item - the item to add to the universe listCopyright © 2008-2013 CodeLutin. All Rights Reserved.