com.aspose.slides
Class Connector

java.lang.Object
  extended by com.aspose.slides.Shape
      extended by com.aspose.slides.AutoShape
          extended by com.aspose.slides.Connector
All Implemented Interfaces:
IShape, IShapeFormat

public final class Connector
extends AutoShape

Represents a connector autoshape.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.aspose.slides.AutoShape
AutoShape.AutoShapePath
 
Field Summary
 
Fields inherited from class com.aspose.slides.AutoShape
adjustValues
 
Fields inherited from class com.aspose.slides.Shape
defaultConnectionPoints, emptyConnectionPoints, emptyShape, m_anchor, m_animationSettings, m_fillFormat, m_frame, m_lineFormat, m_link, m_nFSTVersion, m_options, m_parent, m_shadowFormat, m_shapesParent, m_tags, m_TextFrame, m_version
 
Method Summary
 void connectBegin(Shape shape, int connectionSite)
          Connects or disconnects begin of the connector.
 void connectEnd(Shape shape, int connectionSite)
          Connects or disconnects end of the connector.
 Shape getBeginConnectedShape()
          Returns the shape which is the first connection for a connector.
 int getBeginConnectionSite()
          Returns the connection point on the BeginConnectedShape.
 int getConnectorType()
          Returns connector's type.
 Shape getEndConnectedShape()
          Returns the shape which is the second connection for a connector.
 int getEndConnectionSite()
          Returns the connection point on the EndConnectedShape.
 void serialize(java.io.OutputStream stream)
          Serializes a Connector object to the stream.
 void setConnectorType(int value)
          Sets connector's type.
 void validate()
          Ensures connector's begin and end points lie on connection sites.
 
Methods inherited from class com.aspose.slides.AutoShape
getAdjustments, getShapeType, getTextRectangle, getValid
 
Methods inherited from class com.aspose.slides.Shape
addLink, addTextFrame, clearLink, createShapeElements, createShapeElements, getAlternativeText, getAnchor, getAnimationSettings, getConnectionSites, getConnectionSitesRaw, getFillFormat, getFrame, getgeoBottom, getgeoRight, getHeight, getLineFormat, getLink, getMasterShapeId, getName, getOptions, getParent, getPlaceholder, getRotation, getRotation0_360, getShadowFormat, getShapeId, getShapeRectangle, getTags, getTextFrame, getThreeDFormat, getWidth, getX, getY, getZOrderPosition, hasExternalData, isFlipH, isFlipV, isHidden, isMasterTextHolder, isTextHolder, setAlternativeText, setFlipH, setFlipV, setHeight, setHidden, setName, setRotation, setWidth, setX, setY, shouldDraw, zOrder
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getConnectorType

public int getConnectorType()
Returns connector's type.

Returns:
The connector's type. See ConnectorType.

setConnectorType

public void setConnectorType(int value)
Sets connector's type.

Parameters:
value - the connector's type. See ConnectorType.

getBeginConnectedShape

public Shape getBeginConnectedShape()
Returns the shape which is the first connection for a connector.

Returns:
The shape which is the first connection for a connector. See Shape.

getEndConnectedShape

public Shape getEndConnectedShape()
Returns the shape which is the second connection for a connector.

Returns:
The shape which is the second connection for a connector. See Shape.

getBeginConnectionSite

public int getBeginConnectionSite()
Returns the connection point on the BeginConnectedShape.

Returns:
The connection point on the BeginConnectedShape.

getEndConnectionSite

public int getEndConnectionSite()
Returns the connection point on the EndConnectedShape.

Returns:
The connection point on the EndConnectedShape.

validate

public void validate()
Ensures connector's begin and end points lie on connection sites. Aspose.Slides automatically validates connectors before drawing, saving etc. You may need to call this method when moved some shapes and want to get correct connectors size an position. If you want to move connector along with connected shapes without changing connector's shape, simply move all connected shapes to same distance and direction without Validate() call between movements.


connectBegin

public void connectBegin(Shape shape,
                         int connectionSite)
                  throws PptEditException
Connects or disconnects begin of the connector.

Parameters:
shape - a shape to which to connect or null to disconnect.
connectionSite - an index of a connection site.
Throws:
PptEditException

connectEnd

public void connectEnd(Shape shape,
                       int connectionSite)
                throws PptEditException
Connects or disconnects end of the connector.

Parameters:
shape - a shape to which to connect or null to disconnect.
connectionSite - an index of a connection site.
Throws:
PptEditException

serialize

public void serialize(java.io.OutputStream stream)
               throws PptException
Serializes a Connector object to the stream.

Overrides:
serialize in class AutoShape
Parameters:
stream - The stream to which the Shape is to be serialized.
Throws:
PptException