org.argouml.uml.ui
Class UMLClientDependencyListModel
java.lang.Object
|
+--javax.swing.AbstractListModel
|
+--org.argouml.uml.ui.UMLModelElementListModel
|
+--org.argouml.uml.ui.UMLClientDependencyListModel
- All Implemented Interfaces:
- java.util.EventListener, javax.swing.ListModel, ru.novosoft.uml.MElementListener, NotationContext, java.io.Serializable, UMLUserInterfaceComponent
- public class UMLClientDependencyListModel
- extends UMLModelElementListModel
- See Also:
- Serialized Form
Fields inherited from class javax.swing.AbstractListModel |
listenerList |
Method Summary |
void |
add(int index)
Add a new abstraction relationship.
Current implementation cures an earlier bug, which set both ends of
the NSUML object, thereby effectively adding the dependency twice (if
you add one end, NSUML does the other for you. |
boolean |
buildPopup(javax.swing.JPopupMenu popup,
int index)
This method builds a context (pop-up) menu for the list. |
void |
delete(int index)
Standard delete method. |
java.lang.Object |
formatElement(ru.novosoft.uml.foundation.core.MModelElement element)
This method returns a rendering (typically a String) of the model element for the list.
|
protected ru.novosoft.uml.foundation.core.MModelElement |
getModelElementAt(int index)
This method returns the model element that corresponds to
to the specific index. |
void |
moveDown(int index)
|
void |
moveUp(int index)
|
protected int |
recalcModelElementSize()
This method is called from getModelElementSize
when the list size has been marked as invalid. |
Methods inherited from class org.argouml.uml.ui.UMLModelElementListModel |
addAtUtil, elementAtUtil, getContainer, getContextNotation, getElementAt, getModelElementSize, getProperty, getSize, getTarget, getUpperBound, listRoleItemSet, moveDownUtil, moveUpUtil, navigateTo, open, propertySet, recovered, removed, resetSize, roleAdded, roleRemoved, setUpperBound, targetChanged, 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 |
UMLClientDependencyListModel
public UMLClientDependencyListModel(UMLUserInterfaceContainer container,
java.lang.String property,
boolean showNone)
recalcModelElementSize
protected int recalcModelElementSize()
- Description copied from class:
UMLModelElementListModel
- This method is called from getModelElementSize
when the list size has been marked as invalid.
- Overrides:
recalcModelElementSize
in class UMLModelElementListModel
- Following copied from class:
org.argouml.uml.ui.UMLModelElementListModel
- Returns:
- number of "actual" list entries.
getModelElementAt
protected ru.novosoft.uml.foundation.core.MModelElement getModelElementAt(int index)
- Description copied from class:
UMLModelElementListModel
- This method returns the model element that corresponds to
to the specific index. Called from getElementAt which handles
entries for "none" and formatting of elements.
- Overrides:
getModelElementAt
in class UMLModelElementListModel
- Following copied from class:
org.argouml.uml.ui.UMLModelElementListModel
- Parameters:
index
- index of model element (zero based).- Returns:
- corresponding model element
formatElement
public java.lang.Object formatElement(ru.novosoft.uml.foundation.core.MModelElement element)
- Description copied from class:
UMLModelElementListModel
- This method returns a rendering (typically a String) of the model element for the list.
Default implementation defers to the current Profile of the container, but this
method may be overriden.
- Overrides:
formatElement
in class UMLModelElementListModel
- Following copied from class:
org.argouml.uml.ui.UMLModelElementListModel
- Parameters:
@element
- model element- Returns:
- rendering of the ModelElement
add
public void add(int index)
Add a new abstraction relationship.
Current implementation cures an earlier bug, which set both ends of
the NSUML object, thereby effectively adding the dependency twice (if
you add one end, NSUML does the other for you.
- Parameters:
index
- The index of the item in the list on which this add
operation was invoked.
delete
public void delete(int index)
- Description copied from class:
UMLModelElementListModel
- Standard delete method.
- Overrides:
delete
in class UMLModelElementListModel
- Following copied from class:
org.argouml.uml.ui.UMLModelElementListModel
- Parameters:
index
-
moveUp
public void moveUp(int index)
moveDown
public void moveDown(int index)
buildPopup
public boolean buildPopup(javax.swing.JPopupMenu popup,
int index)
- This method builds a context (pop-up) menu for the list.
- Overrides:
buildPopup
in class UMLModelElementListModel
- Parameters:
popup
- popup menuindex
- index of selected list item- Returns:
- "true" if popup menu should be displayed