|
|||||||||||
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
The model for a list that Mbases contains. The state of the MBase is still kept in the Mbase itself. This list is only to be used as the model for some GUI element like UMLLinkedList
Field Summary | |
protected boolean |
_buildingModel
Flag to indicate wether the model is being build |
protected boolean |
_fireListEvents
Flag to indicate wether list events should be fired |
protected java.lang.Object |
_target
|
Fields inherited from class javax.swing.AbstractListModel |
listenerList |
Constructor Summary | |
UMLModelElementListModel2()
Constructor to be used if the subclass does not depend on the MELementListener methods and setTarget method implemented in this class |
|
UMLModelElementListModel2(java.lang.String eventName)
Constructor for UMLModelElementListModel2. |
Method Summary | |
protected void |
addAll(java.util.Collection col)
Utility method to add a collection of elements to the model |
void |
addElement(java.lang.Object obj)
|
protected abstract void |
buildModelList()
Builds the list of elements. |
boolean |
contains(java.lang.Object elem)
|
protected void |
fireContentsChanged(java.lang.Object source,
int index0,
int index1)
|
protected void |
fireIntervalAdded(java.lang.Object source,
int index0,
int index1)
|
protected void |
fireIntervalRemoved(java.lang.Object source,
int index0,
int index1)
|
protected java.lang.Object |
getChangedElement(ru.novosoft.uml.MElementEvent e)
Utility method to get the changed element from some event e |
protected java.lang.Object |
getTarget()
Utility method to get the target. |
protected abstract boolean |
isValidElement(ru.novosoft.uml.MBase element)
Returns true if the given element is valid, i.e. |
protected boolean |
isValidEvent(ru.novosoft.uml.MElementEvent e)
Returns true if some event is valid. |
void |
listRoleItemSet(ru.novosoft.uml.MElementEvent e)
|
void |
propertySet(ru.novosoft.uml.MElementEvent e)
|
void |
recovered(ru.novosoft.uml.MElementEvent e)
|
void |
removed(ru.novosoft.uml.MElementEvent e)
|
void |
roleAdded(ru.novosoft.uml.MElementEvent e)
|
void |
roleRemoved(ru.novosoft.uml.MElementEvent e)
|
protected void |
setAllElements(java.util.Collection col)
Utility method to set the elements of this list to the contents of the given collection. |
protected void |
setEventName(java.lang.String eventName)
Sets the eventName. |
void |
setTarget(java.lang.Object target)
Sets the target. |
void |
targetAdded(TargetEvent e)
Fired when a target is added to the list of targets. |
void |
targetRemoved(TargetEvent e)
Fired when a target is removed from the list of targets |
void |
targetSet(TargetEvent e)
Fired when a total new set of targets is set |
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 |
Field Detail |
protected java.lang.Object _target
protected boolean _fireListEvents
protected boolean _buildingModel
Constructor Detail |
public UMLModelElementListModel2(java.lang.String eventName)
public UMLModelElementListModel2()
Method Detail |
public void listRoleItemSet(ru.novosoft.uml.MElementEvent e)
listRoleItemSet
in interface ru.novosoft.uml.MElementListener
MElementListener.listRoleItemSet(ru.novosoft.uml.MElementEvent)
public void propertySet(ru.novosoft.uml.MElementEvent e)
propertySet
in interface ru.novosoft.uml.MElementListener
MElementListener.propertySet(ru.novosoft.uml.MElementEvent)
public void recovered(ru.novosoft.uml.MElementEvent e)
recovered
in interface ru.novosoft.uml.MElementListener
MElementListener.recovered(ru.novosoft.uml.MElementEvent)
public void removed(ru.novosoft.uml.MElementEvent e)
removed
in interface ru.novosoft.uml.MElementListener
MElementListener.removed(ru.novosoft.uml.MElementEvent)
public void roleAdded(ru.novosoft.uml.MElementEvent e)
roleAdded
in interface ru.novosoft.uml.MElementListener
MElementListener.roleAdded(ru.novosoft.uml.MElementEvent)
public void roleRemoved(ru.novosoft.uml.MElementEvent e)
roleRemoved
in interface ru.novosoft.uml.MElementListener
MElementListener.roleRemoved(ru.novosoft.uml.MElementEvent)
protected abstract void buildModelList()
protected void setAllElements(java.util.Collection col)
col
- protected void addAll(java.util.Collection col)
col
- protected java.lang.Object getTarget()
protected java.lang.Object getChangedElement(ru.novosoft.uml.MElementEvent e)
e
-
public boolean contains(java.lang.Object elem)
DefaultListModel.contains(java.lang.Object)
public void setTarget(java.lang.Object target)
target
- protected abstract boolean isValidElement(ru.novosoft.uml.MBase element)
element
- protected boolean isValidEvent(ru.novosoft.uml.MElementEvent e)
e
-
public void addElement(java.lang.Object obj)
DefaultListModel.addElement(java.lang.Object)
protected void setEventName(java.lang.String eventName)
eventName
- The eventName to setpublic void targetAdded(TargetEvent e)
TargetListener
targetAdded
in interface TargetListener
e
- The targetevent, name will be TARGET_ADDEDTargetListener.targetAdded(org.argouml.ui.targetmanager.TargetEvent)
public void targetRemoved(TargetEvent e)
TargetListener
targetRemoved
in interface TargetListener
e
- The targetevent, name will be TARGET_REMOVEDTargetListener.targetRemoved(org.argouml.ui.targetmanager.TargetEvent)
public void targetSet(TargetEvent e)
TargetListener
targetSet
in interface TargetListener
e
- The targetevent, name will be TARGET_SETTargetListener.targetSet(org.argouml.ui.targetmanager.TargetEvent)
protected void fireContentsChanged(java.lang.Object source, int index0, int index1)
AbstractListModel.fireContentsChanged(java.lang.Object, int, int)
protected void fireIntervalAdded(java.lang.Object source, int index0, int index1)
AbstractListModel.fireIntervalAdded(java.lang.Object, int, int)
protected void fireIntervalRemoved(java.lang.Object source, int index0, int index1)
AbstractListModel.fireIntervalRemoved(java.lang.Object, int, int)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ArgoUML © 1996-2003 (20030829) | ArgoUML Project Home | ArgoUML Cookbook |