org.argouml.uml.reveng
Class DiagramInterface

java.lang.Object
  extended by org.argouml.uml.reveng.DiagramInterface

public class DiagramInterface
extends java.lang.Object

Instances of this class interface the current Class diagram.

This class is used by the import mechanism to create packages, interfaces and classes within the diagrams. It is also used to find the correct diagram to work in.

Since:
0.9

Constructor Summary
DiagramInterface(org.tigris.gef.base.Editor editor)
          Creates a new DiagramInterface.
 
Method Summary
 void addClass(java.lang.Object newClass, boolean minimise)
          Add a class to the current diagram.
 void addClassDiagram(java.lang.Object ns, java.lang.String name)
          Add a new class diagram for a package to the project.
 void addInterface(java.lang.Object newInterface, boolean minimise)
          Add a interface to the current diagram.
 void addPackage(java.lang.Object newPackage)
          Add a package to the current diagram.
 void createRootClassDiagram()
          Creates class diagram under the root.
 java.util.List<org.argouml.uml.diagram.ArgoDiagram> getModifiedDiagramList()
          Get the list of modified diagrams.
 java.util.Vector<org.argouml.uml.diagram.ArgoDiagram> getModifiedDiagrams()
          Deprecated. for 0.25.4 by tfmorris. Use getModifiedDiagramList().
 boolean isDiagramInProject(java.lang.String name)
          Check if this diagram already exists in the project.
 boolean isInDiagram(java.lang.Object p)
          Check if a given package has a representation in the current diagram.
 void selectClassDiagram(java.lang.Object p, java.lang.String name)
          Select a class diagram as the current diagram, creating it if necessary.
 void setCurrentDiagram(org.argouml.uml.diagram.ArgoDiagram diagram)
          selects a diagram without affecting the gui.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DiagramInterface

public DiagramInterface(org.tigris.gef.base.Editor editor)
Creates a new DiagramInterface.

Parameters:
editor - The editor to operate on.
Method Detail

getModifiedDiagrams

@Deprecated
public java.util.Vector<org.argouml.uml.diagram.ArgoDiagram> getModifiedDiagrams()
Deprecated. for 0.25.4 by tfmorris. Use getModifiedDiagramList().

Get the list of modified diagrams.

Returns:
The list of modified diagrams.

getModifiedDiagramList

public java.util.List<org.argouml.uml.diagram.ArgoDiagram> getModifiedDiagramList()
Get the list of modified diagrams.

Returns:
The list of modified diagrams.

addPackage

public void addPackage(java.lang.Object newPackage)
Add a package to the current diagram. If the package already has a representation in the current diagram, it is not(!) added.

Parameters:
newPackage - The package to add.

isInDiagram

public boolean isInDiagram(java.lang.Object p)
Check if a given package has a representation in the current diagram.

Parameters:
p - The package to lookup in the current diagram.
Returns:
true if this package has a figure in the current diagram, false otherwise.

isDiagramInProject

public boolean isDiagramInProject(java.lang.String name)
Check if this diagram already exists in the project.

Parameters:
name - package name (converted to class name)
Returns:
true if diagram exists in project.

selectClassDiagram

public void selectClassDiagram(java.lang.Object p,
                               java.lang.String name)
Select a class diagram as the current diagram, creating it if necessary.

Parameters:
p - The package.
name - The fully qualified name of this package.

addClassDiagram

public void addClassDiagram(java.lang.Object ns,
                            java.lang.String name)
Add a new class diagram for a package to the project.

Parameters:
ns - The namespace to contain the diagram. If null, the root model will be used.
name - The fully qualified name of the package, which is used to generate the diagram name from.

addClass

public void addClass(java.lang.Object newClass,
                     boolean minimise)
Add a class to the current diagram.

Parameters:
newClass - The new class to add to the editor.
minimise - minimise the class fig by hiding compartiments (of attributes and operations)

addInterface

public void addInterface(java.lang.Object newInterface,
                         boolean minimise)
Add a interface to the current diagram.

Parameters:
newInterface - The interface to add.
minimise - minimise the class fig by hiding compartiments (of attributes and operations)

createRootClassDiagram

public void createRootClassDiagram()
Creates class diagram under the root. Is used for classes out of packages.


setCurrentDiagram

public void setCurrentDiagram(org.argouml.uml.diagram.ArgoDiagram diagram)
selects a diagram without affecting the gui.

Parameters:
diagram - the diagram


ArgoUML © 1996-2006ArgoUML HomepageArgoUML Cookbook