net.sf.jguiraffe.gui.platform.swing.builder.components
Class SwingEditableComboBoxHandler
java.lang.Object
net.sf.jguiraffe.gui.platform.swing.builder.components.SwingComponentHandler
net.sf.jguiraffe.gui.platform.swing.builder.components.SwingListModelHandler
net.sf.jguiraffe.gui.platform.swing.builder.components.SwingComboBoxHandler
net.sf.jguiraffe.gui.platform.swing.builder.components.SwingEditableComboBoxHandler
- All Implemented Interfaces:
- java.awt.event.ActionListener, java.util.EventListener, ListComponentHandler, ComponentHandler, SwingEventSource
class SwingEditableComboBoxHandler
- extends SwingComboBoxHandler
A specific Swing component handler implementation that deals with editable
combo boxes.
An editable combo box is different from a default one in that it allows to
enter data that is not part of its list model. The getData()
and setData() must take this into account. The component's
data type is still derived from the list model, but in most cases this should
be String.
- Version:
- $Id: SwingEditableComboBoxHandler.java 71 2007-06-16 20:47:48Z oheger $
- Author:
- Oliver Heger
|
Method Summary |
java.lang.Object |
getData()
Returns this component's data. |
void |
setData(java.lang.Object data)
Sets the component's data. |
| Methods inherited from class net.sf.jguiraffe.gui.platform.swing.builder.components.SwingComponentHandler |
addActionListener, addChangeListener, addFocusListener, fireChangeEvent, getComponent, getJComponent, getOuterComponent, isEnabled, removeActionListener, removeChangeListener, removeFocusListener, setEnabled |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SwingEditableComboBoxHandler
public SwingEditableComboBoxHandler(javax.swing.JComboBox combo,
ListModel model)
- Creates a new instance of
SwingEditableComboBoxHandler.
- Parameters:
combo - the managed combo boxmodel - the list model
getData
public java.lang.Object getData()
- Returns this component's data. This is the data in the combo box's text
field.
- Specified by:
getData in interface ComponentHandler- Overrides:
getData in class SwingComboBoxHandler
- Returns:
- the component's data
setData
public void setData(java.lang.Object data)
- Sets the component's data.
- Specified by:
setData in interface ComponentHandler- Overrides:
setData in class SwingComboBoxHandler
- Parameters:
data - the new data
Copyright 2007 null. All Rights Reserved.