|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.AbstractListModel
org.objectweb.jac.aspects.gui.LessAbstractListModel
org.objectweb.jac.aspects.gui.ComboBoxModel
This is an abstract representation of a combo box.
Field Summary |
Fields inherited from class javax.swing.AbstractListModel |
listenerList |
Constructor Summary | |
ComboBoxModel()
The constructor for an independent combobox model. |
|
ComboBoxModel(CollectionItem collection,
Object substance)
The constructor for a combobox model that is linked to a collection (values will be consistent). |
Method Summary | |
void |
addObject(Object object,
String label)
Adds an object in the combo box. |
Object |
getSelectedItem()
Returns the currently selected object of the combo (same as getSelectedObject ). |
Object |
getSelectedObject()
Returns the currently selected object of the combo (same as getSelectedItem ). |
ClassItem |
getType()
Returns the type of the elements contained in the combo box. |
void |
setSelectedItem(Object object)
Sets the selected object by it's name. |
void |
setSelectedObject(Object object)
Sets the selected object |
void |
setType(ClassItem type)
Set the type of elements contained in the combo box. |
Methods inherited from class org.objectweb.jac.aspects.gui.LessAbstractListModel |
addObject, close, getCollection, getElementAt, getObject, getRowCount, getSize, indexOf, isCellEditable, objectUpdated, onAdd, onChange, onRemove, setNullLabel, sort, unregisterViews |
Methods inherited from class javax.swing.AbstractListModel |
addListDataListener, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, getListDataListeners, getListeners, removeListDataListener |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.swing.ListModel |
addListDataListener, getElementAt, getSize, removeListDataListener |
Constructor Detail |
public ComboBoxModel()
public ComboBoxModel(CollectionItem collection, Object substance)
collection
- the substance collectionsubstance
- the object that holds the collection's valueMethod Detail |
public void addObject(Object object, String label)
addObject
in class LessAbstractListModel
object
- the new objectlabel
- the associated labelLessAbstractListModel.addObject(Object)
public Object getSelectedItem()
getSelectedObject
).
getSelectedItem
in interface ComboBoxModel
public void setSelectedItem(Object object)
setSelectedItem
in interface ComboBoxModel
object
- name of the object to select (should be a String)setSelectedObject(Object)
public void setSelectedObject(Object object)
object
- the object to selectsetSelectedItem(Object)
public Object getSelectedObject()
getSelectedItem
).
public void setType(ClassItem type)
ObjectChooserModel
setType
in interface ObjectChooserModel
public ClassItem getType()
ObjectChooserModel
getType
in interface ObjectChooserModel
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |