|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjavax.swing.AbstractListModel
javax.swing.DefaultListModel
org.argouml.uml.ui.UMLModelElementListModel2
org.argouml.uml.ui.UMLModelElementOrderedListModel2
This class resembles UMLModelElementListModel2, but is for those associations in the metamodel (see UML standard) that have a {ordered} constraint.
This adds the functionality of a popup menu with the items "Move Up" and "Move Down".
| Field Summary |
| Fields inherited from class javax.swing.AbstractListModel |
listenerList |
| Constructor Summary | |
UMLModelElementOrderedListModel2()
The constructor. |
|
UMLModelElementOrderedListModel2(String name)
The constructor. |
|
| Method Summary | |
protected abstract void |
buildModelList()
Builds the list of elements. |
boolean |
buildPopup(JPopupMenu popup,
int index)
Override this if you want a popup menu. |
protected abstract boolean |
isValidElement(Object element)
Returns true if the given element is valid, i.e. |
abstract void |
swap(int index1,
int index2)
This function should swap two elements in the UML model. |
| Methods inherited from class org.argouml.uml.ui.UMLModelElementListModel2 |
addAll, addElement, addOtherModelEventListeners, contains, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, getChangedElement, getTarget, isValidEvent, propertyChange, removeOtherModelEventListeners, setAllElements, setBuildingModel, setEventName, setListTarget, setTarget, targetAdded, targetRemoved, targetSet |
| Methods inherited from class javax.swing.DefaultListModel |
add, capacity, clear, copyInto, elementAt, elements, ensureCapacity, firstElement, get, getElementAt, getSize, indexOf, indexOf, insertElementAt, isEmpty, lastElement, lastIndexOf, lastIndexOf, remove, removeAllElements, removeElement, removeElementAt, removeRange, set, setElementAt, setSize, size, toArray, toString, trimToSize |
| 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, wait, wait, wait |
| Constructor Detail |
public UMLModelElementOrderedListModel2()
public UMLModelElementOrderedListModel2(String name)
name - the name| Method Detail |
protected abstract void buildModelList()
UMLModelElementListModel2
buildModelList in class UMLModelElementListModel2UMLModelElementListModel2.buildModelList()protected abstract boolean isValidElement(Object element)
UMLModelElementListModel2
isValidElement in class UMLModelElementListModel2element - the element to be tested
UMLModelElementListModel2.isValidElement(java.lang.Object)
public abstract void swap(int index1,
int index2)
index1 - the 1st elementindex2 - the 2nd element
public boolean buildPopup(JPopupMenu popup,
int index)
UMLModelElementListModel2
buildPopup in class UMLModelElementListModel2popup - the popup menuindex - the selected item in the list at the moment
the mouse was clicked
UMLModelElementListModel2.buildPopup(
javax.swing.JPopupMenu, int)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
| ArgoUML © 1996-2006 | ArgoUML Homepage | ArgoUML Developers' page | ArgoUML Cookbook |