Class Shape
This abstract class represents a picture of an artifact in a diagram type.
public class Shape
extends DBItem
Hierarchical Diagram
Direct Known Subclasses
• ComponentShape
• PortShape
Constructor
public Shape()
Methods
• getPrototype
Returns the prototype of this shape, or null if the shape itself is a prototype.
public Shape getPrototype()
Throws: RSDException
• hasInstances
Returns true if this shape has instances.
public boolean hasInstances()
Throws: RSDException
• getInstances
Returns an iterator of the instances of this shape. Returns null if the shape is not a prototype.
public Iterator getInstances()
Throws: RSDException
• getInstanceVector
Returns a vector of the instances of this shape. Returns null if the shape is not a prototype.
public Vector getInstanceVector()
Throws: RSDException
• getArtifact
Returns the artifact represented by this shape.
public Artifact getArtifact()
Throws: RSDException
• getContainer
Returns the container of this shape, or null if this shape has no container.
public ComponentShape getContainer()
Throws: RSDException
• getTopLevelContainer
Returns the top level container of this shape, or null if this shape has no container.
public ComponentShape getTopLevelContainer()
Throws: RSDException
• getDiagramType
Returns the ID of the diagram type of this shape.
public int getDiagramType()
Throws: RSDException
• getDatum
Returns the datum coordinate (x,y) of this shape.
public Coordinate getDatum(boolean onCurrentSheet)
When this shape is on the current sheet, set onCurrentSheet to true. Otherwise it should be false. It can take some time to find a shape on a sheet that is not the current sheet.
Throws: RSDException
• getDraftGroup
Returns the draft group containing the shape.
public getDraftGroup()
• getSheet
Returns the sheet that contains the shape.
public Sheet getSheet()
Throws: RSDException
• getXRefInfo
Returns the column, row, and location set of the shape on the sheet.
public Object[] getXRefInfo()
Throws: RSDException
• getLayer
Returns the current layer of this shape as a layer object.
public rsdesigner.design.Layer getLayer ( )
Throws: rsdesigner.design.RSDException if unable to retrieve the layer name.
• inDraftGroup
Returns true if this shape is in a draft group.
public boolean inDraftGroup()
• setColor
Changes this shape’s color to the given index. This shape must be on the current design sheet.
public void setColor (int index)
Where:
index—The index is a valid color index (1 <= index <= highest index). The color setting is also applied to the shape labels.
Throws: RSDException
• getColor
Returns the color index of this shape. This shape must be on the current sheet.
public int getColor()
Throws: RSDException when this shape is not on the current sheet.
Methods Inherited
The methods inherited from other classes are:
Class | Methods Inherited |
java.lang.Object | equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |