Class BeanDoubleListHandler<O>

java.lang.Object
jaxx.runtime.swing.editor.bean.BeanDoubleListHandler<O>
Type Parameters:
O - the type of the objects contained in the list.
All Implemented Interfaces:
java.beans.PropertyChangeListener, java.util.EventListener

public class BeanDoubleListHandler<O>
extends java.lang.Object
implements java.beans.PropertyChangeListener
The handler of a BeanDoubleList.
Since:
2.5.8
Author:
Kevin Morin - kmorin@codelutin.com
See Also:
BeanDoubleList
  • Field Summary

    Fields
    Modifier and Type Field Description
    protected org.nuiton.decorator.MultiJXPathDecorator<O> decorator
    the decorator of data
    protected java.lang.reflect.Method mutator
    the mutator method on the property of boxed bean in the ui
    protected BeanDoubleList<O> ui
    ui of the handler
  • Constructor Summary

    Constructors
    Constructor Description
    BeanDoubleListHandler​(BeanDoubleList<O> ui)  
  • Method Summary

    Modifier and Type Method Description
    void addFilter​(com.google.common.base.Predicate<O> filter)  
    void clearFilters()  
    protected void fireSelectionUpdate()  
    java.lang.Class<O> getBeanType()  
    org.nuiton.decorator.MultiJXPathDecorator<O> getDecorator()  
    java.lang.reflect.Method getMutator()  
    javax.swing.JPopupMenu getSelectedListPopup​(boolean showIt)  
    void init​(org.nuiton.decorator.JXPathDecorator<O> decorator, java.util.List<O> universe, java.util.List<O> selected)
    Initializes the handler of the UI
    void init​(org.nuiton.decorator.JXPathDecorator<O> decorator, org.nuiton.decorator.JXPathDecorator<O> decorator2, java.util.List<O> universe, java.util.List<O> selected)
    Initializes the handler of the UI
    void moveDownSelected​(O item)
    Move down a selected item.
    void moveUpSelected​(O item)
    Move up a selected item.
    void onKeyPressedOnSelectedList​(java.awt.event.KeyEvent e)  
    void onKeyPressedOnUniverseList​(java.awt.event.KeyEvent e)  
    void onSelectedListClicked​(java.awt.event.MouseEvent event)
    When selected list was double clicked, move selected items to universe list.
    void onUniverseListClicked​(java.awt.event.MouseEvent event)
    When universe list was double clicked, move selected items to selected list.
    void propertyChange​(java.beans.PropertyChangeEvent evt)  
    void recomputeButtonStates()  
    void refreshFilteredElements()  
    void removeFilter​(com.google.common.base.Predicate<O> filter)  
    void select()
    When add button was hit, move selected items (from universe list) to selected list.
    void selectFirstRowIfNoSelection​(java.awt.event.FocusEvent event)  
    protected void setHighlightFilterText​(java.lang.Boolean newValue)  
    protected void setIndex​(java.lang.Integer oldValue, java.lang.Integer newValue)
    Modifie l'index du décorateur
    void setSelected​(java.util.List<O> selection)  
    protected void setSortOrder​(java.lang.Boolean oldValue, java.lang.Boolean newValue)
    Modifie l'index du décorateur
    void setUniverse​(java.util.List<O> selection)  
    void sortData()
    Sort data of the model.
    void togglePopup()
    Toggle the popup visible state.
    void unselect()
    When remove button was hit, move selected items (from selected list) to universe list.
    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 Details

    • mutator

      protected java.lang.reflect.Method mutator
      the mutator method on the property of boxed bean in the ui
    • ui

      protected BeanDoubleList<O> ui
      ui of the handler
    • decorator

      protected org.nuiton.decorator.MultiJXPathDecorator<O> decorator
      the decorator of data
  • Constructor Details

    • BeanDoubleListHandler

      public BeanDoubleListHandler​(BeanDoubleList<O> ui)
  • Method Details

    • getSelectedListPopup

      public javax.swing.JPopupMenu getSelectedListPopup​(boolean showIt)
    • init

      public void init​(org.nuiton.decorator.JXPathDecorator<O> decorator, java.util.List<O> universe, java.util.List<O> selected)
      Initializes the handler of the UI
      Parameters:
      decorator - the decorator to use to display the data nicely
      universe - the list of all the available items
      selected - the list of selected items
    • init

      public void init​(org.nuiton.decorator.JXPathDecorator<O> decorator, org.nuiton.decorator.JXPathDecorator<O> decorator2, java.util.List<O> universe, java.util.List<O> selected)
      Initializes the handler of the UI
      Parameters:
      decorator - the decorator to use to display the data nicely
      decorator2 - the selected decorator to use to display the selected data nicely (if none, then reuse the first one)
      universe - the list of all the available items
      selected - the list of selected items
    • recomputeButtonStates

      public void recomputeButtonStates()
    • setUniverse

      public void setUniverse​(java.util.List<O> selection)
    • setSelected

      public void setSelected​(java.util.List<O> selection)
    • togglePopup

      public void togglePopup()
      Toggle the popup visible state.
    • sortData

      public void sortData()
      Sort data of the model.
      Since:
      2.5.10
    • moveUpSelected

      public void moveUpSelected​(O item)
      Move up a selected item.
      Parameters:
      item - the selected item
      Since:
      2.5.26
    • moveDownSelected

      public void moveDownSelected​(O item)
      Move down a selected item.
      Parameters:
      item - the selected item
      Since:
      2.5.26
    • setIndex

      protected void setIndex​(java.lang.Integer oldValue, java.lang.Integer newValue)
      Modifie l'index du décorateur
      Parameters:
      oldValue - l'ancienne valeur
      newValue - la nouvelle valeur
    • setSortOrder

      protected void setSortOrder​(java.lang.Boolean oldValue, java.lang.Boolean newValue)
      Modifie l'index du décorateur
      Parameters:
      oldValue - l'ancienne valeur
      newValue - la nouvelle valeur
    • setHighlightFilterText

      protected void setHighlightFilterText​(java.lang.Boolean newValue)
    • updateUI

      protected void updateUI​(int index, boolean reversesort)
    • onUniverseListClicked

      public void onUniverseListClicked​(java.awt.event.MouseEvent event)
      When universe list was double clicked, move selected items to selected list.
      Parameters:
      event - mouse event
    • onSelectedListClicked

      public void onSelectedListClicked​(java.awt.event.MouseEvent event)
      When selected list was double clicked, move selected items to universe list.
      Parameters:
      event - mouse event
    • select

      public void select()
      When add button was hit, move selected items (from universe list) to selected list.
    • unselect

      public void unselect()
      When remove button was hit, move selected items (from selected list) to universe list.
    • fireSelectionUpdate

      protected void fireSelectionUpdate()
    • getMutator

      public java.lang.reflect.Method getMutator()
    • getDecorator

      public org.nuiton.decorator.MultiJXPathDecorator<O> getDecorator()
    • getBeanType

      public java.lang.Class<O> getBeanType()
      Returns:
      get the type of objects contained in the comboBox model.
      Since:
      2.5.9
    • propertyChange

      public void propertyChange​(java.beans.PropertyChangeEvent evt)
      Specified by:
      propertyChange in interface java.beans.PropertyChangeListener
    • addFilter

      public void addFilter​(com.google.common.base.Predicate<O> filter)
    • removeFilter

      public void removeFilter​(com.google.common.base.Predicate<O> filter)
    • clearFilters

      public void clearFilters()
    • refreshFilteredElements

      public void refreshFilteredElements()
    • onKeyPressedOnUniverseList

      public void onKeyPressedOnUniverseList​(java.awt.event.KeyEvent e)
    • onKeyPressedOnSelectedList

      public void onKeyPressedOnSelectedList​(java.awt.event.KeyEvent e)
    • selectFirstRowIfNoSelection

      public void selectFirstRowIfNoSelection​(java.awt.event.FocusEvent event)