jaxx.runtime.swing
Class ListSelectorHandler<B>

java.lang.Object
  extended by jaxx.runtime.swing.ListSelectorHandler<B>

public class ListSelectorHandler<B>
extends java.lang.Object

Since:
2.2.3
Author:
sletellier

Field Summary
protected  ListSelectorUI<B> listSelector
           
static org.apache.commons.logging.Log log
           
 
Constructor Summary
ListSelectorHandler(ListSelectorUI<B> listSelector)
           
 
Method Summary
protected  javax.swing.JComboBox getCombo()
           
 java.util.List<B> getComboDatas()
           
protected  javax.swing.JList getList()
           
 java.util.List<B> getListDatas()
           
 void init(java.util.List<B> toCombo, java.util.List<B> toList)
          Initialize the component.
protected  void setComboDatas(java.util.List<B> toCombo)
          Set the data in combo box model.
protected  void setListDatas(java.util.List<B> toList)
          Set the data in the list model.
protected  void transfertToCombo(B[] bs)
          Transfert the b data from list to combo box.
protected  void transfertToList(B b)
          Transfert the b data from combo box to list.
protected  boolean updateAddEnabled(boolean enabled)
           
protected  boolean updateRemoveEnabled(boolean enabled)
           
 
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

listSelector

protected ListSelectorUI<B> listSelector
Constructor Detail

ListSelectorHandler

public ListSelectorHandler(ListSelectorUI<B> listSelector)
Method Detail

getCombo

protected javax.swing.JComboBox getCombo()

getList

protected javax.swing.JList getList()

getComboDatas

public java.util.List<B> getComboDatas()
Returns:
the datas from the combo box.

getListDatas

public java.util.List<B> getListDatas()
Returns:
the data for the list.

init

public void init(java.util.List<B> toCombo,
                 java.util.List<B> toList)
Initialize the component.

Parameters:
toCombo - datas to set in combo
toList - datas to set in list

transfertToList

protected void transfertToList(B b)
Transfert the b data from combo box to list.

Parameters:
b - the data to transfert

transfertToCombo

protected void transfertToCombo(B[] bs)
Transfert the b data from list to combo box.

Parameters:
bs - the data to transfert

updateAddEnabled

protected boolean updateAddEnabled(boolean enabled)
Parameters:
enabled - databinding
Returns:
true if add button should be enabled

updateRemoveEnabled

protected boolean updateRemoveEnabled(boolean enabled)
Parameters:
enabled - databinding
Returns:
true if remove button should be enabled

setComboDatas

protected void setComboDatas(java.util.List<B> toCombo)
Set the data in combo box model.

Parameters:
toCombo - datas to set in combo box model

setListDatas

protected void setListDatas(java.util.List<B> toList)
Set the data in the list model.

Parameters:
toList - datas to set in list model


Copyright © 2008-2010 CodeLutin. All Rights Reserved.