org.argouml.uml.ui.foundation.core
Class UMLModelElementNamespaceComboBoxModel
java.lang.Object
javax.swing.AbstractListModel
org.argouml.uml.ui.UMLComboBoxModel2
org.argouml.uml.ui.foundation.core.UMLModelElementNamespaceComboBoxModel
- All Implemented Interfaces:
- javax.swing.ComboBoxModel, java.util.EventListener, javax.swing.ListModel, ru.novosoft.uml.MElementListener, java.io.Serializable, TargetListener
- public class UMLModelElementNamespaceComboBoxModel
- extends UMLComboBoxModel2
A model for a namespace combo box,
$Id: UMLModelElementNamespaceComboBoxModel.java,v 1.9 2003/08/10 14:51:38 linus Exp $
- Since:
- Oct 10, 2002
- See Also:
- Serialized Form
Fields inherited from class javax.swing.AbstractListModel |
listenerList |
Method Summary |
protected void |
buildModelList()
Builds the list of elements and sets the selectedIndex to the currently
selected item if there is one. |
protected java.lang.Object |
getSelectedModelElement()
Gets the modelelement that is selected in the NSUML model. |
protected boolean |
isValidElement(java.lang.Object o)
Returns true if the given element is valid, i.e. |
Methods inherited from class org.argouml.uml.ui.UMLComboBoxModel2 |
addAll, addElement, contains, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, getChangedElement, getElementAt, getIndexOf, getSelectedItem, getSize, getTarget, isValidEvent, listRoleItemSet, propertySet, recovered, removeAll, removeAllElements, removed, removeElement, roleAdded, roleRemoved, setElements, setSelectedItem, 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 |
UMLModelElementNamespaceComboBoxModel
public UMLModelElementNamespaceComboBoxModel()
- Constructor for UMLModelElementNamespaceComboBoxModel.
isValidElement
protected boolean isValidElement(java.lang.Object o)
- 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:
o
- - See Also:
org.argouml.uml.ui.UMLComboBoxModel2#isValidElement(ru.novosoft.uml.MBase)
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()
getSelectedModelElement
protected java.lang.Object getSelectedModelElement()
- Description copied from class:
UMLComboBoxModel2
- Gets the modelelement that is selected in the NSUML model. For example,
say that this ComboBoxmodel contains all namespaces (as in UMLNamespaceComboBoxmodel)
, this method should return the namespace that owns the target then.
- Specified by:
getSelectedModelElement
in class UMLComboBoxModel2
- Returns:
- Object
- See Also:
UMLComboBoxModel2.getSelectedModelElement()