|
||||||||||
| 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
abstract class SwingListModelHandler
An abstract base class for Swing component handlers that deal with list models.
This class provides basic functionality for managing a list model. It will
act as the base class for specific handler implementations that wrap Swing
list-like components like JList or JComboBox.
| Constructor Summary | |
|---|---|
protected |
SwingListModelHandler(javax.swing.JComponent component,
ListModel listModel)
Creates a new instance of SwingListModelHandler and sets
the managed component and the original list model. |
| Method Summary | |
|---|---|
void |
addItem(int index,
java.lang.Object display,
java.lang.Object value)
Adds an item to the list model of this component. |
protected SwingListModel |
createSwingListModel(ListModel m)
Creates the Swing specific list model from the given source model. |
ListModel |
getListModel()
Returns the list model for this component. |
java.lang.Class |
getType()
Returns this component's data type. |
protected abstract void |
initComponentModel(SwingListModel model)
Initializes the list model for the managed component. |
void |
removeItem(int index)
Removes the item with the given index from the list model of this component. |
| Methods inherited from class net.sf.jguiraffe.gui.platform.swing.builder.components.SwingComponentHandler |
|---|
addActionListener, addChangeListener, addFocusListener, fireChangeEvent, getComponent, getJComponent, getOuterComponent, isEnabled, registerChangeListener, removeActionListener, removeChangeListener, removeFocusListener, setEnabled, unregisterChangeListener |
| 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, getData, getOuterComponent, isEnabled, setData, setEnabled |
| Constructor Detail |
|---|
protected SwingListModelHandler(javax.swing.JComponent component,
ListModel listModel)
SwingListModelHandler and sets
the managed component and the original list model.
component - the component to managelistModel - the original list model; this class will copy this list
model's data into a new list model that can also be used by Swing
components| Method Detail |
|---|
public ListModel getListModel()
getListModel in interface ListComponentHandler
public void addItem(int index,
java.lang.Object display,
java.lang.Object value)
addItem in interface ListComponentHandlerindex - the index of the new itemdisplay - the display objectvalue - the value objectpublic void removeItem(int index)
removeItem in interface ListComponentHandlerindex - the indexpublic java.lang.Class getType()
getType in interface ComponentHandlerprotected SwingListModel createSwingListModel(ListModel m)
m - the original list model
protected abstract void initComponentModel(SwingListModel model)
model - the Swing list model
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||