org.argouml.uml.ui
Class UMLMultiplicityComboBoxModel
java.lang.Object
|
+--javax.swing.AbstractListModel
|
+--org.argouml.uml.ui.UMLComboBoxModel2
|
+--org.argouml.uml.ui.UMLMultiplicityComboBoxModel
- All Implemented Interfaces:
- javax.swing.ComboBoxModel, java.util.EventListener, javax.swing.ListModel, java.io.Serializable, TargetListener
- Direct Known Subclasses:
- UMLStructuralFeatureMultiplicityComboBoxModel
- public abstract class UMLMultiplicityComboBoxModel
- extends UMLComboBoxModel2
A model for multiplicities. This model is instantiated with a few default
values.
- Since:
- Jan 5, 2003
- See Also:
- Serialized Form
Fields inherited from class javax.swing.AbstractListModel |
listenerList |
Method Summary |
void |
addElement(java.lang.Object o)
|
protected void |
buildModelList()
Builds the list of elements and sets the selectedIndex to the currently
selected item if there is one. |
protected boolean |
isValidElement(java.lang.Object element)
Returns true if the given element is valid, i.e. |
void |
setSelectedItem(java.lang.Object anItem)
|
Methods inherited from class org.argouml.uml.ui.UMLComboBoxModel2 |
addAll, contains, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, getChangedElement, getElementAt, getIndexOf, getSelectedItem, getSelectedModelElement, getSize, getTarget, isValidEvent, listRoleItemSet, propertySet, recovered, removeAll, removeAllElements, removed, removeElement, roleAdded, roleRemoved, setElements, setTarget, targetAdded, targetRemoved, targetSet |
Methods inherited from class javax.swing.AbstractListModel |
addListDataListener, 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, removeListDataListener |
multiplicityList
private static java.util.List multiplicityList
UMLMultiplicityComboBoxModel
public UMLMultiplicityComboBoxModel(java.lang.String propertySetName)
- Constructor for UMLMultiplicityComboBoxModel.
- Parameters:
propertySetName
-
isValidElement
protected boolean isValidElement(java.lang.Object element)
- Description copied from class:
UMLComboBoxModel2
- Returns true if the given element is valid, i.e. it may be added to the
list of elements.
- Specified by:
isValidElement
in class UMLComboBoxModel2
- Parameters:
element
- - See Also:
UMLComboBoxModel2.isValidElement(Object)
buildModelList
protected void buildModelList()
- Description copied from class:
UMLComboBoxModel2
- Builds the list of elements and sets the selectedIndex to the currently
selected item if there is one. Called from targetChanged every time the
target of the proppanel is changed.
- Specified by:
buildModelList
in class UMLComboBoxModel2
- See Also:
UMLComboBoxModel2.buildModelList()
addElement
public void addElement(java.lang.Object o)
- Overrides:
addElement
in class UMLComboBoxModel2
- See Also:
UMLComboBoxModel2.addElement(java.lang.Object)
setSelectedItem
public void setSelectedItem(java.lang.Object anItem)
- Specified by:
setSelectedItem
in interface javax.swing.ComboBoxModel
- Overrides:
setSelectedItem
in class UMLComboBoxModel2
- See Also:
ComboBoxModel.setSelectedItem(java.lang.Object)