|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.frag.umlplugin.uml.UMLDiagram
public class UMLDiagram
UML diagram.
Nested Class Summary | |
---|---|
static class |
UMLDiagram.NodeInfo
Stores additional node information. |
Field Summary | |
---|---|
static java.lang.String |
DIAGRAM_ELEMENT_NAME
|
static java.lang.String |
DIAGRAM_NAME_ATTRIBUTE
|
Constructor Summary | |
---|---|
UMLDiagram(com.intellij.openapi.project.Project project,
org.jdom.Element diagramElement)
Creates a new diagram from given JDOM element |
|
UMLDiagram(com.intellij.openapi.project.Project project,
java.lang.String name)
Creates new UML diagram. |
Method Summary | |
---|---|
com.intellij.openapi.graph.base.Node |
addClassNode(com.intellij.psi.PsiClass psiClass)
Creates a new node for given class and adds it to the diagram. |
void |
addCommand(DiagramCommand command)
Adds given command to diagram. |
boolean |
canStepBack()
Checks whether a step back in diagram creation history is possible. |
boolean |
canStepForward()
Checks whether a step forward in diagram creation history is possible. |
int |
compareTo(UMLDiagram other)
|
void |
createEdge(com.intellij.openapi.graph.base.Node sourceNode,
com.intellij.openapi.graph.base.Node targetNode,
UsageType usageType)
Creates a new edge. |
org.jdom.Element |
createElement()
Creates JDOM element that contains a persistent description of this diagram. |
void |
doLayout()
Recomputes layout of this diagram. |
void |
doLayout(boolean animate)
Recomputes layout of this diagram. |
boolean |
equals(java.lang.Object o)
|
com.intellij.psi.PsiClass |
findPsiClass(java.lang.String qualifiedClassName)
Finds psi class for given qualified class name. |
java.util.List<DiagramCommand> |
getCommands()
Gets a copy of the diagram creation command list. |
CompartmentVisibility |
getCompartmentVisibility()
Gets compartment visibility handler. |
com.intellij.openapi.graph.base.Edge |
getEdge(java.lang.String sourceClassName,
java.lang.String targetClassName,
UsageType usageType)
Gets edge that belongs to given arguments. |
java.util.List<com.intellij.openapi.graph.base.Edge> |
getEdges()
Gets all edges. |
com.intellij.openapi.graph.base.Graph |
getGraph()
Gets contained graph. |
java.lang.String |
getName()
Gets diagram name. |
com.intellij.openapi.graph.base.Node |
getNode(com.intellij.psi.PsiClass psiClass)
Gets node that belongs to given class. |
com.intellij.openapi.graph.base.Node |
getNode(java.lang.String qualifiedClassName)
Gets node that belongs to given class name. |
static com.intellij.psi.PsiClass |
getPsiClass(com.intellij.openapi.graph.base.Node node)
Gets psi class for given node. |
static UsageType |
getUsageType(com.intellij.openapi.graph.base.Edge edge)
Gets usage type for given edge. |
com.intellij.openapi.graph.view.Graph2DView |
getView()
Gets contained graph view. |
int |
hashCode()
|
java.util.Iterator<java.lang.String> |
iterator()
Returns an iterator over all contained classes. |
void |
refreshDiagram()
Refreshes the diagram by excuting all commands. |
void |
removeClassNode(com.intellij.openapi.graph.base.Node classNode)
Removes given class node from diagram. |
void |
removeEdge(com.intellij.openapi.graph.base.Edge edge)
Removes given edge from diagram. |
void |
renameClasses(ClassRenamer renamer)
Rename all classes in all commands to keep class names in sync after refactorings were applied. |
void |
rewindAllCommands()
Steps back to start of diagram command history. |
void |
setCommands(java.util.List<DiagramCommand> commands)
Sets the command history to given command list. |
void |
setName(java.lang.String name)
Sets name of this diagram. |
void |
stepBack()
Steps back in diagram creation by removing last command. |
void |
stepForward()
Steps forward in diagram creation by reappending last command. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String DIAGRAM_ELEMENT_NAME
public static final java.lang.String DIAGRAM_NAME_ATTRIBUTE
Constructor Detail |
---|
public UMLDiagram(@NotNull com.intellij.openapi.project.Project project, @NotNull java.lang.String name)
project
- associated projectname
- diagram namepublic UMLDiagram(@NotNull com.intellij.openapi.project.Project project, @NotNull org.jdom.Element diagramElement)
project
- current projectdiagramElement
- JDOM element that contains persistent information about diagramMethod Detail |
---|
@NotNull public java.util.List<DiagramCommand> getCommands()
public void setCommands(@NotNull java.util.List<DiagramCommand> commands)
commands
- list of commands to use as history@NotNull public java.lang.String getName()
public void setName(@NotNull java.lang.String name)
name
- new diagram name@NotNull public com.intellij.openapi.graph.base.Graph getGraph()
@NotNull public com.intellij.openapi.graph.view.Graph2DView getView()
@NotNull public CompartmentVisibility getCompartmentVisibility()
public void addCommand(@NotNull DiagramCommand command)
command
- command to addpublic void rewindAllCommands()
public void stepBack()
public void stepForward()
public boolean canStepBack()
public boolean canStepForward()
public void refreshDiagram()
public void doLayout()
public void doLayout(boolean animate)
animate
- true, if layout ill be animated; false otherwise@Nullable public com.intellij.openapi.graph.base.Node addClassNode(@Nullable com.intellij.psi.PsiClass psiClass)
psiClass
- class to create node for
public void removeClassNode(@NotNull com.intellij.openapi.graph.base.Node classNode)
classNode
- node to removepublic void createEdge(@Nullable com.intellij.openapi.graph.base.Node sourceNode, @Nullable com.intellij.openapi.graph.base.Node targetNode, @NotNull UsageType usageType)
sourceNode
- source nodetargetNode
- target nodeusageType
- usage type for edgepublic void removeEdge(@Nullable com.intellij.openapi.graph.base.Edge edge)
edge
- edge to remove@Nullable public com.intellij.openapi.graph.base.Node getNode(@NotNull com.intellij.psi.PsiClass psiClass)
psiClass
- class
@Nullable public com.intellij.openapi.graph.base.Node getNode(@NotNull java.lang.String qualifiedClassName)
qualifiedClassName
- class name
@Nullable public com.intellij.openapi.graph.base.Edge getEdge(@NotNull java.lang.String sourceClassName, @NotNull java.lang.String targetClassName, @NotNull UsageType usageType)
sourceClassName
- source class of edgetargetClassName
- target class of edgeusageType
- usage type of edge
@NotNull public java.util.List<com.intellij.openapi.graph.base.Edge> getEdges()
public java.lang.String toString()
toString
in class java.lang.Object
@Nullable public static com.intellij.psi.PsiClass getPsiClass(@NotNull com.intellij.openapi.graph.base.Node node)
node
- node to get class for
@Nullable public static UsageType getUsageType(@NotNull com.intellij.openapi.graph.base.Edge edge)
edge
- edge to get usage type for
@Nullable public com.intellij.psi.PsiClass findPsiClass(@NotNull java.lang.String qualifiedClassName)
qualifiedClassName
- qualified class name
public boolean equals(@Nullable java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public int compareTo(@NotNull UMLDiagram other)
compareTo
in interface java.lang.Comparable<UMLDiagram>
@NotNull public org.jdom.Element createElement()
@NotNull public java.util.Iterator<java.lang.String> iterator()
iterator
in interface java.lang.Iterable<java.lang.String>
public void renameClasses(@NotNull ClassRenamer renamer)
renamer
- renamer to use for renaming class names
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |