org.argouml.uml.ui
Class UMLClassifiersListModel
java.lang.Object
|
+--javax.swing.AbstractListModel
|
+--org.argouml.uml.ui.UMLModelElementListModel
|
+--org.argouml.uml.ui.UMLModelElementCachedListModel
|
+--org.argouml.uml.ui.UMLOwnedElementListModel
|
+--org.argouml.uml.ui.UMLClassifiersListModel
- All Implemented Interfaces:
- java.util.EventListener, javax.swing.ListModel, ru.novosoft.uml.MElementListener, NotationContext, java.io.Serializable, UMLUserInterfaceComponent
- public class UMLClassifiersListModel
- extends UMLOwnedElementListModel
This class implements a list model for the subpackages of a package.
Used with a UMLList to display a list of attributes. Since packages
may be mixed with other model elements,
this class implements a cache of packages that are kept synchronized
with the owned elements.
- See Also:
UMLModelElementListModel
,
UMLList
, Serialized Form
Fields inherited from class javax.swing.AbstractListModel |
listenerList |
Methods inherited from class org.argouml.uml.ui.UMLModelElementCachedListModel |
addElement, buildCache, getModelElementAt, listRoleItemSet, propertySet, recalcModelElementSize, recovered, removed, roleAdded, roleRemoved, swap, targetChanged |
Methods inherited from class org.argouml.uml.ui.UMLModelElementListModel |
addAtUtil, elementAtUtil, formatElement, getContainer, getContextNotation, getElementAt, getModelElementSize, getProperty, getSize, getTarget, getUpperBound, moveDownUtil, moveUpUtil, navigateTo, open, resetSize, setUpperBound, targetReasserted |
Methods inherited from class javax.swing.AbstractListModel |
addListDataListener, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, getListeners, removeListDataListener |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UMLClassifiersListModel
public UMLClassifiersListModel(UMLUserInterfaceContainer container,
java.lang.String property,
boolean showNone)
- Creates a new packages list model
- Parameters:
container
- the container (typically a PropPanelPackage)
that provides access to the target classifier.property
- a string that specifies the name of an event that should force a refresh
of the list model. A null value will cause all events to trigger a refresh.showNone
- if true, an element labelled "none" will be shown where there are
no actual entries in the list.
isProperClass
public boolean isProperClass(java.lang.Object obj)
- Called to determine if a particular feature of the underlying collection
should be in the cached list of model elements.
- Overrides:
isProperClass
in class UMLOwnedElementListModel
- Parameters:
obj
- object to be considered.- Returns:
- true if object is appropriate for this list.
buildPopup
public boolean buildPopup(javax.swing.JPopupMenu popup,
int index)
- This method builds a context (pop-up) menu for the list. This method
may be overriden for lists that have additional menu items or when
the default list of actions is inappropriate.
- Overrides:
buildPopup
in class UMLModelElementListModel
- Parameters:
popup
- popup menuindex
- index of selected list item- Returns:
- "true" if popup menu should be displayed
addDatatype
public void addDatatype(int index)
addClass
public void addClass(int index)
addInterface
public void addInterface(int index)
addException
public void addException(int index)
addSignal
public void addSignal(int index)
createModelElement
public ru.novosoft.uml.foundation.core.MModelElement createModelElement()
addActor
public void addActor(int index)
addUseCase
public void addUseCase(int index)