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 shape.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.aspose.slides.AutoShape
AutoShape.AutoShapePath
 
Method Summary
 void connectBegin(Shape shape, int connectionSite)
          Connects or disconnects start of a connector.
 void connectEnd(Shape shape, int connectionSite)
          Connects or disconnects end of a connector.
 Shape getBeginConnectedShape()
          Returns the first shape attached to a connector.
 int getBeginConnectionSite()
          Returns the connection point on the first shape.
 int getConnectorType()
          Returns the type of a connector.
 Shape getEndConnectedShape()
          Returns the second shape attached to a connector.
 int getEndConnectionSite()
          Returns the connection point on the second shape.
 void serialize(java.io.OutputStream stream)
          Serializes a Connector to a stream.
 void setConnectorType(int value)
          Sets the type of a connector.
 void validate()
          Ensures that connector's start and end points lie on connection sites.
 
Methods inherited from class com.aspose.slides.AutoShape
getAdjustments, getPaths, getShapeType, getTextRectangle
 
Methods inherited from class com.aspose.slides.Shape
addLink, addTextFrame, clearLink, createShapeElements, createShapeElements, getAlternativeText, getAnimationSettings, getConnectionSites, getConnectionSitesRaw, getFillFormat, getHeight, getLineFormat, getLink, getMasterShapeId, getName, getParent, getPlaceholder, getProtection, getRotation, getShadowFormat, getShapeId, getShapeRectangle, getTags, getTextFrame, getThreeDFormat, getWidth, getX, getY, getZOrderPosition, hasExternalData, isFlipHorizontal, isFlipVertical, isHidden, isMasterTextHolder, isTextHolder, setAlternativeText, setFlipHorizontal, setFlipVertical, setHeight, setHidden, setName, setProtection, setRotation, setWidth, setX, setY, zOrder
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getConnectorType

public int getConnectorType()
Returns the type of a connector. See ConnectorType.


setConnectorType

public void setConnectorType(int value)
Sets the type of a connector.

Parameters:
value - new type of a connector. See ConnectorType.

getBeginConnectedShape

public Shape getBeginConnectedShape()
Returns the first shape attached to a connector.


getEndConnectedShape

public Shape getEndConnectedShape()
Returns the second shape attached to a connector.


getBeginConnectionSite

public int getBeginConnectionSite()
Returns the connection point on the first shape.


getEndConnectionSite

public int getEndConnectionSite()
Returns the connection point on the second shape.


validate

public void validate()
Ensures that connector's start 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 and 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 start of a connector.

Parameters:
shape - first shape to attach to a connector or null to disconnect.
connectionSite - index of a connection site.
Throws:
PptEditException

connectEnd

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

Parameters:
shape - second shape to attach to a connector or null to disconnect.
connectionSite - index of a connection site.
Throws:
PptEditException

serialize

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

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