|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.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
class SwingComboBoxHandler
A specific Swing component handler implementation that deals with combo boxes.
This class manages a JComboBox component, which is not
editable. The specified ListModel is used to transform the
combo box's selected index into a value object.
| Constructor Summary | |
|---|---|
SwingComboBoxHandler(javax.swing.JComboBox combo,
ListModel m)
Creates a new instance of SwingComboBoxHandler and
initializes it. |
|
| Method Summary | |
|---|---|
void |
actionPerformed(java.awt.event.ActionEvent event)
Callback for action events. |
javax.swing.JComboBox |
getComboBox()
Returns the managed combo box. |
java.lang.Object |
getData()
Returns this component's data. |
protected void |
initComponentModel(SwingListModel model)
Initializes the combo box with the given list model. |
protected void |
registerChangeListener()
Registers this component handler as a change listener at the managed component. |
void |
setData(java.lang.Object data)
Sets the data of this component. |
protected void |
unregisterChangeListener()
Unregisters this component as change listener from the managed component. |
| 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 |
|---|
public SwingComboBoxHandler(javax.swing.JComboBox combo,
ListModel m)
SwingComboBoxHandler and
initializes it.
combo - the combo boxm - the list model for the combo box| Method Detail |
|---|
public javax.swing.JComboBox getComboBox()
protected void registerChangeListener()
registerChangeListener in class SwingComponentHandlerprotected void unregisterChangeListener()
unregisterChangeListener in class SwingComponentHandlerSwingComponentHandler.registerChangeListener()public java.lang.Object getData()
getData in interface ComponentHandlerpublic void setData(java.lang.Object data)
setData in interface ComponentHandlerdata - the new data (which should be an item of the list model)public void actionPerformed(java.awt.event.ActionEvent event)
actionPerformed in interface java.awt.event.ActionListenerevent - the eventprotected void initComponentModel(SwingListModel model)
initComponentModel in class SwingListModelHandlermodel - the list model
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||