org.argouml.ui
Class ArgoDiagram

java.lang.Object
  extended byorg.tigris.gef.base.Diagram
      extended byorg.argouml.ui.ArgoDiagram
All Implemented Interfaces:
EventListener, GraphListener, Serializable
Direct Known Subclasses:
DiagramHelper, UMLDiagram

public class ArgoDiagram
extends Diagram

This class represents all Diagrams within ArgoUML. It is based upon the GEF Diagram.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.tigris.gef.base.Diagram
_comments, _name, _toolBar, NAME_KEY, SCALE_KEY
 
Constructor Summary
ArgoDiagram()
          The constructor.
ArgoDiagram(String diagramName)
          The constructor.
 
Method Summary
 void damage()
          This will mark the entire visible area of all Editors to be repaired from any damage - i.e.
 Fig getContainingFig(Object obj)
          Finds the presentation (the Fig) for some object.
 List getEdges()
          Get all the model elements in this diagram that are represented by a FigEdge.
 ItemUID getItemUID()
          USED BY pgml.tee!!
 List getNodes()
          Get all the model elements in this diagram that are represented by a FigNode.
 String getVetoMessage(String propertyName)
          TODO: The reference to the method org.argouml.uml.ui.VetoablePropertyChange#getVetoMessage(String) was here but the class does exist anymore.
 void initialize(Object owner)
           
 List presentationsFor(Object obj)
          Find the all Figs that visualise the given model element in this layer, or null if there is none.
 void remove()
           
 String repair()
          We hang our heads in shame.
 void setItemUID(ItemUID i)
           
 void setName(String n)
           
 String toString()
           
 
Methods inherited from class org.tigris.gef.base.Diagram
add, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, bringForward, bringToFront, countContained, edgeAdded, edgeRemoved, elements, elementsIn, firePropertyChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, getClassAndModelID, getComments, getGraphController, getGraphModel, getLayer, getName, getScale, getShowSingleMultiplicity, getToolBar, graphChanged, hit, initToolBar, nodeAdded, nodeRemoved, postLoad, postSave, preSave, presentationFor, remove, removeAll, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, reorder, sendBackward, sendToBack, setComments, setGraphModel, setLayer, setScale, setShowSingleMultiplicity, setToolBar
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ArgoDiagram

public ArgoDiagram()
The constructor.


ArgoDiagram

public ArgoDiagram(String diagramName)
The constructor.

Parameters:
diagramName - the name of the diagram
Method Detail

setName

public void setName(String n)
             throws PropertyVetoException
Throws:
PropertyVetoException
See Also:
Diagram.setName(java.lang.String)

setItemUID

public void setItemUID(ItemUID i)
Parameters:
i - the new id

getItemUID

public ItemUID getItemUID()
USED BY pgml.tee!!

Returns:
the item UID

getVetoMessage

public String getVetoMessage(String propertyName)
TODO: The reference to the method org.argouml.uml.ui.VetoablePropertyChange#getVetoMessage(String) was here but the class does exist anymore. Where is it? This method is never used!

Parameters:
propertyName - is the name of the property
Returns:
a message or null if not applicable.

getContainingFig

public Fig getContainingFig(Object obj)
Finds the presentation (the Fig) for some object. If the object is a modelelement that is contained in some other modelelement that has its own fig, that fig is returned. It extends presentationFor that only gets the fig belonging to the node obj.

Parameters:
obj - is th object
Returns:
the Fig for the object

initialize

public void initialize(Object owner)
See Also:
Diagram.initialize(Object)

damage

public void damage()
This will mark the entire visible area of all Editors to be repaired from any damage - i.e. repainted.


getEdges

public List getEdges()
Get all the model elements in this diagram that are represented by a FigEdge.

See Also:
Diagram.getEdges()

getNodes

public List getNodes()
Get all the model elements in this diagram that are represented by a FigNode.

See Also:
Diagram.getNodes()

toString

public String toString()
See Also:
Object.toString()

repair

public String repair()
We hang our heads in shame. There are still bugs in ArgoUML and/or GEF that cause corruptions in the model. Before a save takes place we repair the model in order to be as certain as possible that the saved file will reload. TODO: Split into small inner classes for each fix.

Returns:
A text that explains what is repaired.

presentationsFor

public List presentationsFor(Object obj)
Find the all Figs that visualise the given model element in this layer, or null if there is none. TODO: once GEF includes this same method in Diagram then the can go


remove

public void remove()


ArgoUML © 1996-2006ArgoUML HomepageArgoUML Developers' pageArgoUML Cookbook