|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IRPDiagram
The IRPDiagram interface contains the methods shared by all the interfaces that represent specific types of diagrams.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface com.telelogic.rhapsody.core.IRPModelElement |
---|
IRPModelElement.OSLCLink |
Method Summary | |
---|---|
IRPGraphElement |
addFreeShapeByType(java.lang.String metaType,
IRPCollection xPoints,
IRPCollection yPoints)
Adds a free shape of the type specified, using the x coordinates and y coordinates provided. |
IRPGraphElement |
addImage(java.lang.String filename,
int xPosition,
int yPosition,
int nWidth,
int nHeight)
Adds an image to the diagram, using the specified file, starting point, width, and height. |
IRPGraphEdge |
addNewEdgeByType(java.lang.String metaType,
IRPGraphElement src,
int xSrcPosition,
int ySrcPosition,
IRPGraphElement trg,
int xTrgPosition,
int yTrgPosition)
Adds a connector element of the specified type to the diagram, using the source and target elements specified. |
IRPGraphEdge |
addNewEdgeForElement(IRPModelElement element,
IRPGraphNode src,
int xSrcPosition,
int ySrcPosition,
IRPGraphNode trg,
int xTrgPosition,
int yTrgPosition)
Adds a connector graphical element to the diagram to represent the specified model element. |
IRPGraphNode |
addNewNodeByType(java.lang.String metaType,
int xPosition,
int yPosition,
int nWidth,
int nHeight)
Adds a diagram element of the specified type to the diagram, using the position and dimensions specified. |
IRPGraphNode |
addNewNodeForElement(IRPModelElement element,
int xPosition,
int yPosition,
int nWidth,
int nHeight)
Adds a graphical element to the diagram to represent the specified model element. |
IRPGraphElement |
addTextBox(java.lang.String text,
int xPosition,
int yPosition,
int nWidth,
int nHeight)
Adds a text box using the specified text, starting point, width, and height. |
void |
closeDiagram()
Closes the diagram. |
void |
completeRelations(IRPCollection graphElements,
int selectedToAll)
Adds connectors to the diagram to reflect the existing relations between the specified elements. |
IRPCollection |
getCorrespondingGraphicElements(IRPModelElement modelElement)
Returns the graphical elements that represent the specified model element in the diagram. |
IRPCollection |
getElementsInDiagram()
Returns a collection of all the model elements in the diagram. |
IRPCollection |
getGraphicalElements()
Returns a collection of all the graphical elements in the diagram. |
java.lang.String |
getLastVisualizationModifiedTime()
Returns the time at which the visual representation of the diagram was last changed. |
void |
getPicture(java.lang.String filename)
Saves the diagram as an emf format file, using the path and filename provided as a parameter. |
IRPCollection |
getPictureAs(java.lang.String firstFileName,
java.lang.String imageFormat,
int getImageMaps,
IRPCollection diagrammap)
Saves the diagram in the specified graphic format, breaking the diagram into a number of files if necessary. |
IRPCollection |
getPictureAsDividedMetafiles(java.lang.String firstFileName)
Saves the diagram as an emf format file, breaking the diagram into a number of such files if necessary. |
void |
getPictureEx(java.lang.String filename,
java.lang.String exportScale,
int smartZoom)
method getPictureEx |
IRPCollection |
getPicturesWithImageMap(java.lang.String firstFileName,
IRPCollection diagrammap)
Saves the diagram as an emf format file, breaking the diagram into a number of files if necessary. |
int |
isOpen()
method isOpen |
int |
isShowDiagramFrame()
Checks whether the diagram frame is currently visible. |
void |
openDiagram()
Opens the diagram. |
IRPAXViewCtrl |
openDiagramView()
Used internally by Rational Rhapsody to display diagrams within Eclipse (when using the Rhapsody-Eclipse platform integration). |
void |
populateDiagram(IRPCollection elementsToPopulate,
IRPCollection relationsTypes,
java.lang.String createContent)
Populates the diagram with the elements and types of relations specified. |
void |
removeGraphElements(IRPCollection elementsToRemove)
Removes the specified graphic elements from the diagram. |
void |
setShowDiagramFrame(int bShow)
Shows/hides the diagram frame. |
Methods inherited from interface com.telelogic.rhapsody.core.IRPUnit |
---|
copyToAnotherProject, getAddToModelMode, getCMHeader, getCMState, getCurrentDirectory, getFilename, getIncludeInNextLoad, getIsStub, getLanguage, getLastModifiedTime, getNestedSaveUnits, getNestedSaveUnitsCount, getStructureDiagrams, isReadOnly, isReferenceUnit, isSeparateSaveUnit, load, moveToAnotherProjectLeaveAReference, referenceToAnotherProject, save, setCMHeader, setFilename, setIncludeInNextLoad, setLanguage, setReadOnly, setSeparateSaveUnit, setUnitPath, unload |
Method Detail |
---|
IRPGraphElement addFreeShapeByType(java.lang.String metaType, IRPCollection xPoints, IRPCollection yPoints)
metaType
- the type of shape to add. The possible values for this parameter are: "Polyline", "Polygon", "Rectangle", "Polycurve", "Closed Curve", "Ellipse".xPoints
- collection of integers representing the x coordinates for the shapeyPoints
- collection of integers representing the y coordinates for the shape
IRPGraphElement addImage(java.lang.String filename, int xPosition, int yPosition, int nWidth, int nHeight)
filename
- the full path to the imagexPosition
- the x coordinate for the top left corner of the image, in pixelsyPosition
- the y coordinate for the top left corner of the image, in pixelsnWidth
- the width of the image, in pixelsnHeight
- the height of the image, in pixels
IRPGraphEdge addNewEdgeByType(java.lang.String metaType, IRPGraphElement src, int xSrcPosition, int ySrcPosition, IRPGraphElement trg, int xTrgPosition, int yTrgPosition)
metaType
- the type of connector element to add to the diagram. The strings that can be used for this parameter are: "anchor", "compRealization", "Containment Arrow", and "communication path".src
- the graphical element that is the source for the connectorxSrcPosition
- the distance, in pixels, from the the left edge of the diagram to a point within the source graphical elementySrcPosition
- the distance, in pixels, from the the top edge of the diagram to a point within the source graphical elementtrg
- the graphical element that is the target for the connectorxTrgPosition
- the distance, in pixels, from the the left edge of the diagram to a point within the target graphical elementyTrgPosition
- the distance, in pixels, from the the top edge of the diagram to a point within the target graphical element
addNewEdgeForElement(com.telelogic.rhapsody.core.IRPModelElement, com.telelogic.rhapsody.core.IRPGraphNode, int, int, com.telelogic.rhapsody.core.IRPGraphNode, int, int)
IRPGraphEdge addNewEdgeForElement(IRPModelElement element, IRPGraphNode src, int xSrcPosition, int ySrcPosition, IRPGraphNode trg, int xTrgPosition, int yTrgPosition)
element
- the model element to add to the diagram.src
- the graphical element that is the source for the connectorxSrcPosition
- the distance, in pixels, from the the left edge of the diagram to a point within the source graphical elementySrcPosition
- the distance, in pixels, from the the top edge of the diagram to a point within the source graphical elementtrg
- the graphical element that is the target for the connectorxTrgPosition
- the distance, in pixels, from the the left edge of the diagram to a point within the target graphical elementyTrgPosition
- the distance, in pixels, from the the top edge of the diagram to a point within the target graphical element
IRPGraphNode addNewNodeByType(java.lang.String metaType, int xPosition, int yPosition, int nWidth, int nHeight)
metaType
- the type of element to add to the diagram. The strings that can be used for this parameter are: "OrState"(for And Line), "Interaction Operand", "Swimlane" (for swimlane divider), "System Border", "PartitionLine", "SDActionBlock" (for action block in sequence diagram), "Note"; panel diagram elements: "Knob", "Gauge", "Meter", "LevelIndicator", "MatrixDisplay", "DigitalDisplay", "Led", "OnOffSwitch", "PushButton", "ButtonArray", "TextBox", "Slider"; free shapes: "Polyline", "Ploygon", "Rectangle", "Polycurve", "Closed Curve","Ellipse","Image".xPosition
- the position of the left edge of the graphical object, in pixels, relative to the left edge of the diagramyPosition
- the position of the top edge of the graphical object, in pixels, relative to the top edge of the diagramnWidth
- the width of the graphical objectnHeight
- the height of the graphical object
addNewNodeForElement(com.telelogic.rhapsody.core.IRPModelElement, int, int, int, int)
IRPGraphNode addNewNodeForElement(IRPModelElement element, int xPosition, int yPosition, int nWidth, int nHeight)
element
- the model element to add to the diagram.xPosition
- the position of the left edge of the graphical object, in pixels, relative to the left edge of the diagramyPosition
- the position of the top edge of the graphical object, in pixels, relative to the top edge of the diagramnWidth
- the width of the graphical objectnHeight
- the height of the graphical object
IRPGraphElement addTextBox(java.lang.String text, int xPosition, int yPosition, int nWidth, int nHeight)
text
- the text that should be displayedxPosition
- the x coordinate for the top left corner of the box, in pixelsyPosition
- the y coordinate for the top left corner of the box, in pixelsnWidth
- the width of the text box, in pixelsnHeight
- the height of the text box, in pixels
IRPAXViewCtrl openDiagramView()
void closeDiagram()
void completeRelations(IRPCollection graphElements, int selectedToAll)
graphElements
- the elements whose relations should be reflected on the diagramselectedToAll
- Use 0 if you just want to display the relations between the specified elements. Use 1 if you would also like to display any existing relations between the specified elements and other elements on the diagram.IRPCollection getCorrespondingGraphicElements(IRPModelElement modelElement)
modelElement
- the model element in the diagram whose graphical elements should be returned
IRPCollection getElementsInDiagram()
IRPCollection getGraphicalElements()
java.lang.String getLastVisualizationModifiedTime()
void getPicture(java.lang.String filename)
filename
- the full path to use for saving the fileIRPCollection getPictureAs(java.lang.String firstFileName, java.lang.String imageFormat, int getImageMaps, IRPCollection diagrammap)
firstFileName
- the name to use for the file created. If more than one file is created, the filenames used will be based on the following convention: firstFileNameZ_X_Y, where Z is the number of the created file, X is the number of the page along the X vector, and Y is the number of the page along the Y vector.imageFormat
- the graphic format in which the diagram should be saved. This can be one of the following: EMF, BMP, JPEG, JPG, TIFF.getImageMaps
- use this argument to indicate whether the method should also provide a collection of IRPImageMap objects that can be used to construct an HTML image map for the diagram. (Use 1 if you want this information, else use 0.)diagrammap
- The collection to use to store the IRPImageMap objects containing the required information for constructing an HTML image map
IRPCollection getPictureAsDividedMetafiles(java.lang.String firstFileName)
firstFileName
- the name to use for the first file created. If more than one file is created, the filenames used will be based on the following convention: firstFileNameZ_X_Y, where Z is the number of the created file, X is the number of the page along the X vector, and Y is the number of the page along the Y vector.
void getPictureEx(java.lang.String filename, java.lang.String exportScale, int smartZoom)
RhapsodyRuntimeException
IRPCollection getPicturesWithImageMap(java.lang.String firstFileName, IRPCollection diagrammap)
firstFileName
- the name to use for the file created. If more than one file is created, the filenames used will be based on the following convention: firstFileNameZ_X_Y, where Z is the number of the created file, X is the number of the page along the X vector, and Y is the number of the page along the Y vector.diagrammap
- The collection to use to store the IRPImageMap objects containing the required information for constructing an HTML image map
int isOpen()
RhapsodyRuntimeException
int isShowDiagramFrame()
void openDiagram()
void populateDiagram(IRPCollection elementsToPopulate, IRPCollection relationsTypes, java.lang.String createContent)
elementsToPopulate
- the elements (nodes) to add to the diagramrelationsTypes
- the types of relations that should be drawn on the diagram. You can use the string AllRelations to display all types, or use any combination of the following strings: Composition, Association, Link, Dependency, Inheritance, Anchor, InformationFlowcreateContent
- the elements that should be included in addition to those specified. This argument can take any of the following strings: among, from, to, fromto. If you use "among", only the elements you specified will be included. If you use one of the other strings, the diagram will also include elements that the selected elements are related to
IRPApplication app = RhapsodyAppServer.getActiveRhapsodyApplication();
IRPProject project = app.activeProject();
IRPCollection packages = project.getPackages();
IRPCollection relTypes = app.createNewCollection();
relTypes.setSize(3);
relTypes.setString(1, "Composition");
relTypes.setString(2, "Association");
relTypes.setString(3, "Dependency");
IRPObjectModelDiagram diagram2 = project.addObjectModelDiagram("PopulateTest1");
diagram2.populateDiagram(packages, relTypes, "fromto");
void removeGraphElements(IRPCollection elementsToRemove)
elementsToRemove
- a collection of IRPGraphElement objects, representing the graphic elements that should be removed from the diagramvoid setShowDiagramFrame(int bShow)
bShow
- use 1 to show the diagram frame, 0 to hide the frame.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |