org.argouml.uml.reveng
Class DiagramInterface

java.lang.Object
  |
  +--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(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 createOrSelectClassDiagram(java.lang.Object currentPackage, java.lang.String currentPackageName)
          Creates new class diagram for package or selects existing one.
 void createRootClassDiagram()
          Creates class diagram under the root.
 java.util.Vector getModifiedDiagrams()
          Get the list of modified diagrams.
 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 or create a class diagram for a package.
 void setCurrentDiagram(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(Editor editor)
Creates a new DiagramInterface

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

getModifiedDiagrams

public java.util.Vector getModifiedDiagrams()
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.

Returns:
true if diagram exists in project

selectClassDiagram

public void selectClassDiagram(java.lang.Object p,
                               java.lang.String name)
Select or create a class diagram for a package.

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:
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.

addInterface

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

Parameters:
newInterface - The interface to add.

createOrSelectClassDiagram

public void createOrSelectClassDiagram(java.lang.Object currentPackage,
                                       java.lang.String currentPackageName)
Creates new class diagram for package or selects existing one.

Parameters:
currentPackage - The package to attach the diagram to.
currentPackageName - The fully qualified name of the package, which is used to generate the diagram name from.

createRootClassDiagram

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


setCurrentDiagram

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



ArgoUML © 1996-2003 (20030919)ArgoUML Project HomeArgoUML Cookbook