|
|||||||||||
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 contains Mbases. 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 | |
private boolean |
buildingModel
Flag to indicate wether the model is being build |
private String |
eventName
|
private boolean |
fireListEvents
Flag to indicate wether list events should be fired |
private Object |
listTarget
|
Fields inherited from class javax.swing.DefaultListModel |
|
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(String name)
Constructor for UMLModelElementListModel2. |
Method Summary | |
protected void |
addAll(Collection col)
Utility method to add a collection of elements to the model |
void |
addElement(Object obj)
|
protected abstract void |
buildModelList()
Builds the list of elements. |
boolean |
buildPopup(JPopupMenu popup,
int index)
Override this if you want a popup menu. |
boolean |
contains(Object elem)
|
protected void |
fireContentsChanged(Object source,
int index0,
int index1)
|
protected void |
fireIntervalAdded(Object source,
int index0,
int index1)
|
protected void |
fireIntervalRemoved(Object source,
int index0,
int index1)
|
protected Object |
getChangedElement(ru.novosoft.uml.MElementEvent e)
Utility method to get the changed element from some event e |
(package private) String |
getEventName()
Returns the eventName. |
protected Object |
getTarget()
Utility method to get the target. |
protected abstract boolean |
isValidElement(Object 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(Collection col)
Utility method to set the elements of this list to the contents of the given collection. |
protected void |
setBuildingModel(boolean building)
|
protected void |
setEventName(String theEventName)
Sets the eventName. |
protected void |
setListTarget(Object t)
|
void |
setTarget(Object theNewTarget)
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 |
private String eventName
private Object listTarget
private boolean fireListEvents
private boolean buildingModel
Constructor Detail |
public UMLModelElementListModel2()
public UMLModelElementListModel2(String name)
name
- the name of the event to listen to, which triggers us
to update the list model from the UML dataMethod Detail |
protected void setBuildingModel(boolean building)
building
- The buildingModel to set.protected void setListTarget(Object t)
t
- the list target to setpublic 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(Collection col)
col
- the given collectionprotected void addAll(Collection col)
col
- the given collectionprotected Object getTarget()
protected Object getChangedElement(ru.novosoft.uml.MElementEvent e)
e
- the event
public boolean contains(Object elem)
DefaultListModel.contains(java.lang.Object)
public void setTarget(Object theNewTarget)
theNewTarget
- the new targetprotected abstract boolean isValidElement(Object element)
element
- the element to be tested
protected boolean isValidEvent(ru.novosoft.uml.MElementEvent e)
e
- the event
public void addElement(Object obj)
DefaultListModel.addElement(java.lang.Object)
String getEventName()
protected void setEventName(String theEventName)
theEventName
- The eventName to setpublic void targetAdded(TargetEvent e)
TargetListener
targetAdded
in interface TargetListener
e
- The targetevent, name will be TARGET_ADDEDTargetListener.targetAdded(TargetEvent)
public void targetRemoved(TargetEvent e)
TargetListener
targetRemoved
in interface TargetListener
e
- The targetevent, name will be TARGET_REMOVEDTargetListener.targetRemoved(TargetEvent)
public void targetSet(TargetEvent e)
TargetListener
targetSet
in interface TargetListener
e
- The targetevent, name will be TARGET_SETTargetListener.targetSet(TargetEvent)
protected void fireContentsChanged(Object source, int index0, int index1)
AbstractListModel.fireContentsChanged(
Object, int, int)
protected void fireIntervalAdded(Object source, int index0, int index1)
AbstractListModel.fireIntervalAdded(
Object, int, int)
protected void fireIntervalRemoved(Object source, int index0, int index1)
AbstractListModel.fireIntervalRemoved(
Object, int, int)
public boolean buildPopup(JPopupMenu popup, int index)
popup
- the popup menuindex
- the selected item in the list at the moment
the mouse was clicked
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ArgoUML © 1996-2004 (20050222) | ArgoUML Homepage | ArgoUML Developers' page | ArgoUML Cookbook |