O - le type des objet contenus dans le modèle du composant.public class BeanFilterableComboBoxHandler<O> extends Object implements PropertyChangeListener
BeanFilterableComboBox.
Note: ce handler n'est pas stateless et n'est donc pas partageable entre
plusieurs ui.BeanFilterableComboBox| Modifier and Type | Field and Description |
|---|---|
protected org.nuiton.util.decorator.MultiJXPathDecorator<O> |
decorator
the decorator of data
|
protected FocusListener |
EDITOR_TEXT_COMP0NENT_FOCUSLISTENER |
protected DocumentListener |
EDITOR_TEXT_COMPONENT_DOCUMENTLISTENER |
protected boolean |
init |
static org.apache.commons.logging.Log |
log |
protected Method |
mutator
the mutator method on the property of boxed bean in the ui
|
protected BeanFilterableComboBox<O> |
ui
ui if the handler
|
| Constructor and Description |
|---|
BeanFilterableComboBoxHandler(BeanFilterableComboBox<O> ui) |
| Modifier and Type | Method and Description |
|---|---|
void |
addFilter(com.google.common.base.Predicate<O> filter) |
void |
addItem(O item)
Add the given item into the comboBox.
|
void |
clearFilters() |
protected void |
fireEmpty(boolean wasEmpty) |
Class<O> |
getBeanType() |
org.nuiton.util.decorator.MultiJXPathDecorator<O> |
getDecorator() |
protected Method |
getMutator() |
void |
init(org.nuiton.util.decorator.JXPathDecorator<O> decorator,
List<O> data)
Initialise le handler de l'ui
|
boolean |
isEmpty() |
void |
propertyChange(PropertyChangeEvent evt) |
void |
refreshFilteredElements() |
void |
removeFilter(com.google.common.base.Predicate<O> filter) |
void |
removeItem(O item)
Remove the given item from the comboBox model.
|
void |
reset() |
protected void |
setFilterable(Boolean oldValue,
Boolean newValue)
Modifie l'état filterable de l'ui.
|
protected void |
setIndex(Integer oldValue,
Integer newValue)
Modifie l'index du décorateur
|
protected void |
setSelectedItem(O oldValue,
O newValue)
Modifie la valeur sélectionnée dans la liste déroulante.
|
protected void |
setSortOrder(Boolean oldValue,
Boolean newValue)
Modifie l'index du décorateur
|
void |
sortData()
Sort data of the model.
|
void |
togglePopup()
Toggle the popup visible state.
|
protected void |
unselectItem() |
protected void |
updateUI(int index,
boolean reversesort) |
public static final org.apache.commons.logging.Log log
protected BeanFilterableComboBox<O> ui
protected Method mutator
protected org.nuiton.util.decorator.MultiJXPathDecorator<O> decorator
protected boolean init
protected final FocusListener EDITOR_TEXT_COMP0NENT_FOCUSLISTENER
protected final DocumentListener EDITOR_TEXT_COMPONENT_DOCUMENTLISTENER
public BeanFilterableComboBoxHandler(BeanFilterableComboBox<O> ui)
public void init(org.nuiton.util.decorator.JXPathDecorator<O> decorator, List<O> data)
decorator - le decorateur a utiliserdata - la liste des données a gérerpublic void togglePopup()
public boolean isEmpty()
true if there is no data in comboBox, false
otherwise.public void addItem(O item)
item - item to add in comboBox.public void removeItem(O item)
item - the item to remove from the comboBox modelpublic void sortData()
public void reset()
protected void setFilterable(Boolean oldValue, Boolean newValue)
oldValue - l'ancienne valeurnewValue - la nouvelle valeurprotected void setIndex(Integer oldValue, Integer newValue)
oldValue - l'ancienne valeurnewValue - la nouvelle valeurprotected void setSortOrder(Boolean oldValue, Boolean newValue)
oldValue - l'ancienne valeurnewValue - la nouvelle valeurprotected void updateUI(int index,
boolean reversesort)
protected void unselectItem()
protected void setSelectedItem(O oldValue, O newValue)
oldValue - l'ancienne valeurnewValue - la nouvelle valeurpublic org.nuiton.util.decorator.MultiJXPathDecorator<O> getDecorator()
public Class<O> getBeanType()
protected Method getMutator()
public void propertyChange(PropertyChangeEvent evt)
propertyChange in interface PropertyChangeListenerprotected void fireEmpty(boolean wasEmpty)
public void addFilter(com.google.common.base.Predicate<O> filter)
public void removeFilter(com.google.common.base.Predicate<O> filter)
public void clearFilters()
public void refreshFilteredElements()
Copyright © 2008–2013 CodeLutin. All rights reserved.