|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.tigris.gef.base.Diagram
org.argouml.ui.ArgoDiagram
org.argouml.uml.diagram.ui.UMLDiagram
This class provides support for writing a UML diagram for argo using the GEF framework.
It adds common buttons, a namespace, capability to delete itself when its namespace is deleted, some help with creating a valid diagram name.
Field Summary | |
protected static javax.swing.Action |
_actionBroom
|
protected static javax.swing.Action |
_actionCircle
|
protected static javax.swing.Action |
_actionInk
|
protected static javax.swing.Action |
_actionLine
|
protected static javax.swing.Action |
_actionPoly
|
protected static javax.swing.Action |
_actionRectangle
|
protected static javax.swing.Action |
_actionRRectangle
|
protected static javax.swing.Action |
_actionSelect
|
protected static javax.swing.Action |
_actionSpline
|
protected static javax.swing.Action |
_actionText
|
protected DiagramInfo |
_diagramName
|
protected ru.novosoft.uml.foundation.core.MNamespace |
_namespace
|
protected static org.apache.log4j.Category |
cat
|
Fields inherited from class org.argouml.ui.ArgoDiagram |
TheInstance |
Fields inherited from class org.tigris.gef.base.Diagram |
_comments, _lay, _name, _toolBar, vetoListeners |
Constructor Summary | |
UMLDiagram()
|
|
UMLDiagram(ru.novosoft.uml.foundation.core.MNamespace ns)
|
|
UMLDiagram(java.lang.String diagramName,
ru.novosoft.uml.foundation.core.MNamespace ns)
|
Method Summary | |
java.lang.Object[] |
getActions()
Return actions available for building toolbar or similar. |
java.lang.String |
getClassAndModelID()
|
ru.novosoft.uml.foundation.core.MNamespace |
getNamespace()
|
ru.novosoft.uml.foundation.core.MModelElement |
getOwner()
|
org.tigris.gef.ui.ToolBar |
getToolBar()
Get the toolbar for the diagram |
protected abstract java.lang.Object[] |
getUmlActions()
Implement on the ancestor to get actions to populate toolbar. |
void |
initialize(java.lang.Object owner)
|
void |
initToolBar()
This is a template method. |
void |
listRoleItemSet(ru.novosoft.uml.MElementEvent e)
not used the UMLDiagram is only interested in the removed() event. |
void |
propertySet(ru.novosoft.uml.MElementEvent e)
not used the UMLDiagram is only interested in the removed() event. |
void |
recovered(ru.novosoft.uml.MElementEvent e)
not used the UMLDiagram is only interested in the removed() event. |
void |
removeAsTarget()
Removes the UMLDiagram and all the figs on it as listener to UmlModelEventPump. |
void |
removed(ru.novosoft.uml.MElementEvent e)
This diagram listens to events from is namespace ModelElement; When the modelelement is removed, we also want to delete this diagram too. |
void |
roleAdded(ru.novosoft.uml.MElementEvent e)
not used the UMLDiagram is only interested in the removed() event. |
void |
roleRemoved(ru.novosoft.uml.MElementEvent e)
not used the UMLDiagram is only interested in the removed() event. |
void |
setAsTarget()
Adds the UMLDiagram and all the figs on it as listener to UmlModelEventPump. |
void |
setName(java.lang.String n)
|
void |
setNamespace(java.lang.Object ns)
sets the namespace of the Diagram, and adds the diagram as a listener of its namspace in the UML model. |
Methods inherited from class org.argouml.ui.ArgoDiagram |
addChangeRegistryAsListener, damage, getContainingFig, getEdges, getItemUID, getNodes, getVetoMessage, removeChangeRegistryAsListener, setItemUID |
Methods inherited from class org.tigris.gef.base.Diagram |
add, addVetoableChangeListener, bringForward, bringToFront, countContained, edgeAdded, edgeRemoved, elements, elementsIn, fireVetoableChange, fireVetoableChange, fireVetoableChange, getComments, getGraphController, getGraphModel, getLayer, getName, graphChanged, hit, nodeAdded, nodeRemoved, postLoad, postSave, preSave, presentationFor, remove, removeAll, removeVetoableChangeListener, reorder, sendBackward, sendToBack, setComments, setGraphModel, setLayer, setToolBar |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static org.apache.log4j.Category cat
protected static javax.swing.Action _actionSelect
protected static javax.swing.Action _actionBroom
protected static javax.swing.Action _actionRectangle
protected static javax.swing.Action _actionRRectangle
protected static javax.swing.Action _actionCircle
protected static javax.swing.Action _actionLine
protected static javax.swing.Action _actionText
protected static javax.swing.Action _actionPoly
protected static javax.swing.Action _actionSpline
protected static javax.swing.Action _actionInk
protected ru.novosoft.uml.foundation.core.MNamespace _namespace
protected DiagramInfo _diagramName
Constructor Detail |
public UMLDiagram()
public UMLDiagram(ru.novosoft.uml.foundation.core.MNamespace ns)
public UMLDiagram(java.lang.String diagramName, ru.novosoft.uml.foundation.core.MNamespace ns)
Method Detail |
public void initialize(java.lang.Object owner)
initialize
in class ArgoDiagram
Diagram.initialize(Object)
public ru.novosoft.uml.foundation.core.MNamespace getNamespace()
public void setNamespace(java.lang.Object ns)
public java.lang.String getClassAndModelID()
public ru.novosoft.uml.foundation.core.MModelElement getOwner()
public void setName(java.lang.String n) throws java.beans.PropertyVetoException
setName
in class ArgoDiagram
java.beans.PropertyVetoException
public org.tigris.gef.ui.ToolBar getToolBar()
public void initToolBar()
Diagram.initToolBar()
public java.lang.Object[] getActions()
protected abstract java.lang.Object[] getUmlActions()
public void removed(ru.novosoft.uml.MElementEvent e)
There is also a risk that if this diagram was the one shown in the diagram panel, then it will remain after it has been deleted. so we need to deselect this diagram.
removed
in interface ru.novosoft.uml.MElementListener
public void propertySet(ru.novosoft.uml.MElementEvent e)
propertySet
in interface ru.novosoft.uml.MElementListener
public void roleAdded(ru.novosoft.uml.MElementEvent e)
roleAdded
in interface ru.novosoft.uml.MElementListener
public void roleRemoved(ru.novosoft.uml.MElementEvent e)
roleRemoved
in interface ru.novosoft.uml.MElementListener
public void listRoleItemSet(ru.novosoft.uml.MElementEvent e)
listRoleItemSet
in interface ru.novosoft.uml.MElementListener
public void recovered(ru.novosoft.uml.MElementEvent e)
recovered
in interface ru.novosoft.uml.MElementListener
public void removeAsTarget()
public void setAsTarget()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ArgoUML © 1996-2003 (20040125) | ArgoUML Project Home | ArgoUML Cookbook |