public class Shape
Constructor Summary |
---|
Shape()
Constructor. |
Property Getters/Setters Summary | ||
---|---|---|
Aspose.Diagram.ActiveXControls.ActiveXControl | getActiveXControl() | |
Gets the ActiveX control.
|
||
ActCollection | getActs() | |
Contains a collection of Act elements.
|
||
Align | getAlign() | |
Indicates the alignment of a shape with respect to the guide or guide point to which the shape is glued. The Align element appears only for shapes that are glued to guides or guide points.
|
||
CharCollection | getChars() | |
Contains a collection of Char elements.
|
||
ConnectionABCDCollection | getConnectionABCDs() | |
Contains a collection of ConnectionABCD elements.
|
||
ConnectionCollection | getConnections() | |
Contains a collection of Connection elements.
|
||
byte[] | getControlData() | |
Gets the data of control.
|
||
ControlCollection | getControls() | |
Contains a collection of Control elements.
|
||
java.lang.String | getData1() | |
void | setData1(java.lang.Stringvalue) | |
Contains an arbitrary string value that is used to supply additional information about a shape. | ||
java.lang.String | getData2() | |
void | setData2(java.lang.Stringvalue) | |
Contains an arbitrary string value that is used to supply additional information about a shape. | ||
java.lang.String | getData3() | |
void | setData3(java.lang.Stringvalue) | |
Contains an arbitrary string value that is used to supply additional information about a shape. | ||
int | getDel() | |
void | setDel(intvalue) | |
A flag indicating whether the element is deleted locally. A value of 1 indicates that the element is deleted locally. The value of the property is BOOL integer constant. | ||
Diagram | getDiagram() | |
void | setDiagram(Diagram value) | |
Root element of Visio objects hierarchy. | ||
Event | getEvent() | |
void | ||
Contains elements that specify formulas that control shape events. | ||
FieldCollection | getFields() | |
Contains a collection of Field elements.
|
||
Fill | getFill() | |
Contains the current fill formatting values for the shape and the shape's drop shadow, including pattern, foreground color, and background color.
|
||
StyleSheet | getFillStyle() | |
void | setFillStyle(StyleSheet value) | |
StyleSheet from which this shape inherits fill formatting. | ||
Foreign | getForeign() | |
Contains elements specifying the width and height of an object from another program used in a Microsoft Visio document. Also includes elements specifying the distance the object's image is offset within its borders.
|
||
ForeignData | getForeignData() | |
Contains a MIME (Multipurpose Internet Mail Extensions) encoded BLOB of picture data, such as Windows metafile, bitmap, or OLE data.
|
||
GeomCollection | getGeoms() | |
Contains a collection of Geom elements.
|
||
Group | getGroup() | |
Contains elements that control how you add shapes to a group, move members of a group, and select groups.
|
||
Help | getHelp() | |
Contains elements specifying the Shape element's Help file topic and copyright information.
|
||
HyperlinkCollection | getHyperlinks() | |
Contains a collection of Hyperlink elements.
|
||
long | getID() | |
void | setID(longvalue) | |
The unique ID of the element within its parent element. | ||
Image | getImage() | |
Contains the gamma, brightness, contrast, blur, sharpen, denoise, and transparency values for a bitmap.
|
||
CharCollection | getInheritChars() | |
Contains the char values for the shape inherit by the master shape.
|
||
Fill | getInheritFill() | |
Contains the fill formatting values for the shape inherit by the parent style and the master shape.
|
||
Line | getInheritLine() | |
Contains the line formatting values for the shape inherit by the parent style and the master shape.
|
||
PropCollection | getInheritProps() | |
Contains the props for the shape inherit by the master shape.
|
||
boolean | isTextEmpty() | |
Indicate the shape has text and the text is empty or not.
|
||
LayerMem | getLayerMem() | |
Contains the LayerMember element, which specifies each layer to which the shape is assigned.
|
||
Layout | getLayout() | |
Contains elements that control shape placement and connector routing settings.
|
||
Line | getLine() | |
Contains elements that control line attributes for a shape, such as pattern, weight, and color. These elements determine whether the line ends are formatted (for example, with an arrowhead), the size of line end formats, radius of the rounding circle applied to the line, and line cap style (round or square).
|
||
StyleSheet | getLineStyle() | |
void | setLineStyle(StyleSheet value) | |
StyleSheet from which this shape inherits line formatting | ||
Master | getMaster() | |
void | ||
The Master from which the shape inherits its data. | ||
Shape | getMasterShape() | |
void | setMasterShape(Shape value) | |
This attribute may only be present in shapes that are members of a group shape, and the group is an instance of a master. The attribute contains an ID that references the corresponding sub-shape in the master. | ||
Misc | getMisc() | |
Contains elements specifying the Shape element's Help file topic and copyright information.
|
||
java.lang.String | getName() | |
void | setName(java.lang.Stringvalue) | |
The name of the element. | ||
java.lang.String | getNameU() | |
void | setNameU(java.lang.Stringvalue) | |
The universal name of the element. | ||
boolean | getOneD() | |
Determines whether the shape behaves as a one-dimensional (1-D) object. Read-only.
|
||
Page | getPage() | |
void | ||
Root element of Visio objects hierarchy. | ||
ParaCollection | getParas() | |
Contains a collection of Para elements.
|
||
Shape | getParentShape() | |
void | setParentShape(Shape value) | |
Shape's parent. | ||
PropCollection | getProps() | |
void | setProps(PropCollection value) | |
Contains a collection of Prop elements. | ||
Protection | getProtection() | |
Locking helps prevent inadvertent changes to the shape but does not prevent Microsoft Visio from resetting values in other circumstances. It also does not protect against changes made in the ShapeSheet window.
|
||
ScratchCollection | getScratchs() | |
Contains a collection of Scratch elements.
|
||
ShapeCollection | getShapes() | |
Contains a collection of Shape elements.
|
||
SmartTagDefCollection | getSmartTagDefs() | |
Contains a collection of SmartTagDef elements.
|
||
TabsCollection | getTabsCollection() | |
Contains a collection of Tab elements.
|
||
Text | getText() | |
void | ||
Contains the text of a shape. | ||
TextBlock | getTextBlock() | |
Contains elements that specify the alignment, margins, and default tab stop positions of text in a shape's text block.
|
||
StyleSheet | getTextStyle() | |
void | setTextStyle(StyleSheet value) | |
StyleSheet from which this shape inherits text formatting. | ||
TextXForm | getTextXForm() | |
Contains elements that specify positioning information about a shape's text block.
|
||
ThreeDFormat | getThreeDFormat() | |
Gets the ThreeDFormat.
|
||
boolean | getTwoD() | |
void | setTwoD(booleanvalue) | |
Determines whether the shape behaves as a two-dimensional (2-D) object. | ||
int | getType() | |
void | setType(intvalue) | |
The type of a shape. It may be one of the following values: Group, Shape, Guide, or Foreign. The value of the property is TypeValue integer constant. | ||
java.util.UUID | getUniqueID() | |
A GUID (globally unique identifier) assigned to the shape.
|
||
UserCollection | getUsers() | |
Contains a collection of User elements.
|
||
XForm | getXForm() | |
void | ||
Contains elements specifying general positioning information about a shape. | ||
XForm1D | getXForm1D() | |
void | setXForm1D(XForm1D value) | |
Contains x- and y-coordinates of the begin point and end point of a 1-D shape. This element appears for 1-D shapes only. | ||
int | getZOrderIndex() | |
Returns the index of a shape in the z-order except the guide shape.
|
Method Summary | ||
---|---|---|
void | bringForward() | |
Brings the shape forward one position in the z-order.
|
||
void | bringToFront() | |
Brings the shape to the front of the z-order.
|
||
long[] | connectedShapes(int flag, java.lang.String categoryFilter) | |
Returns an array that contains the identifiers (IDs) of the shapes that are connected to the shape.
|
||
void | copy(Shape source) | |
int | getConnectorsType() | |
Get Connectors type
|
||
long[] | gluedShapes(int flag, java.lang.String categoryFilter, Shape otherShape) | |
Returns an array that contains the identifiers of the shapes that are glued to a shape.
|
||
boolean | isConnected(Shape shape) | |
Indicates whether this two shapes are connected.
|
||
boolean | isGlued(Shape shape) | |
Indicates whether this two shapes are glued.
|
||
boolean | isInGroup() | |
Indicates whether this shape is in a group shape.
|
||
void | move(double dX, double dY) | |
Moves shape on the dX and dY inches from current position.
|
||
void | moveTo(double newPinX, double newPinY) | |
Moves shape on new absolute position on the page.
|
||
void | refreshData() | |
Refreshes shape's position including xform ,connection and geom when changing shape's text or other's .
|
||
void | sendBackward() | |
Moves the shape back one position in the z-order.
|
||
void | sendToBack() | |
Moves the shape to the back of the z-order.
|
||
void | setAngle(double angle) | |
Sets new angle of shape.
The angle's unit is radian.
|
||
void | setConnectorsType(int type) | |
Set Connectors type
|
||
void | setHeight(double height) | |
Sets new height of shape.
|
||
void | setWidth(double width) | |
Sets new width of shape.
|
||
void | toHTML(java.io.OutputStream stream, HTMLSaveOptions options) | |
Creates the shape html and saves it to a stream in the specified format.
|
||
void | toHTML(java.lang.String fileName, HTMLSaveOptions options) | |
Creates the html and saves it to a file.
|
||
void | toImage(java.io.OutputStream stream, ImageSaveOptions options) | |
Creates the shape image and saves it to a stream in the specified format.
|
||
void | toImage(java.lang.String imageFile, ImageSaveOptions options) | |
Creates the shape image and saves it to a file.
The extension of the file name determines the format of the image.
|
||
void | toPdf(java.io.OutputStream stream) | |
Creates the shape pdf and saves it to a stream.
|
||
void | toPdf(java.lang.String fileName) | |
Saves the shape to a pdf file.
|
||
void | toSvg(java.lang.String imageFile, SVGSaveOptions options) | |
Saves the shape to a svg file.
|
public long getID() / public void setID(long value)
public int getDel() / public void setDel(int value)
public java.util.UUID getUniqueID()
public java.lang.String getName() / public void setName(java.lang.String value)
public java.lang.String getNameU() / public void setNameU(java.lang.String value)
public int getType() / public void setType(int value)
public StyleSheet getLineStyle() / public void setLineStyle(StyleSheet value)
public StyleSheet getFillStyle() / public void setFillStyle(StyleSheet value)
public StyleSheet getTextStyle() / public void setTextStyle(StyleSheet value)
public ShapeCollection getShapes()
public Text getText() / public void setText(Text value)
public XForm getXForm() / public void setXForm(XForm value)
public Line getLine()
public Fill getFill()
public CharCollection getInheritChars()
public PropCollection getInheritProps()
public Line getInheritLine()
public Fill getInheritFill()
public XForm1D getXForm1D() / public void setXForm1D(XForm1D value)
public Event getEvent() / public void setEvent(Event value)
public LayerMem getLayerMem()
public Foreign getForeign()
public TextBlock getTextBlock()
public TextXForm getTextXForm()
public Align getAlign()
public Protection getProtection()
public Help getHelp()
public Misc getMisc()
public Image getImage()
public Group getGroup()
public Layout getLayout()
public CharCollection getChars()
public ParaCollection getParas()
public ScratchCollection getScratchs()
public ConnectionCollection getConnections()
public ConnectionABCDCollection getConnectionABCDs()
public FieldCollection getFields()
public ControlCollection getControls()
public GeomCollection getGeoms()
public ActCollection getActs()
public UserCollection getUsers()
public PropCollection getProps() / public void setProps(PropCollection value)
public HyperlinkCollection getHyperlinks()
public SmartTagDefCollection getSmartTagDefs()
public TabsCollection getTabsCollection()
public java.lang.String getData1() / public void setData1(java.lang.String value)
public java.lang.String getData2() / public void setData2(java.lang.String value)
public java.lang.String getData3() / public void setData3(java.lang.String value)
public ForeignData getForeignData()
public Shape getMasterShape() / public void setMasterShape(Shape value)
public Master getMaster() / public void setMaster(Master value)
public Shape getParentShape() / public void setParentShape(Shape value)
public Diagram getDiagram() / public void setDiagram(Diagram value)
public Page getPage() / public void setPage(Page value)
public boolean getOneD()
public boolean getTwoD() / public void setTwoD(boolean value)
public boolean isTextEmpty()
public byte[] getControlData()
public Aspose.Diagram.ActiveXControls.ActiveXControl getActiveXControl()
public int getZOrderIndex()
public ThreeDFormat getThreeDFormat()
public void toPdf(java.io.OutputStream stream) throws java.lang.Exception
stream
- The output stream.public void toPdf(java.lang.String fileName) throws java.lang.Exception
fileName
- the pdf file name with full pathpublic void toImage(java.lang.String imageFile, ImageSaveOptions options) throws java.lang.Exception
The format of the image is specified by using the extension of the file name. For example, if you specify "myfile.png", then the image will be saved in the PNG format. The following file extensions are recognized: .bmp, .gif, .png, .jpg, .jpeg, .tiff, .tif, .emf.
imageFile
- The image file name with full path.options
- Addtional image creation optionspublic void toImage(java.io.OutputStream stream, ImageSaveOptions options) throws java.lang.Exception
stream
- The output stream.options
- Addtional image creation optionspublic void toSvg(java.lang.String imageFile, SVGSaveOptions options) throws java.lang.Exception
fileName
- the svg file name with full pathpublic void toHTML(java.lang.String fileName, HTMLSaveOptions options) throws java.lang.Exception
imageFile
- The file name with full path.options
- html save optionspublic void toHTML(java.io.OutputStream stream, HTMLSaveOptions options) throws java.lang.Exception
stream
- The output stream.options
- Addtional html creation optionspublic int getConnectorsType()
public void setConnectorsType(int type)
type
- A ConnectorsTypeValue value.public void copy(Shape source) throws java.lang.Exception
public void bringForward() throws java.lang.Exception
public void sendBackward() throws java.lang.Exception
public void bringToFront()
public void sendToBack()
public long[] connectedShapes(int flag, java.lang.String categoryFilter) throws java.lang.Exception
flag
- A categoryFilter
- Filters the array of returned shape IDs by limiting it to the IDs of shapes that match the specified categorypublic boolean isInGroup()
public boolean isConnected(Shape shape) throws java.lang.Exception
shape
- shapepublic boolean isGlued(Shape shape) throws java.lang.Exception
shape
- shapepublic void refreshData() throws java.lang.Exception
public long[] gluedShapes(int flag, java.lang.String categoryFilter, Shape otherShape) throws java.lang.Exception
flag
- A categoryFilter
- Filters the array of returned shape IDs by limiting it to the IDs of shapes that match the specified categoryotherShape
- Optional: additional shape to which returned shapes must also be glued, can be public void setWidth(double width) throws java.lang.Exception
width
- New widthpublic void setHeight(double height) throws java.lang.Exception
height
- New heigthpublic void setAngle(double angle) throws java.lang.Exception
angle
- New angle which unit is radian not degreepublic void moveTo(double newPinX, double newPinY) throws java.lang.Exception
newPinX
- New x-coordinate of the shape's pin (center of rotation) in relation to the origin of its parent.newPinY
- New y-coordinate of the shape's pin (center of rotation) in relation to the origin of its parent.public void move(double dX, double dY) throws java.lang.Exception
dX
- X offsetdY
- Y offset