com.aspose.diagram
Class Page

java.lang.Object
    extended by com.aspose.diagram.Page

public class Page 
extends java.lang.Object

Contains elements that define a page in the document.


Constructor Summary
Page()
           Constructor.
Page(int ID)
           Constructor.
 
Property Getters/Setters Summary
PagegetAssociatedPage()
voidsetAssociatedPage(Page)
           The ID of the original drawing page that was marked up on separate markup overlays by reviewers of the drawing.
intgetBackground()
voidsetBackground(int)
           A flag indicating if the page is a background page. The value of the property is BOOL integer constant.
PagegetBackPage()
voidsetBackPage(Page)
           The page's background page.
ConnectCollectiongetConnects()
           Contains a Connect element for each connection between two shapes in a drawing.
intgetID()
voidsetID(int)
           The unique ID of the element within its parent element.
java.lang.StringgetName()
voidsetName(java.lang.String)
           The name of the element.
java.lang.StringgetNameU()
voidsetNameU(java.lang.String)
           The universal name of the element.
PageCollectiongetPages()
voidsetPages(PageCollection)
           Page collection.
PageSheetgetPageSheet()
           Contains elements that define the page sheet for a Page or Master element.
voidsetPresetTheme(int)
           Apply a preset theme to this page The value of the property is PresetThemeValue integer constant.
voidsetPresetThemeQuickStyle(int)
           Apply a preset theme variant quickstyle to this page The value of the property is PresetQuickStyleValue integer constant.
voidsetPresetThemeVariant(int)
           Apply a preset theme variant to this page The value of the property is PresetThemeVariantValue integer constant.
intgetReviewerID()
voidsetReviewerID(int)
           The ID of the reviewer associated with the markup overlay.
ShapeCollectiongetShapes()
           Shape collection.
doublegetViewCenterX()
voidsetViewCenterX(double)
           ViewCenterX and ViewCenterY specify a center point on a page that a new view (window) assumes when it is opened initially.
doublegetViewCenterY()
voidsetViewCenterY(double)
           ViewCenterX and ViewCenterY specify a center point on a page that a new view (window) assumes when it is opened initially.
doublegetViewScale()
voidsetViewScale(double)
           The default magnification factor to use when a new view (window) of the page is opened. For example, 1 = 100%; 1.5 = 150%, and so on.
 
Method Summary
longaddActiveXControl(int type, double pinX, double pinY, double width, double height)
           Creates an Activex Control.
voidaddComment(Shape shape, java.lang.String comment)
           Adds comment to a shape.
voidaddComment(double pinX, double pinY, java.lang.String comment)
           Adds comment with defined PinX and PinY.
voidaddComment(long shapeID, java.lang.String comment)
           Adds comment to a shape with shape's id.
longaddShape(Shape newShape, java.lang.String masterName)
           Adds shape created by master to specific page.
longaddShape(double pinX, double pinY, double width, double height, java.lang.String masterName)
           Adds shape created by master on page with defined PinX,PinY,Width and Height.
longaddShape(double pinX, double pinY, java.lang.String masterName)
           Adds shape created by master on page with defined PinX and PinY.
ShapeaddText(double pinX, double pinY, double width, double height, java.lang.String text)
           Adds Text with defined PinX and PinY.
ShapeaddText(double pinX, double pinY, double width, double height, java.lang.String text, java.lang.String fontName, java.lang.String fontColor, double size)
           Adds Text with defined PinX and PinY.
voidapplyStyle(int textStyle, int lineStyle, int fillStyle)
           Applies style for full page.
voidautoSpaceShapes(ShapeCollection shapes, AutoSpaceOptions options)
           Auto space shapes
voidbringForward(long shapeId)
           Brings a shape,defined by ID, forward one position in the z-order.
voidbringToFront(long shapeId)
           Brings a shape,defined by ID, to the front of the z-order.
voidcenterDrawing()
           Centers a page's shapes with respect to the extent of the page. Centering shapes does not change their position relative to each other.
voidconnectShapesViaConnector(Shape shapeFrom, int placeFrom, Shape shapeTo, int placeTo, Shape connector)
           Connect shapes via connector.
voidconnectShapesViaConnector(long shapeFromId, int placeFrom, long shapeToId, int placeTo, long connectorId)
           Connect shapes via connector.
voidconnectShapesViaConnector(long shapeFromId, java.lang.String fromConnectionName, long shapeToId, java.lang.String toConnectionName, long connectorId)
           Connect shapes via connector.
voidconnectShapesViaConnectorIndex(Shape shapeFrom, int fromIndex, Shape shapeTo, int toIndex, Shape connector)
           Connect shapes via connector index.
voidconnectShapesViaConnectorIndex(long shapeFromId, int fromIndex, long shapeToId, int toIndex, long connectorId)
           Connect shapes via connector index.
voidcopy(Page source)
          
voiddispose()
           Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
longdrawEllipse(double pinX, double pinY, double width, double height)
           The process of drawing Ellipse.
longdrawLine(double beginX, double beginY, double endX, double endY)
           The process of drawing a single line.
longdrawLine(double pinX, double pinY, double width, double height, double[] xyArray)
           The process of drawing line.
longdrawPolyline(double pinX, double pinY, double width, double height, double[] xyArray)
           The process of drawing Polyline.
longdrawRectangle(double pinX, double pinY, double width, double height)
           The process of drawing rectangle.
voidglueShapes(Shape shapeFrom, int placeTo, Shape shapeTo)
           Glue shapes.
voidglueShapes(long shapeFromId, int placeTo, long shapeToId)
           Glue shapes
voidglueShapesInContainer(long shapeFromId, int shapeToBeginConnectionIndex, int shapeToEndConnectionIndex, long shapeToId)
           Glue shapes in container
voidglueShapesInContainer(long shapeFromId, java.lang.String shapeToBeginConnectionName, java.lang.String shapeToEndConnectionName, long shapeToId)
           Glue shapes in container using connection name
voidglueShapesInContainerByID(long shapeFromId, int shapeToBeginConnectionID, int shapeToEndConnectionID, long shapeToId)
           Glue shapes by connection id in container
voidglueShapeToConnectorBeginX(long shapeFromId, java.lang.String connectionName, long connectorId)
           Glue shape to Connector's BeginX
voidglueShapeToConnectorEndX(long shapeToId, java.lang.String connectionName, long connectorId)
           Glue shape to Connector's EndX
voidlayout(LayoutOptions options)
           Lays out the shapes and/or reroutes the connectors for the page.
voidmoveTo(int index)
           Moves the page to another location in the pages.
voidsendBackward(long shapeId)
           Moves a shape,defined by ID, back one position in the z-order.
voidsendToBack(long shapeId)
           Moves a shape,defined by ID, to the back of the z-order.
 

Constructor Detail

Page

public Page()
Constructor.

Page

public Page(int ID)
Constructor.

Property Getters/Setters Detail

getPages/setPages

public PageCollection getPages() / public void setPages(PageCollection value)
Page collection.

getShapes

public ShapeCollection getShapes()
Shape collection.

getPageSheet

public PageSheet getPageSheet()
Contains elements that define the page sheet for a Page or Master element.

getConnects

public ConnectCollection getConnects()
Contains a Connect element for each connection between two shapes in a drawing.

getID/setID

public int getID() / public void setID(int value)
The unique ID of the element within its parent element.

getName/setName

public java.lang.String getName() / public void setName(java.lang.String value)
The name of the element.

getNameU/setNameU

public java.lang.String getNameU() / public void setNameU(java.lang.String value)
The universal name of the element.

getBackground/setBackground

public int getBackground() / public void setBackground(int value)
A flag indicating if the page is a background page. The value of the property is BOOL integer constant.

getBackPage/setBackPage

public Page getBackPage() / public void setBackPage(Page value)
The page's background page.

getViewScale/setViewScale

public double getViewScale() / public void setViewScale(double value)
The default magnification factor to use when a new view (window) of the page is opened. For example, 1 = 100%; 1.5 = 150%, and so on.

getViewCenterX/setViewCenterX

public double getViewCenterX() / public void setViewCenterX(double value)
ViewCenterX and ViewCenterY specify a center point on a page that a new view (window) assumes when it is opened initially.

getViewCenterY/setViewCenterY

public double getViewCenterY() / public void setViewCenterY(double value)
ViewCenterX and ViewCenterY specify a center point on a page that a new view (window) assumes when it is opened initially.

getReviewerID/setReviewerID

public int getReviewerID() / public void setReviewerID(int value)
The ID of the reviewer associated with the markup overlay.

getAssociatedPage/setAssociatedPage

public Page getAssociatedPage() / public void setAssociatedPage(Page value)
The ID of the original drawing page that was marked up on separate markup overlays by reviewers of the drawing.

setPresetTheme

public void setPresetTheme(int value)
Apply a preset theme to this page The value of the property is PresetThemeValue integer constant.

setPresetThemeVariant

public void setPresetThemeVariant(int value)
Apply a preset theme variant to this page The value of the property is PresetThemeVariantValue integer constant.

setPresetThemeQuickStyle

public void setPresetThemeQuickStyle(int value)
Apply a preset theme variant quickstyle to this page The value of the property is PresetQuickStyleValue integer constant.

Method Detail

centerDrawing

public void centerDrawing()
                  throws java.lang.Exception
Centers a page's shapes with respect to the extent of the page. Centering shapes does not change their position relative to each other.

copy

public void copy(Page source)
         throws java.lang.Exception

dispose

public void dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

applyStyle

public void applyStyle(int textStyle, int lineStyle, int fillStyle)
Applies style for full page. Default value is -1.
Parameters:
textStyle - text Style id.
lineStyle - line Style id.
fillStyle - fill Style id.

moveTo

public void moveTo(int index)
Moves the page to another location in the pages.
Parameters:
index - Destination page index.

addActiveXControl

public long addActiveXControl(int type, double pinX, double pinY, double width, double height)
                      throws java.lang.Exception
Creates an Activex Control.
Parameters:
type - A ControlType value. The type of the control.
pinX - Specifies the x-coordinate of the shape's pin (center of rotation) in relation to the page.
pinY - Specifies the y-coordinate of the shape's pin (center of rotation) in relation to the page.
width - Specifies the width of the shape in inches.
height - Specifies the height of the shape in inches.
Returns:

addShape

public long addShape(double pinX, double pinY, java.lang.String masterName)
             throws java.lang.Exception
Adds shape created by master on page with defined PinX and PinY.
Parameters:
pinX - Specifies the x-coordinate of the shape's pin (center of rotation) in relation to the page.
pinY - Specifies the y-coordinate of the shape's pin (center of rotation) in relation to the page.
masterName - Master's name.
Returns:
The unique ID of the shape within shapes collection on the specified page.

addShape

public long addShape(double pinX, double pinY, double width, double height, java.lang.String masterName)
             throws java.lang.Exception
Adds shape created by master on page with defined PinX,PinY,Width and Height.
Parameters:
pinX - Specifies the x-coordinate of the shape's pin (center of rotation) in relation to the page.
pinY - Specifies the y-coordinate of the shape's pin (center of rotation) in relation to the page.
width - Specifies the width of the shape in inches.
height - Specifies the height of the shape in inches.
masterName - Master's name.
Returns:
The unique ID of the shape within shapes collection on the specified page.

addShape

public long addShape(Shape newShape, java.lang.String masterName)
             throws java.lang.Exception
Adds shape created by master to specific page.
Parameters:
newShape - New shape objectShape.
masterName - Master's name.
Returns:
The unique ID of the shape within shapes collection on the specified page.

layout

public void layout(LayoutOptions options)
           throws java.lang.Exception
Lays out the shapes and/or reroutes the connectors for the page.
Parameters:
options - Using the LayoutOptions to configure options of layout.

connectShapesViaConnector

public void connectShapesViaConnector(Shape shapeFrom, int placeFrom, Shape shapeTo, int placeTo, Shape connector)
                              throws java.lang.Exception
Connect shapes via connector.
Parameters:
shapeFrom - The shape where the connector begins Shape.
placeFrom - A ConnectionPointPlace value. The location on the first shape where connector will be connected ConnectionPointPlace.
shapeTo - The shape where the connector ends Shape.
placeTo - A ConnectionPointPlace value. The location on the second shape where connector will be connected ConnectionPointPlace.
connector - The shape with type Dynamic connector Shape.

connectShapesViaConnector

public void connectShapesViaConnector(long shapeFromId, int placeFrom, long shapeToId, int placeTo, long connectorId)
                              throws java.lang.Exception
Connect shapes via connector.
Parameters:
shapeFromId - The ID of shape where the connector begins Shape.
placeFrom - A ConnectionPointPlace value. The location on the first shape where connector will be connected ConnectionPointPlace.
shapeToId - The ID of shape where the connector ends Shape.
placeTo - A ConnectionPointPlace value. The location on the second shape where connector will be connected ConnectionPointPlace.
connectorId - The ID of shape with type Dynamic connector Shape.

connectShapesViaConnector

public void connectShapesViaConnector(long shapeFromId, java.lang.String fromConnectionName, long shapeToId, java.lang.String toConnectionName, long connectorId)
                              throws java.lang.Exception
Connect shapes via connector.
Parameters:
shapeFromId - The ID of shape where the connector begins Shape.
fromConnectionName - The connection name on the first shape where connector will be connected .
shapeToId - The ID of shape where the connector ends Shape.
toConnectionName - The connection name on the second shape where connector will be connected .
connectorId - The ID of shape with type Dynamic connector Shape.

glueShapeToConnectorBeginX

public void glueShapeToConnectorBeginX(long shapeFromId, java.lang.String connectionName, long connectorId)
                               throws java.lang.Exception
Glue shape to Connector's BeginX
Parameters:
shapeFromId - The ID of shape where the connector begins Shape.
connectionName - The connection name on the shape where connector will be connected .
connectorId - The ID of shape with type Dynamic connector Shape.

glueShapeToConnectorEndX

public void glueShapeToConnectorEndX(long shapeToId, java.lang.String connectionName, long connectorId)
                             throws java.lang.Exception
Glue shape to Connector's EndX
Parameters:
shapeToId - The ID of shape where the connector ends Shape.
connectionName - The connection name on the second shape where connector will be connected .
connectorId - The ID of shape with type Dynamic connector Shape.

connectShapesViaConnectorIndex

public void connectShapesViaConnectorIndex(long shapeFromId, int fromIndex, long shapeToId, int toIndex, long connectorId)
                                   throws java.lang.Exception
Connect shapes via connector index.
Parameters:
shapeFromId - The ID of shape where the connector begins Shape.
fromIndex - The index of the connection on the first shape
shapeToId - The ID of shape where the connector ends Shape.
toIndex - he index of the connection on the second shape
connectorId - The ID of shape with type Dynamic connector Shape.

connectShapesViaConnectorIndex

public void connectShapesViaConnectorIndex(Shape shapeFrom, int fromIndex, Shape shapeTo, int toIndex, Shape connector)
                                   throws java.lang.Exception
Connect shapes via connector index.
Parameters:
shapeFrom - The shape where the connector begins Shape.
fromIndex - The index of the connection on the first shape
shapeTo - The shape where the connector ends Shape.
toIndex - he index of the connection on the second shape
connector - The shape with type Dynamic connector Shape.

glueShapes

public void glueShapes(Shape shapeFrom, int placeTo, Shape shapeTo)
               throws java.lang.Exception
Glue shapes.
Parameters:
shapeFrom - The shape which is glue from Shape.
placeTo - A ConnectionPointPlace value. The location on the first shape where to glue ConnectionPointPlace.
shapeTo - The shape where to glue to Shape.

glueShapes

public void glueShapes(long shapeFromId, int placeTo, long shapeToId)
               throws java.lang.Exception
Glue shapes
Parameters:
shapeFromId - The ID of shape which is glue from Shape.
placeTo - A ConnectionPointPlace value. The location on the first shape where to glue ConnectionPointPlace.
shapeToId - The ID of shape where to glue to Shape.

glueShapesInContainerByID

public void glueShapesInContainerByID(long shapeFromId, int shapeToBeginConnectionID, int shapeToEndConnectionID, long shapeToId)
                              throws java.lang.Exception
Glue shapes by connection id in container
Parameters:
shapeFromId - The ID of shape which is glue from Shape.
shapeToBeginConnectionID - The location on the first connection id where to glue .
shapeToEndConnectionID - The location on the end connection id where to glue .
shapeToId - The ID of shape where to glue to Shape.

glueShapesInContainer

public void glueShapesInContainer(long shapeFromId, java.lang.String shapeToBeginConnectionName, java.lang.String shapeToEndConnectionName, long shapeToId)
                          throws java.lang.Exception
Glue shapes in container using connection name
Parameters:
shapeFromId - The ID of shape which is glue from Shape.
shapeToBeginConnectionName - The location on the first connection name where to glue .
shapeToEndConnectionName - The location on the end connection name where to glue .
shapeToId - The ID of shape where to glue to Shape.

glueShapesInContainer

public void glueShapesInContainer(long shapeFromId, int shapeToBeginConnectionIndex, int shapeToEndConnectionIndex, long shapeToId)
                          throws java.lang.Exception
Glue shapes in container
Parameters:
shapeFromId - The ID of shape which is glue from Shape.
shapeToBeginConnectionIndex - The location on the first connection index where to glue .
shapeToEndConnectionIndex - The location on the end connection index where to glue .
shapeToId - The ID of shape where to glue to Shape.

bringForward

public void bringForward(long shapeId)
                 throws java.lang.Exception
Brings a shape,defined by ID, forward one position in the z-order.
Parameters:
shapeId - ID of shape.long

sendBackward

public void sendBackward(long shapeId)
                 throws java.lang.Exception
Moves a shape,defined by ID, back one position in the z-order.
Parameters:
shapeId - ID of shape.long

bringToFront

public void bringToFront(long shapeId)
                 throws java.lang.Exception
Brings a shape,defined by ID, to the front of the z-order.
Parameters:
shapeId - ID of shape.long

sendToBack

public void sendToBack(long shapeId)
               throws java.lang.Exception
Moves a shape,defined by ID, to the back of the z-order.
Parameters:
shapeId - ID of shape.long

addComment

public void addComment(long shapeID, java.lang.String comment)
Adds comment to a shape with shape's id.
Parameters:
shape - The ID of shape which is adding comment.
comment - Comment's string.

addComment

public void addComment(Shape shape, java.lang.String comment)
Adds comment to a shape.
Parameters:
shape - Specifies the shape which is adding comment .
comment - Comment's string.

addComment

public void addComment(double pinX, double pinY, java.lang.String comment)
Adds comment with defined PinX and PinY.
Parameters:
pinX - Specifies the x-coordinate of the comment's pin (center of rotation) in relation to the page.
pinY - Specifies the y-coordinate of the comment's pin (center of rotation) in relation to the page.
comment - Comment's string.

autoSpaceShapes

public void autoSpaceShapes(ShapeCollection shapes, AutoSpaceOptions options)
                    throws java.lang.Exception
Auto space shapes
Parameters:
shapes - Specifies the shapes be auto spaced.

addText

public Shape addText(double pinX, double pinY, double width, double height, java.lang.String text, java.lang.String fontName, java.lang.String fontColor, double size)
Adds Text with defined PinX and PinY.
Parameters:
pinX - Specifies the x-coordinate of the text's pin (center of rotation) in relation to the page.
pinY - Specifies the y-coordinate of the text's pin (center of rotation) in relation to the page.
width - Specifies the width of the text.
height - Specifies the height of the text.
text - text string.
fontName - text font name.
fontColor - text font color.
size - text font size.
Returns:
Returns a shape object that represents the new text object.

addText

public Shape addText(double pinX, double pinY, double width, double height, java.lang.String text)
Adds Text with defined PinX and PinY.
Parameters:
pinX - Specifies the x-coordinate of the text's pin (center of rotation) in relation to the page.
pinY - Specifies the y-coordinate of the text's pin (center of rotation) in relation to the page.
text - text string.
Returns:
Returns a shape object that represents the new text object.

drawLine

public long drawLine(double beginX, double beginY, double endX, double endY)
             throws java.lang.Exception
The process of drawing a single line.
Parameters:
beginX - Specifies the begin x-coordinate of the shape's position in relation to the page.
beginY - Specifies the begin y-coordinate of the shape's position in relation to the page.
endX - Specifies the end x-coordinate of the shape's position in relation to the page.
endY - Specifies the end y-coordinate of the shape's position in relation to the page.
Returns:
The unique ID of the shape within shapes collection on the specified page.

drawRectangle

public long drawRectangle(double pinX, double pinY, double width, double height)
                  throws java.lang.Exception
The process of drawing rectangle.
Parameters:
pinX - Specifies the x-coordinate of the shape's pin (center of rotation) in relation to the page.
pinY - Specifies the y-coordinate of the shape's pin (center of rotation) in relation to the page.
width - Specifies the width of the shape
height - Specifies the height of the shape
Returns:
The unique ID of the shape within shapes collection on the specified page.

drawLine

public long drawLine(double pinX, double pinY, double width, double height, double[] xyArray)
             throws java.lang.Exception
The process of drawing line.
Parameters:
pinX - Specifies the x-coordinate of the shape's pin (center of rotation) in relation to the page.
pinY - Specifies the y-coordinate of the shape's pin (center of rotation) in relation to the page.
width - Specifies the width of the shape
height - Specifies the height of the shape
xyArray - An array of alternating x and y values that defines points in the new shape
Returns:
The unique ID of the shape within shapes collection on the specified page.

drawEllipse

public long drawEllipse(double pinX, double pinY, double width, double height)
                throws java.lang.Exception
The process of drawing Ellipse.
Parameters:
pinX - Specifies the x-coordinate of the shape's pin (center of rotation) in relation to the page.
pinY - Specifies the y-coordinate of the shape's pin (center of rotation) in relation to the page.
width - Specifies the width of the shape
height - Specifies the height of the shape
Returns:

drawPolyline

public long drawPolyline(double pinX, double pinY, double width, double height, double[] xyArray)
                 throws java.lang.Exception
The process of drawing Polyline.
Parameters:
pinX - Specifies the x-coordinate of the shape's pin (center of rotation) in relation to the page.
pinY - Specifies the y-coordinate of the shape's pin (center of rotation) in relation to the page.
width - Specifies the width of the shape
height - Specifies the height of the shape
xyArray - An array of alternating x and y values that defines points in the new shape
Returns:
The unique ID of the shape within shapes collection on the specified page.

See Also:
          Aspose.Diagram Documentation - the home page for the Aspose.Diagram Product Documentation.
          Aspose.Diagram Support Forum - our preferred method of support.