net.sf.jguiraffe.gui.platform.swing.builder.components
Class SwingEditableComboBoxHandler

java.lang.Object
  extended by net.sf.jguiraffe.gui.platform.swing.builder.components.SwingComponentHandler
      extended by net.sf.jguiraffe.gui.platform.swing.builder.components.SwingListModelHandler
          extended by net.sf.jguiraffe.gui.platform.swing.builder.components.SwingComboBoxHandler
              extended by 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

Constructor Summary
SwingEditableComboBoxHandler(javax.swing.JComboBox combo, ListModel model)
          Creates a new instance of SwingEditableComboBoxHandler.
 
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.SwingComboBoxHandler
actionPerformed, getComboBox, initComponentModel, registerChangeListener, unregisterChangeListener
 
Methods inherited from class net.sf.jguiraffe.gui.platform.swing.builder.components.SwingListModelHandler
addItem, createSwingListModel, getListModel, getType, removeItem
 
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
 
Methods inherited from interface net.sf.jguiraffe.gui.forms.ComponentHandler
getComponent, getOuterComponent, isEnabled, setEnabled
 

Constructor Detail

SwingEditableComboBoxHandler

public SwingEditableComboBoxHandler(javax.swing.JComboBox combo,
                                    ListModel model)
Creates a new instance of SwingEditableComboBoxHandler.

Parameters:
combo - the managed combo box
model - the list model
Method Detail

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.