|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.swing.AbstractListModel | +--org.argouml.uml.ui.UMLModelElementListModel
UMLModelElementListModel2
,
this class is part of the 'old'(pre 0.13.*) implementation of proppanels
that used reflection a lot.
This class is an abstract superclass for classes that provide a list of UML model elements.
Field Summary | |
---|---|
private UMLUserInterfaceContainer |
_container
Deprecated. The container that provides the "target" model element. |
private int |
_currentModelElementSize
Deprecated. The number of actual entries in the list. |
private java.lang.String |
_none
Deprecated. The string used to indicate no actual entries in the list. |
private java.lang.String |
_property
Deprecated. A string indicating an NSUML event name that indicates that list may need to be updated. |
private boolean |
_recalcSize
Deprecated. Set to true when an event suggests that the size needs to be recalculated. |
private boolean |
_showNone
Deprecated. If "true" then a list entry (typically labelled "none") will be displayed when there are no actual entries in the list. |
protected int |
_upper
Deprecated. upper bound of length of list. |
int |
NO_LIMIT
Deprecated. |
Fields inherited from class javax.swing.AbstractListModel |
---|
listenerList |
Constructor Summary | |
---|---|
UMLModelElementListModel(UMLUserInterfaceContainer container,
java.lang.String property,
boolean showNone)
Deprecated. Creates a new list model. |
Method Summary | |
---|---|
static java.util.List |
addAtUtil(java.util.Collection oldCollection,
java.lang.Object newItem,
int index)
Deprecated. This utility function may be called in the implemention of an Add action. |
boolean |
buildPopup(javax.swing.JPopupMenu popup,
int index)
Deprecated. This method builds a context (pop-up) menu for the list. |
void |
delete(int index)
Deprecated. Standard delete method. |
static MModelElement |
elementAtUtil(java.util.Collection collection,
int index,
java.lang.Class requiredClass)
Deprecated. This utility function may be called in the implemention of getElementAt. |
java.lang.Object |
formatElement(java.lang.Object element)
Deprecated. This method returns a rendering (typically a String) of the model element for the list. |
protected UMLUserInterfaceContainer |
getContainer()
Deprecated. This method returns the container passed as an argument to the constructor |
NotationName |
getContextNotation()
Deprecated. Gives a notation name, so subclasses can use the Notation package. |
java.lang.Object |
getElementAt(int index)
Deprecated. This method returns an object (typically a String) to represent a particular element in this list (including any element for "none"). |
protected abstract MModelElement |
getModelElementAt(int index)
Deprecated. This method returns the model element that corresponds to to the specific index. |
protected int |
getModelElementSize()
Deprecated. Determines the number of "actual" entries in the list. |
java.lang.String |
getProperty()
Deprecated. Returns NSUML event name that is monitored, may be null. |
int |
getSize()
Deprecated. This method returns the size of the list (including any element for none). |
protected java.lang.Object |
getTarget()
Deprecated. This method returns the current "target" of the container. |
int |
getUpperBound()
Deprecated. |
void |
listRoleItemSet(MElementEvent p1)
Deprecated. |
static java.util.List |
moveDownUtil(java.util.Collection oldCollection,
int index)
Deprecated. This utility function may be called in the implemention of an MoveDown action. |
static java.util.Collection |
moveUpUtil(java.util.Collection oldCollection,
int index)
Deprecated. This utility function may be called in the implemention of an MoveUp action. |
void |
navigateTo(java.lang.Object modelElement)
Deprecated. TODO: by whom? When? Why? What is this replaced by? |
void |
open(int index)
Deprecated. This method is called in response to selecting "Open" from a context (pop-up) menu on this list. |
void |
propertySet(MElementEvent p1)
Deprecated. |
protected abstract int |
recalcModelElementSize()
Deprecated. This method is called from getModelElementSize when the list size has been marked as invalid. |
void |
recovered(MElementEvent p1)
Deprecated. |
void |
removed(MElementEvent p1)
Deprecated. |
void |
resetSize()
Deprecated. Called when an external event may have changed the size of the list to force recalculation of list size. |
void |
roleAdded(MElementEvent event)
Deprecated. |
void |
roleRemoved(MElementEvent event)
Deprecated. |
void |
setUpperBound(int newBound)
Deprecated. |
void |
targetChanged()
Deprecated. This method is called when the target of a UMLUserInterfaceContainer has been changed. |
void |
targetReasserted()
Deprecated. This method is called when the navigation history has been changed (and navigation buttons may need to be updated). |
Methods inherited from class javax.swing.AbstractListModel |
---|
addListDataListener, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, getListDataListeners, getListeners, removeListDataListener |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private UMLUserInterfaceContainer _container
private boolean _showNone
private int _currentModelElementSize
private boolean _recalcSize
private java.lang.String _property
private java.lang.String _none
protected int _upper
public final int NO_LIMIT
Constructor Detail |
public UMLModelElementListModel(UMLUserInterfaceContainer container, java.lang.String property, boolean showNone)
container
- the container (typically a PropPanelClass or
PropPanelInterface) 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.Method Detail |
public int getUpperBound()
public void setUpperBound(int newBound)
public void resetSize()
public final java.lang.String getProperty()
protected final int getModelElementSize()
protected abstract int recalcModelElementSize()
protected abstract MModelElement getModelElementAt(int index)
index
- index of model element (zero based).
protected final java.lang.Object getTarget()
protected final UMLUserInterfaceContainer getContainer()
public int getSize()
getSize
in interface javax.swing.ListModel
getModelElementSize()
public java.lang.Object getElementAt(int index)
getElementAt
in interface javax.swing.ListModel
index
- index for element (zero-based)
getModelElementAt(int)
,
formatElement(java.lang.Object)
public java.lang.Object formatElement(java.lang.Object element)
element
- model element
public void targetChanged()
UMLUserInterfaceComponent
targetChanged
in interface UMLUserInterfaceComponent
UMLUserInterfaceComponent.targetChanged()
public void targetReasserted()
UMLUserInterfaceComponent
targetReasserted
in interface UMLUserInterfaceComponent
public void roleAdded(MElementEvent event)
ru.novosoft.uml.MElementListener#roleAdded(MElementEvent)
public void roleRemoved(MElementEvent event)
public void recovered(MElementEvent p1)
public void listRoleItemSet(MElementEvent p1)
public void removed(MElementEvent p1)
public void propertySet(MElementEvent p1)
public void navigateTo(java.lang.Object modelElement)
modelElement
- model element to displaypublic void open(int index)
index
- index of item to open (zero-based).public boolean buildPopup(javax.swing.JPopupMenu popup, int index)
popup
- popup menuindex
- index of selected list item
public static java.util.List addAtUtil(java.util.Collection oldCollection, java.lang.Object newItem, int index)
Historically this took as argument and returned result of type Collection
. However this is not specifically an ordered
interface. The current version returns a result of type List
, which is the ordered sub-interface of
Collection. This will keep some NSUML routines (which have ordered
arguments, and expect a List object) happy.
Note. There are two List types in Java (the other is part of awt). This is java.util.List.
For compatibility with existing code, the argument is left as type
Collection
, although it would be wise to always use
List
in new code.
oldCollection
- old collectionnewItem
- element to add to collectionindex
- position of element in new collection
public static java.util.Collection moveUpUtil(java.util.Collection oldCollection, int index)
oldCollection
- old collectionindex
- index of element to move up.
public static java.util.List moveDownUtil(java.util.Collection oldCollection, int index)
oldCollection
- old collectionindex
- index of element to move down.
public static MModelElement elementAtUtil(java.util.Collection collection, int index, java.lang.Class requiredClass)
collection
- old collectionindex
- index of element to move down.
public NotationName getContextNotation()
Gives a notation name, so subclasses can use the Notation package.
This default implementation simply requests the default notation.
getContextNotation
in interface NotationContext
null
, meaning use the default notation.public void delete(int index)
index
-
|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ArgoUML © 1996-2004 (20040306) | ArgoUML Homepage | ArgoUML Developers' page | ArgoUML Cookbook |