org.viewaframework.binding.swing.combo
Class ComboBoxBindingModel<U>

java.lang.Object
  extended by org.viewaframework.binding.swing.combo.ComboBoxBindingModel<U>
Type Parameters:
U -
All Implemented Interfaces:
ComboBoxModel, ListModel, MutableComboBoxModel, Observable, ObservableModel<U>

public class ComboBoxBindingModel<U>
extends Object
implements MutableComboBoxModel, ObservableModel<U>

Author:
Mario Garcia

Field Summary
static String SELECTED_ITEM
           
 
Constructor Summary
ComboBoxBindingModel()
           
ComboBoxBindingModel(EventList<U> list)
           
 
Method Summary
 void addElement(Object obj)
           
 void addListDataListener(ListDataListener l)
           
 void addPropertyChangeListener(PropertyChangeListener listener)
          This method adds listeners registering all modifications made to registered properties.
 boolean contains(U element)
           
 void firePropertyChange(PropertyChangeEvent evt)
          Fires an event of a specific property
 Object getElementAt(int index)
           
 EventList<U> getModelList()
           
 List<PropertyChangeListener> getPropertyChangeListeners()
          Returns a list of PropertyChangeListener objects
 BeanAdapter<U> getSelectedElementAdapter()
           
 Object getSelectedItem()
           
 int getSize()
           
 void insertElementAt(Object obj, int index)
           
 void removeElement(Object obj)
           
 void removeElementAt(int index)
           
 void removeListDataListener(ListDataListener l)
           
 void removePropertyChangeListener(PropertyChangeListener listener)
          This method removes listeners registering all modifications made to registered properties.
 void setModelList(EventList<U> modelList)
           
 void setSelectedItem(Object anItem)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SELECTED_ITEM

public static final String SELECTED_ITEM
See Also:
Constant Field Values
Constructor Detail

ComboBoxBindingModel

public ComboBoxBindingModel()

ComboBoxBindingModel

public ComboBoxBindingModel(EventList<U> list)
Parameters:
list -
Method Detail

addElement

public void addElement(Object obj)
Specified by:
addElement in interface MutableComboBoxModel

addListDataListener

public void addListDataListener(ListDataListener l)
Specified by:
addListDataListener in interface ListModel

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener listener)
Description copied from interface: Observable
This method adds listeners registering all modifications made to registered properties.

Specified by:
addPropertyChangeListener in interface Observable

contains

public boolean contains(U element)
Specified by:
contains in interface ObservableModel<U>

firePropertyChange

public void firePropertyChange(PropertyChangeEvent evt)
Description copied from interface: Observable
Fires an event of a specific property

Specified by:
firePropertyChange in interface Observable
Parameters:
evt - Triggered event

getElementAt

public Object getElementAt(int index)
Specified by:
getElementAt in interface ListModel

getModelList

public EventList<U> getModelList()
Specified by:
getModelList in interface ObservableModel<U>

getPropertyChangeListeners

public List<PropertyChangeListener> getPropertyChangeListeners()
Description copied from interface: Observable
Returns a list of PropertyChangeListener objects

Specified by:
getPropertyChangeListeners in interface Observable
Returns:
PropertyChangeListener list

getSelectedElementAdapter

public BeanAdapter<U> getSelectedElementAdapter()
Specified by:
getSelectedElementAdapter in interface ObservableModel<U>

getSelectedItem

public Object getSelectedItem()
Specified by:
getSelectedItem in interface ComboBoxModel

getSize

public int getSize()
Specified by:
getSize in interface ListModel

insertElementAt

public void insertElementAt(Object obj,
                            int index)
Specified by:
insertElementAt in interface MutableComboBoxModel

removeElement

public void removeElement(Object obj)
Specified by:
removeElement in interface MutableComboBoxModel

removeElementAt

public void removeElementAt(int index)
Specified by:
removeElementAt in interface MutableComboBoxModel

removeListDataListener

public void removeListDataListener(ListDataListener l)
Specified by:
removeListDataListener in interface ListModel

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener listener)
Description copied from interface: Observable
This method removes listeners registering all modifications made to registered properties.

Specified by:
removePropertyChangeListener in interface Observable

setModelList

public void setModelList(EventList<U> modelList)
Specified by:
setModelList in interface ObservableModel<U>

setSelectedItem

public void setSelectedItem(Object anItem)
Specified by:
setSelectedItem in interface ComboBoxModel


Copyright © 2010. All Rights Reserved.