com.mindoo.remote.api.symphony.presentation
Interface IRemoteShapes


public interface IRemoteShapes

This class represents a collection of shapes.

Access

To get all the shapes of a page, use the Shapes property in the Page class.


Method Summary
 IRemoteConnectorShape addConnector(IRemoteShape beginShape, IRemoteShape endShape)
          This method creates a connector.
 IRemoteConnectorShape addConnector(IRemoteShape beginShape, IRemoteShape endShape, int connectorType)
          This method creates a connector.
 IRemoteConnectorShape addConnector(IRemoteShape beginShape, IRemoteShape endShape, int connectorType, int beginPosition, int endPosition)
          This method creates a connector.
 IRemoteConnectorShape addConnectorByPosition(int beginX, int beginY, int endX, int endY)
          This method creates a connector.
 IRemoteConnectorShape addConnectorByPosition(int beginX, int beginY, int endX, int endY, int connectorType)
          This method creates a connector.
 IRemoteEllipseShape addEllipse(int left, int top, int width, int height)
          This method creates an ellipse shape.
 IRemoteEllipseShape addEllipse(int left, int top, int width, int height, int type, int beginAngle, int endAngle)
          This method creates an ellipse shape.
 IRemoteGraphicShape addGraphic(java.lang.String fileName, int left, int top)
          This method creates a graphic shape.
 IRemoteGraphicShape addGraphic(java.lang.String fileName, int left, int top, int width, int height)
          This method creates a graphic shape.
 IRemoteGroupShape addGroup(IRemoteShape[] shapes)
          This method creates a group.
 IRemoteLineShape addLine(int beginX, int beginY, int endX, int endY)
          This method creates a line shape.
 IRemoteMeasureShape addMeasure(int beginX, int beginY, int endX, int endY)
          This method creates a measure shape.
 IRemoteTextShape addOutliner()
          This method creates an outline on a page.
 IRemoteRectangleShape addRectangle(int left, int top, int width, int height)
          This method creates a rectangle shape.
 IRemoteShape addShape(int type, int left, int top, int width, int height)
          This method creates a shape.
 IRemoteTextShape addSubTitle(java.lang.String subTitle)
          This method creates a subtitle on a page.
 IRemoteTextShape addTitle(java.lang.String title)
          This method creates a title on a page.
 int countByType(int shapeType)
          This method returns the number of specified type of shapes.
 void exportToImage(java.lang.String fileName, int imagetype, int quality)
          This method exports all or some of the shapes on a page to an image file.
 void exportToImage(java.lang.String fileName, int imagetype, int quality, IRemoteShape[] shapes)
          This method exports all or some of the shapes on a page to an image file.
 int getCount()
          This property represents the number of shapes.
 IRemoteTables getTables()
          This property represents all the table shapes in the shapes collection.
 IRemoteShape item(int index)
          This method returns a shape according to an index.
 IRemoteShape itemByType(int shapeType, int index)
          This method returns a shape according to the shape type and index.
 

Method Detail

addRectangle

IRemoteRectangleShape addRectangle(int left,
                                   int top,
                                   int width,
                                   int height)
                                   throws RemoteEclipseAPIException
This method creates a rectangle shape.

Parameters:
left - Specifies the left position at the top left of the page in 1/100th mm.
top - Specifies the top position at the top left of the page in 1/100th mm.
width - Specifies the width of the rectangle in 1/100th mm.
height - Specifies the height of the rectangle in 1/100th mm.
Returns:
A RectangleShape object that represents a rectangle shape.
Throws:
RemoteEclipseAPIException

addEllipse

IRemoteEllipseShape addEllipse(int left,
                               int top,
                               int width,
                               int height)
                               throws RemoteEclipseAPIException
This method creates an ellipse shape.

Parameters:
left - Specifies the left position at the top left of the page in 1/100th mm.
top - Specifies the top position at the top left of the page in 1/100th mm.
width - Specifies the width of the shape in 1/100th mm.
height - Specifies the height of the shape in 1/100th mm.
Returns:
A EllipseShape object that represents an ellipse shape.
Throws:
RemoteEclipseAPIException

addEllipse

IRemoteEllipseShape addEllipse(int left,
                               int top,
                               int width,
                               int height,
                               int type,
                               int beginAngle,
                               int endAngle)
                               throws RemoteEclipseAPIException
This method creates an ellipse shape.

Parameters:
left - Specifies the left position at the top left of the page in 1/100th mm.
top - Specifies the top position at the top left of the page in 1/100th mm.
width - Specifies the width of the shape in 1/100th mm.
height - Specifies the height of the shape in 1/100th mm.
type - Specifies the type of the shape. The type is a constant and can be one of the following values:

ConstantValueDescription
EllipseShape.CIRCLETYPE_FULL0specifies a full circle.
EllipseShape.CIRCLETYPE_SECTION1specifies a circle with a cut connected by two lines.
EllipseShape.CIRCLETYPE_CUT2specifies a circle with a cut connected by a line.
EllipseShape.CIRCLETYPE_ARC3specifies a circle with an open cut.
beginAngle - Specifies the angle of the first line in 1/100th degree.
endAngle - Specifies the angle of the second line in 1/100th degree.
Returns:
A EllipseShape object that represents an ellipse shape.
Throws:
RemoteEclipseAPIException

addLine

IRemoteLineShape addLine(int beginX,
                         int beginY,
                         int endX,
                         int endY)
                         throws RemoteEclipseAPIException
This method creates a line shape.

Parameters:
beginX - Specifies the X coordinate of the original point in 1/100th mm.
beginY - Specifies the Y coordinate of the original point in 1/100th mm.
endX - Specifies the X coordinate of the end point in 1/100th mm.
endY - Specifies the Y coordinate of the end point in 1/100th mm.
Returns:
A LineShape object that represents a line shape.
Throws:
RemoteEclipseAPIException

addConnectorByPosition

IRemoteConnectorShape addConnectorByPosition(int beginX,
                                             int beginY,
                                             int endX,
                                             int endY)
                                             throws RemoteEclipseAPIException
This method creates a connector.

Parameters:
beginX - Specifies the X coordinate of the original point in 1/100th mm.
beginY - Specifies the Y coordinate of the original point in 1/100th mm.
endX - Specifies the X coordinate of the end point in 1/100th mm.
endY - Specifies the Y coordinate of the end point in 1/100th mm.
Returns:
A ConnectorShape object that represents a connector.
Throws:
RemoteEclipseAPIException

addConnector

IRemoteConnectorShape addConnector(IRemoteShape beginShape,
                                   IRemoteShape endShape)
                                   throws RemoteEclipseAPIException
This method creates a connector.

Parameters:
beginShape - Specifies the source shape of the connector.
endShape - Specifies the target shape of the connector.
Returns:
A ConnectorShape object that represents a connector.
Throws:
RemoteEclipseAPIException

addConnector

IRemoteConnectorShape addConnector(IRemoteShape beginShape,
                                   IRemoteShape endShape,
                                   int connectorType)
                                   throws RemoteEclipseAPIException
This method creates a connector.

Parameters:
beginShape - Specifies the source shape of the connector.
endShape - Specifies the target shape of the connector.
connectorType - Specifies the type of the connector. The type is a constant and can be one of the following values:
  • ConnectorShape.CONNECTORTYPE_STANDARD specifies that the connector is drawn with three lines, with the middle line perpendicular to the other two.
  • ConnectorShape.CONNECTORTYPE_CURVE specifies that the connector is drawn as a curve.
  • ConnectorShape.CONNECTORTYPE_STRAIGHT specifies that the connector is drawn as a straight line.
  • ConnectorShape.CONNECTORTYPE_LINE specifies that the connector is drawn with three lines.
Returns:
A ConnectorShape object that represents a connector.
Throws:
RemoteEclipseAPIException

addConnectorByPosition

IRemoteConnectorShape addConnectorByPosition(int beginX,
                                             int beginY,
                                             int endX,
                                             int endY,
                                             int connectorType)
                                             throws RemoteEclipseAPIException
This method creates a connector.

Parameters:
beginX - Specifies the X coordinate of the original point in 1/100th mm.
beginY - Specifies the Y coordinate of the original point in 1/100th mm.
endX - Specifies the X coordinate of the end point in 1/100th mm.
endY - Specifies the Y coordinate of the end point in 1/100th mm.
connectorType - Specifies the type of the connector. The type is a constant and can be one of the following values:

ConstantValueDescription
ConnectorShape.CONNECTORTYPE_STANDARD0specifies that the connector is drawn with three lines, with the middle line perpendicular to the other two.
ConnectorShape.CONNECTORTYPE_CURVE1specifies that the connector is drawn as a curve.
ConnectorShape.CONNECTORTYPE_STRAIGHT2specifies that the connector is drawn as a straight line.
ConnectorShape.CONNECTORTYPE_LINE3specifies that the connector is drawn with three lines.
Returns:
A ConnectorShape object that represents a connector.
Throws:
RemoteEclipseAPIException

addConnector

IRemoteConnectorShape addConnector(IRemoteShape beginShape,
                                   IRemoteShape endShape,
                                   int connectorType,
                                   int beginPosition,
                                   int endPosition)
                                   throws RemoteEclipseAPIException
This method creates a connector.

Parameters:
beginShape - Specifies the source shape of the connector.
endShape - Specifies the target shape of the connector.
connectorType - Specifies the type of the connector. The type is a constant and can be one of the following values:
  • ConnectorShape.CONNECTORTYPE_STANDARD specifies that the connector is drawn with three lines, with the middle line perpendicular to the other two.
  • ConnectorShape.CONNECTORTYPE_CURVE specifies that the connector is drawn as a curve.
  • ConnectorShape.CONNECTORTYPE_STRAIGHT specifies that the connector is drawn as a straight line.
  • ConnectorShape.CONNECTORTYPE_LINE specifies that the connector is drawn with three lines.
beginPosition - Specifies the anchor on the source shape. The anchor is a constant and can be one of the following values:
  • ConnectorShape.POSITION_DEFAULT specifies the favorite position.
  • ConnectorShape.POSITION_TOP specifies middle top of the shape.
  • ConnectorShape.POSITION_RIGHT specifies the middle right of the shape.
  • ConnectorShape.POSITION_BOTTOM specifies the middle bottom of the shape.
  • ConnectorShape.POSITION_LEFT specifies the middle left of the shape .
endPosition - Specifies the anchor on the target shape. The anchor is a constant and can be one of the following values:
  • ConnectorShape.POSITION_DEFAULT specifies the favorite position.
  • ConnectorShape.POSITION_TOP specifies middle top of the shape.
  • ConnectorShape.POSITION_RIGHT specifies the middle right of the shape.
  • ConnectorShape.POSITION_BOTTOM specifies the middle bottom of the shape.
  • ConnectorShape.POSITION_LEFT specifies the middle left of the shape .
Returns:
A ConnectorShape object that represents a connector.
Throws:
RemoteEclipseAPIException

addShape

IRemoteShape addShape(int type,
                      int left,
                      int top,
                      int width,
                      int height)
                      throws RemoteEclipseAPIException
This method creates a shape.

Parameters:
type - Specifies the type of the shape. The value is a constant and can be one of the following values:

ConstantValueDescription
Constant.SHAPE_TYPE_TEXTSHAPE0specifies a text box.
Constant.SHAPE_TYPE_TABLESHAPE1specifies a table.
Constant.SHAPE_TYPE_RECTANGLESHAPE2specifies a rectangle shape.
Constant.SHAPE_TYPE_ELLIPSESHAPE3specifies an ellipse shape.
Constant.SHAPE_TYPE_LINESHAPE4specifies a line shape.
Constant.SHAPE_TYPE_CONNECTORSHAPE5specifies a connector shape.
Constant.SHAPE_TYPE_GROUPSHAPE6specifies a group shape.
Constant.SHAPE_TYPE_MEASURESHAPE7specifies a measure shape.
Constant.SHAPE_TYPE_GRAPHICSHAPE8specifies a graphic shape.
Constant.SHAPE_TYPE_UNKNOWNSHAPE1024specifies a unknown shape.
left - Specifies the left position at the top left of the page, in 1/100th mm.
top - Specifies the top position at the top left of the page, in 1/100th mm.
width - Specifies the width of the shape in 1/100th mm.
height - Specifies the height of the shape in 1/100th mm.
Returns:
A Shape object that represents a shape object.
Throws:
RemoteEclipseAPIException

addGraphic

IRemoteGraphicShape addGraphic(java.lang.String fileName,
                               int left,
                               int top,
                               int width,
                               int height)
                               throws RemoteEclipseAPIException
This method creates a graphic shape.

Parameters:
fileName - Specifies the graphic file. If the graphic file does not exist, this method throws an exception.
left - Specifies the left position at the top left of the page in 1/100th mm.
top - Specifies the top position at the top left of the page in 1/100th mm.
width - Specifies the width of the graphic shape in 1/100th mm.
height - Specifies the height of the graphic shape in 1/100th mm.
Returns:
A GraphicShape object that represents a graphic shape.
Throws:
RemoteEclipseAPIException

addGraphic

IRemoteGraphicShape addGraphic(java.lang.String fileName,
                               int left,
                               int top)
                               throws RemoteEclipseAPIException
This method creates a graphic shape.

Parameters:
fileName - Specifies the graphic file. If the graphic file does not exist, this method throws an exception.
left - Specifies the left position at the top left of the page in 1/100th mm.
top - Specifies the top position at the top left of the page in 1/100th mm.
Returns:
A GraphicShape object that represents a graphic shape.
Throws:
RemoteEclipseAPIException

addMeasure

IRemoteMeasureShape addMeasure(int beginX,
                               int beginY,
                               int endX,
                               int endY)
                               throws RemoteEclipseAPIException
This method creates a measure shape.

Parameters:
beginX - Specifies the X coordinate of the original point in 1/100th mm.
beginY - Specifies the Y coordinate of the original point in 1/100th mm.
endX - Specifies the X coordinate of the end point in 1/100th mm.
endY - Specifies the Y coordinate of the end point in 1/100th mm.
Returns:
A MeasureShape object that represents a measure shape.
Throws:
RemoteEclipseAPIException

getTables

IRemoteTables getTables()
                        throws RemoteEclipseAPIException
This property represents all the table shapes in the shapes collection.

Returns:
tables
Throws:
RemoteEclipseAPIException

countByType

int countByType(int shapeType)
                throws RemoteEclipseAPIException
This method returns the number of specified type of shapes.

Parameters:
shapeType - Specifies the type of the shape. The value is a constant and can be one of the following values:

ConstantValueDescription
Constant.SHAPE_TYPE_TEXTSHAPE0specifies a text box.
Constant.SHAPE_TYPE_TABLESHAPE1specifies a table.
Constant.SHAPE_TYPE_RECTANGLESHAPE2specifies a rectangle shape.
Constant.SHAPE_TYPE_ELLIPSESHAPE3specifies an ellipse shape.
Constant.SHAPE_TYPE_LINESHAPE4specifies a line shape.
Constant.SHAPE_TYPE_CONNECTORSHAPE5specifies a connector shape.
Constant.SHAPE_TYPE_GROUPSHAPE6specifies a group shape.
Constant.SHAPE_TYPE_MEASURESHAPE7specifies a measure shape.
Constant.SHAPE_TYPE_GRAPHICSHAPE8specifies a graphic shape.
Constant.SHAPE_TYPE_UNKNOWNSHAPE1024specifies a unknown shape.
Returns:
An integer value.
Throws:
RemoteEclipseAPIException

itemByType

IRemoteShape itemByType(int shapeType,
                        int index)
                        throws RemoteEclipseAPIException
This method returns a shape according to the shape type and index.

Usage
This method can only be called in ODP format file.

Parameters:
shapeType - Specifies the type of the shape. The value is a constant and can be one of the following values:

ConstantValueDescription
Constant.SHAPE_TYPE_TEXTSHAPE0specifies a text box.
Constant.SHAPE_TYPE_TABLESHAPE1specifies a table.
Constant.SHAPE_TYPE_RECTANGLESHAPE2specifies a rectangle shape.
Constant.SHAPE_TYPE_ELLIPSESHAPE3specifies an ellipse shape.
Constant.SHAPE_TYPE_LINESHAPE4specifies a line shape.
Constant.SHAPE_TYPE_CONNECTORSHAPE5specifies a connector shape.
Constant.SHAPE_TYPE_GROUPSHAPE6specifies a group shape.
Constant.SHAPE_TYPE_MEASURESHAPE7specifies a measure shape.
Constant.SHAPE_TYPE_GRAPHICSHAPE8specifies a graphic shape.
Constant.SHAPE_TYPE_UNKNOWNSHAPE1024specifies a unknown shape.
index - Specifies the index of the shape, starting at 1.
Returns:
A Shape object that represents a shape.
Throws:
RemoteEclipseAPIException

addTitle

IRemoteTextShape addTitle(java.lang.String title)
                          throws RemoteEclipseAPIException
This method creates a title on a page.

Parameters:
title -
Returns:
A TextShape object that represents a text box.
Throws:
RemoteEclipseAPIException

addSubTitle

IRemoteTextShape addSubTitle(java.lang.String subTitle)
                             throws RemoteEclipseAPIException
This method creates a subtitle on a page.

Parameters:
subTitle -
Returns:
A TextShape object that represents a text box.
Throws:
RemoteEclipseAPIException

addOutliner

IRemoteTextShape addOutliner()
                             throws RemoteEclipseAPIException
This method creates an outline on a page.

Returns:
A TextShape object that represents a text box.
Throws:
RemoteEclipseAPIException

addGroup

IRemoteGroupShape addGroup(IRemoteShape[] shapes)
                           throws RemoteEclipseAPIException
This method creates a group.

Parameters:
shapes - Specifies the shapes of the group. If any shape does not exist on the page, this method throws an exception.
Returns:
A GroupShape object that represents a group shape.
Throws:
RemoteEclipseAPIException

item

IRemoteShape item(int index)
                  throws RemoteEclipseAPIException
This method returns a shape according to an index.

Parameters:
index - Specifies the index of the shape, starting at 1.
Returns:
A Shape object that represents a shape.
Throws:
RemoteEclipseAPIException

getCount

int getCount()
             throws RemoteEclipseAPIException
This property represents the number of shapes.

Returns:
count
Throws:
RemoteEclipseAPIException

exportToImage

void exportToImage(java.lang.String fileName,
                   int imagetype,
                   int quality,
                   IRemoteShape[] shapes)
                   throws RemoteEclipseAPIException
This method exports all or some of the shapes on a page to an image file.

Parameters:
fileName - Specifies the file to export.
imageType - Specifies the type of the image to export. The value is a constant and can be one of these types:

ConstantValueDescription
Constant.IMAGE_TYPE_JPEG1specifies the JPEG image type.
Constant.IMAGE_TYPE_PNG2specifies the PNG image type.
Constant.IMAGE_TYPE_GIF3specifies the GIF image type.
quality - Specifies the quality of the image. Values range from 0 which is the lowest quality to 100 which is the highest quality.
shapes - Specifies the shapes to export. The default value is all shapes.
Throws:
RemoteEclipseAPIException

exportToImage

void exportToImage(java.lang.String fileName,
                   int imagetype,
                   int quality)
                   throws RemoteEclipseAPIException
This method exports all or some of the shapes on a page to an image file.

Parameters:
fileName - Specifies the file to export.
imageType - Specifies the type of the image to export. The value is a constant and can be one of these types:

ConstantValueDescription
Constant.IMAGE_TYPE_JPEG1specifies the JPEG image type.
Constant.IMAGE_TYPE_PNG2specifies the PNG image type.
Constant.IMAGE_TYPE_GIF3specifies the GIF image type.
quality - Specifies the quality of the image. Values range from 0 which is the lowest quality to 100 which is the highest quality.
Throws:
RemoteEclipseAPIException