Package org.nuiton.jaxx.widgets.select
Class FilterableDoubleListModel<O>
- java.lang.Object
-
- org.jdesktop.beans.AbstractBean
-
- org.jdesktop.beans.AbstractSerializableBean
-
- org.nuiton.jaxx.widgets.select.FilterableDoubleListModel<O>
-
- All Implemented Interfaces:
Serializable,ModelToBean
public class FilterableDoubleListModel<O> extends org.jdesktop.beans.AbstractSerializableBean implements ModelToBean
Created on 11/28/14.- Since:
- 2.18
- Author:
- Tony Chemit - dev@tchemit.fr
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanaddEnabledCan use select action ?protected ObjectbeanOptional bean where to push data.protected booleanobjectIsAdjustingInternal flag to avoid reentrant code while firing some events.static StringPROPERTY_ADD_ENABLEDstatic StringPROPERTY_BEANstatic StringPROPERTY_REMOVE_ENABLEDstatic StringPROPERTY_SELECTEDstatic StringPROPERTY_SELECTED_DOWN_ENABLEDstatic StringPROPERTY_SELECTED_UP_ENABLEDprotected booleanremoveEnabledCan use unselect action ?protected booleanselectedDownEnabledCan use select down action ?protected JaxxDefaultListModel<O>selectedModelModel containing the selected items.protected booleanselectedUpEnabledCan use select up action ?protected List<O>universeUniverse of items useables in not-selected and selected lists.protected JaxxFilterableListModel<O>universeModelModel containing the remaining available items.
-
Constructor Summary
Constructors Constructor Description FilterableDoubleListModel(FilterableDoubleListConfig<O> config)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddToSelected(Iterable<O> items)ObjectgetBean()Class<O>getBeanType()FilterableDoubleListConfig<O>getConfig()StringgetI18nPrefix()StringgetProperty()List<O>getSelected()intgetSelectedListSize()JaxxDefaultListModel<O>getSelectedModel()JaxxFilterableListModel<O>getUniverseModel()booleanisAddEnabled()booleanisRemoveEnabled()booleanisSelectedDownEnabled()booleanisSelectedUpEnabled()booleanisUseMultiSelect()voidmoveDownSelected(O item)Move down a selected item.voidmoveUpSelected(O item)Move up a selected item.voidremoveFromSelected(Iterable<O> items)voidsetAddEnabled(boolean addEnabled)voidsetBean(Object bean)voidsetRemoveEnabled(boolean removeEnabled)voidsetSelected(Collection<O> selected)voidsetSelectedDownEnabled(boolean selectedDownEnabled)voidsetSelectedUpEnabled(boolean selectedUpEnabled)voidsetUniverse(Collection<O> universe)-
Methods inherited from class org.jdesktop.beans.AbstractBean
addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, addVetoableChangeListener, clone, fireIndexedPropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, fireVetoableChange, getPropertyChangeListeners, getPropertyChangeListeners, getVetoableChangeListeners, getVetoableChangeListeners, hasPropertyChangeListeners, hasVetoableChangeListeners, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, removeVetoableChangeListener
-
-
-
-
Field Detail
-
PROPERTY_ADD_ENABLED
public static final String PROPERTY_ADD_ENABLED
- See Also:
- Constant Field Values
-
PROPERTY_REMOVE_ENABLED
public static final String PROPERTY_REMOVE_ENABLED
- See Also:
- Constant Field Values
-
PROPERTY_SELECTED_UP_ENABLED
public static final String PROPERTY_SELECTED_UP_ENABLED
- See Also:
- Constant Field Values
-
PROPERTY_SELECTED_DOWN_ENABLED
public static final String PROPERTY_SELECTED_DOWN_ENABLED
- See Also:
- Constant Field Values
-
PROPERTY_BEAN
public static final String PROPERTY_BEAN
- See Also:
- Constant Field Values
-
PROPERTY_SELECTED
public static final String PROPERTY_SELECTED
- See Also:
- Constant Field Values
-
addEnabled
protected boolean addEnabled
Can use select action ?
-
removeEnabled
protected boolean removeEnabled
Can use unselect action ?
-
selectedUpEnabled
protected boolean selectedUpEnabled
Can use select up action ?
-
selectedDownEnabled
protected boolean selectedDownEnabled
Can use select down action ?
-
bean
protected Object bean
Optional bean where to push data.
-
objectIsAdjusting
protected boolean objectIsAdjusting
Internal flag to avoid reentrant code while firing some events.
-
universe
protected final List<O> universe
Universe of items useables in not-selected and selected lists.
-
universeModel
protected final JaxxFilterableListModel<O> universeModel
Model containing the remaining available items.
-
selectedModel
protected final JaxxDefaultListModel<O> selectedModel
Model containing the selected items.
-
-
Constructor Detail
-
FilterableDoubleListModel
public FilterableDoubleListModel(FilterableDoubleListConfig<O> config)
-
-
Method Detail
-
getSelectedModel
public JaxxDefaultListModel<O> getSelectedModel()
-
getUniverseModel
public JaxxFilterableListModel<O> getUniverseModel()
-
getConfig
public FilterableDoubleListConfig<O> getConfig()
-
isUseMultiSelect
public boolean isUseMultiSelect()
-
getProperty
public String getProperty()
-
getI18nPrefix
public String getI18nPrefix()
-
getSelectedListSize
public int getSelectedListSize()
-
setUniverse
public void setUniverse(Collection<O> universe)
-
setSelected
public void setSelected(Collection<O> selected)
-
moveUpSelected
public void moveUpSelected(O item)
Move up a selected item.- Parameters:
item- the selected item
-
moveDownSelected
public void moveDownSelected(O item)
Move down a selected item.- Parameters:
item- the selected item
-
isAddEnabled
public boolean isAddEnabled()
-
setAddEnabled
public void setAddEnabled(boolean addEnabled)
-
isRemoveEnabled
public boolean isRemoveEnabled()
-
setRemoveEnabled
public void setRemoveEnabled(boolean removeEnabled)
-
isSelectedUpEnabled
public boolean isSelectedUpEnabled()
-
setSelectedUpEnabled
public void setSelectedUpEnabled(boolean selectedUpEnabled)
-
isSelectedDownEnabled
public boolean isSelectedDownEnabled()
-
setSelectedDownEnabled
public void setSelectedDownEnabled(boolean selectedDownEnabled)
-
getBean
public Object getBean()
- Specified by:
getBeanin interfaceModelToBean
-
setBean
public void setBean(Object bean)
-
-