jaxx.runtime.swing.editor.bean
Class BeanComboBoxHandler<O>

java.lang.Object
  extended by jaxx.runtime.swing.editor.bean.BeanComboBoxHandler<O>
Type Parameters:
O - le type des objet contenus dans le modèle du composant.
All Implemented Interfaces:
PropertyChangeListener, EventListener

public class BeanComboBoxHandler<O>
extends Object
implements PropertyChangeListener

Le handler d'un BeanComboBox.

Note: ce handler n'est pas stateless et n'est donc pas partageable entre plusieurs ui.

Author:
tchemit
See Also:
BeanComboBox

Field Summary
protected  org.jdesktop.swingx.autocomplete.ObjectToStringConverter convertor
          the convertor used to auto-complete
protected  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
          ui if the handler
 
Constructor Summary
BeanComboBoxHandler(BeanComboBox<O> ui)
           
 
Method Summary
 MultiJXPathDecorator<O> getDecorator()
           
protected  Method getMutator()
           
 Document getOriginalDocument()
           
 Class<?> getTargetClass()
           
 void init(JXPathDecorator<O> decorator, List<O> data)
          Initialise le handler de l'ui
 void propertyChange(PropertyChangeEvent evt)
           
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(Object oldValue, Object 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 togglePopup()
          Toggle the popup visible state.
protected  void updateUI(int index, boolean reversesort)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

public static final org.apache.commons.logging.Log log

ui

protected BeanComboBox<O> ui
ui if the handler


mutator

protected Method mutator
the mutator method on the property of boxed bean in the ui


originalDocument

protected Document originalDocument
the original document of the combbo box editor (keep it to make possible undecorate)


convertor

protected org.jdesktop.swingx.autocomplete.ObjectToStringConverter convertor
the convertor used to auto-complete


decorator

protected MultiJXPathDecorator<O> decorator
the decorator of data


init

protected boolean init

EDITOR_TEXT_COMP0NENT_FOCUSLISTENER

protected final FocusListener EDITOR_TEXT_COMP0NENT_FOCUSLISTENER
Constructor Detail

BeanComboBoxHandler

public BeanComboBoxHandler(BeanComboBox<O> ui)
Method Detail

init

public void init(JXPathDecorator<O> decorator,
                 List<O> data)
Initialise le handler de l'ui

Parameters:
decorator - le decorateur a utiliser
data - la liste des données a gérer

togglePopup

public void togglePopup()
Toggle the popup visible state.


setAutoComplete

protected void setAutoComplete(Boolean oldValue,
                               Boolean newValue)
Modifie l'état autoComplete de l'ui.

Parameters:
oldValue - l'ancienne valeur
newValue - la nouvelle valeur

setIndex

protected void setIndex(Integer oldValue,
                        Integer newValue)
Modifie l'index du décorateur

Parameters:
oldValue - l'ancienne valeur
newValue - la nouvelle valeur

setSortOrder

protected void setSortOrder(Boolean oldValue,
                            Boolean newValue)
Modifie l'index du décorateur

Parameters:
oldValue - l'ancienne valeur
newValue - la nouvelle valeur

updateUI

protected void updateUI(int index,
                        boolean reversesort)

setSelectedItem

protected void setSelectedItem(Object oldValue,
                               Object newValue)
Modifie la valeur sélectionnée dans la liste déroulante.

Parameters:
oldValue - l'ancienne valeur
newValue - la nouvelle valeur

getOriginalDocument

public Document getOriginalDocument()
Returns:
le document de l'éditeur avant complétion.

getDecorator

public MultiJXPathDecorator<O> getDecorator()

getTargetClass

public Class<?> getTargetClass()

getMutator

protected Method getMutator()
Returns:
le mutateur a utiliser pour modifier le bean associé.

propertyChange

public void propertyChange(PropertyChangeEvent evt)
Specified by:
propertyChange in interface PropertyChangeListener


Copyright © 2008-2010 CodeLutin. All Rights Reserved.