|
IBM Rational Software Modeler Release 6.0 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
Provides miscellaneous UML diagram utilities
| Method Summary | |
boolean |
canCreateViews(Diagram diagram,
List objects)
Returns whether views can be created for the objects specified by objects in the diagram specified by diagram |
Diagram |
createDiagram(org.eclipse.uml2.Namespace container,
UMLDiagramKind kind)
Creates a UML diagram with a given kind and inserts it into a given container |
Diagram |
createDiagram(org.eclipse.uml2.Namespace container,
UMLDiagramKind kind,
org.eclipse.uml2.Element context)
Creates a UML diagram with a given context and kind and inserts it into a given container |
Edge |
createEdge(View source,
View target,
org.eclipse.uml2.Element element)
Creates an edge for a given element and connects it between a given source and a given target |
Edge |
createEdge(View source,
View target,
String type)
Creates an edge with a given type and connects it between a given source and a given target |
List |
createEdges(Diagram diagram,
org.eclipse.uml2.Relationship element)
Creates diagram edges between the related elements of a relationship |
Node |
createNode(View container,
org.eclipse.uml2.Element element)
Creates a node for a given element and inserts it into a given container |
Node |
createNode(View container,
String type)
Creates a node with a given type and inserts it into a given container |
List |
createViews(Diagram diagram,
List objects)
Creates views for the objects specified by objects in the
diagram specified by diagram. |
void |
destroyView(View view)
Destroys a given view |
View |
getChildView(View container,
String type)
Gets the child view with a given type from a given view |
List |
getDiagrams(org.eclipse.uml2.Namespace element)
Gets a list of diagrams for a given element |
List |
getDiagrams(org.eclipse.uml2.Namespace element,
UMLDiagramKind kind)
Gets a list of diagrams of a given kind for a given element |
ILayoutNode |
getLayoutNode(Node node)
getLayoutNode Gets the ILayoutNode in order to retrieve the actual size of the Node object irrespective of the autosize properties. |
Diagram |
getMainDiagram(org.eclipse.uml2.Namespace element)
Gets the main diagram of an element |
UMLDiagramKind |
getUmlDiagramKind(Diagram diagram)
Retrieves the UMLDiagramKind of the specified diagram |
void |
layout(View view,
String hint)
layout Utility method to layout the children of a view container. |
void |
layoutNodes(List nodes,
String hint)
layoutNodes Utility method to layout a list of Node children on a diagram. |
void |
openDiagramEditor(Diagram diagram)
Opens an editor for a given diagram |
Image |
renderToAWTImage(Diagram diagram)
renderToAWTImage Utility api to generate an AWT based image representation of the diagram contents. |
void |
renderToImageFile(Diagram diagram,
String file,
ImageFileFormat format)
renderToImageFile Utility api to render the diagram to a specified image formatation of the diagram contents. |
org.eclipse.swt.graphics.Image |
renderToSWTImage(Diagram diagram)
renderToSWTImage Utility api to generate an SWT based image representation of the diagram contents. |
void |
setMainDiagram(org.eclipse.uml2.Namespace element,
Diagram diagram)
Sets the main diagram of an element |
| Method Detail |
public Diagram createDiagram(org.eclipse.uml2.Namespace container,
UMLDiagramKind kind)
container - The container namespace for the diagramkind - The UML diagram kind
Diagram
public Diagram createDiagram(org.eclipse.uml2.Namespace container,
UMLDiagramKind kind,
org.eclipse.uml2.Element context)
container - The container namespace for the diagramcontext - The UML diagram element contextkind - The UML diagram kind
Diagram
public Node createNode(View container,
org.eclipse.uml2.Element element)
container - The node view containerelement - The node view element context
Node
public Node createNode(View container,
String type)
container - The node view containertype - The node view type
Node
public Edge createEdge(View source,
View target,
org.eclipse.uml2.Element element)
source - The edge's source viewtarget - The edge's target viewelement - The edge view element context
Edge
public Edge createEdge(View source,
View target,
String type)
source - The edge's source viewtarget - The edge's target viewtype - The edge view type
Edgepublic void destroyView(View view)
view - The view to be destroyedpublic void openDiagramEditor(Diagram diagram)
diagram - The diagram to be opened
IEditorPart for the diagrampublic List getDiagrams(org.eclipse.uml2.Namespace element)
element - The namespace element
Diagram s
public List getDiagrams(org.eclipse.uml2.Namespace element,
UMLDiagramKind kind)
element - The namespace elementkind - The diagram kind
Diagram spublic Diagram getMainDiagram(org.eclipse.uml2.Namespace element)
element - The namespace element
Diagram
public void setMainDiagram(org.eclipse.uml2.Namespace element,
Diagram diagram)
element - The namespace elementdiagram - The main diagram
public View getChildView(View container,
String type)
container - The container viewtype - The type of the child view
Viewpublic UMLDiagramKind getUmlDiagramKind(Diagram diagram)
diagram - The diagram to retrieve the UMLDiagramKind for
public void renderToImageFile(Diagram diagram,
String file,
ImageFileFormat format)
diagram - The Diagram to render the image from.file - String that is the image file path to write to.format - ImageFileFormat enumeration of valid file formats
NullPointerException - diagram is null
NullPointerException - file is null
NullPointerException - format is null
IllegalArgumentException - file is an empty string
UnsupportedOperationException - Unable to render diagram to
formatpublic Image renderToAWTImage(Diagram diagram)
diagram - The Diagram to render the image from.
NullPointerException - diagram is nullpublic org.eclipse.swt.graphics.Image renderToSWTImage(Diagram diagram)
diagram - The Diagram to render the image from.
NullPointerException - diagram is nullpublic ILayoutNode getLayoutNode(Node node)
node - Node to get the layout node equivalent from
NullPointerException - node is null
public void layout(View view,
String hint)
view - View object that is the container whose children will be laid
out. Typically this would be the Diagram notation element.hint - String representing a hint for what kind of layout will be
applied. Value can be one of
NullPointerException - view is null
NullPointerException - hint is nullILayoutNodesProvider.DEFAULT_LAYOUT,
Other values would have to understand by custom providers.,
ILayoutNodesProvider
public void layoutNodes(List nodes,
String hint)
nodes - List of Node objectshint - String representing a hint for what kind of layout will be
applied. Value can be one of
NullPointerException - nodes is null
IllegalArgumentException - nodes is an empty list
NullPointerException - hint is null
IllegalArgumentException - Argument nodes contains objects which aren't
of type Node
IllegalArgumentException - Argument nodes contains objects which have a
different parent containmentILayoutNodesProvider.DEFAULT_LAYOUT,
Other values would have to understand by custom providers.,
ILayoutNodesProvider
public List createViews(Diagram diagram,
List objects)
objects in the
diagram specified by diagram.
diagram - The diagram where to add views toobjects - The objects to add views for
NullPointerException - diagram or object is null
IllegalArgumentException - diagram has no associated edit part (internal
error)
public boolean canCreateViews(Diagram diagram,
List objects)
objects in the diagram specified by diagram
diagram - The diagram where to add a views toobjects - The objects to add views for
true if at least one object can be viewed in the
specified diagram
NullPointerException - diagram or objects is null
public List createEdges(Diagram diagram,
org.eclipse.uml2.Relationship element)
diagram - The diagram to created edges inelement - The relationship element
Edge s
|
IBM Rational Software Modeler Release 6.0 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2004. All rights reserved.