O - le type des objet contenus dans le modèle du composant.public class BeanComboBoxHandler<O> extends Object implements PropertyChangeListener, UIHandler<BeanComboBox<O>>
BeanComboBox.
Note: ce handler n'est pas stateless et n'est donc pas partageable entre plusieurs ui.BeanComboBox| Modifier and Type | Field and Description |
|---|---|
protected org.jdesktop.swingx.autocomplete.ObjectToStringConverter |
convertor
the convertor used to auto-complete
|
protected org.nuiton.decorator.MultiJXPathDecorator<O> |
decorator
the decorator of data
|
protected FocusListener |
EDITOR_TEXT_COMP0NENT_FOCUSLISTENER |
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 Document |
originalDocument
the original document of the combbo box editor (keep it to make possible undecorate)
|
protected BeanComboBox<O> |
ui |
| Constructor and Description |
|---|
BeanComboBoxHandler() |
| Modifier and Type | Method and Description |
|---|---|
void |
addItem(O item)
Add the given item into the comboBox.
|
void |
addItems(Iterable<O> items)
Add the given items into the comboBox.
|
void |
afterInit(BeanComboBox<O> ui) |
void |
beforeInit(BeanComboBox<O> ui) |
protected void |
fireEmpty(boolean wasEmpty) |
void |
focusCombo()
Focus combo only if autoFocus ui property is on.
|
Class<O> |
getBeanType() |
org.nuiton.decorator.MultiJXPathDecorator<O> |
getDecorator() |
protected Method |
getMutator() |
Document |
getOriginalDocument() |
Class<?> |
getTargetClass()
Deprecated.
since 2.5.9 (use now method
getBeanType()) |
void |
init(org.nuiton.decorator.JXPathDecorator<O> decorator,
List<O> data)
Initialise le handler de l'ui
|
boolean |
isEmpty() |
void |
propertyChange(PropertyChangeEvent evt) |
void |
removeItem(O item)
Remove the given item from the comboBox model.
|
void |
removeItems(Iterable<O> items)
Remove the given items from the comboBox model.
|
protected void |
setAutoComplete(Boolean oldValue,
Boolean newValue)
Modifie l'état autoComplete 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 |
updateUI(int index,
boolean reversesort) |
public static final org.apache.commons.logging.Log log
protected BeanComboBox<O> ui
protected Method mutator
protected Document originalDocument
protected org.jdesktop.swingx.autocomplete.ObjectToStringConverter convertor
protected org.nuiton.decorator.MultiJXPathDecorator<O> decorator
protected boolean init
protected final FocusListener EDITOR_TEXT_COMP0NENT_FOCUSLISTENER
public void init(org.nuiton.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 addItems(Iterable<O> items)
items - items to add in comboBox.public void removeItems(Iterable<O> items)
items - items to remove from the comboBox modelpublic 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 focusCombo()
protected void setAutoComplete(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 setSelectedItem(O oldValue, O newValue)
oldValue - l'ancienne valeurnewValue - la nouvelle valeurpublic Document getOriginalDocument()
public org.nuiton.decorator.MultiJXPathDecorator<O> getDecorator()
public Class<O> getBeanType()
@Deprecated public Class<?> getTargetClass()
getBeanType())protected Method getMutator()
public void propertyChange(PropertyChangeEvent evt)
propertyChange in interface PropertyChangeListenerprotected void fireEmpty(boolean wasEmpty)
public void beforeInit(BeanComboBox<O> ui)
beforeInit in interface UIHandler<BeanComboBox<O>>public void afterInit(BeanComboBox<O> ui)
afterInit in interface UIHandler<BeanComboBox<O>>Copyright © 2008–2017 Ultreia.io. All rights reserved.