com.aspose.diagram

  • java.lang.Object
    • 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(intID)
Constructor.
 
Property Getters/Setters Summary
PagegetAssociatedPage()
void
           The ID of the original drawing page that was marked up on separate markup overlays by reviewers of the drawing.
intgetBackground()
void
setBackground(intvalue)
           A flag indicating if the page is a background page. The value of the property is BOOL integer constant.
PagegetBackPage()
void
           The page's background page.
ConnectCollectiongetConnects()
Contains a Connect element for each connection between two shapes in a drawing.
intgetID()
void
setID(intvalue)
           The unique ID of the element within its parent element.
java.lang.StringgetName()
void
setName(java.lang.Stringvalue)
           The name of the element.
java.lang.StringgetNameU()
void
setNameU(java.lang.Stringvalue)
           The universal name of the element.
PageCollectiongetPages()
void
           Page collection.
PageSheetgetPageSheet()
Contains elements that define the page sheet for a Page or Master element.
intgetReviewerID()
void
setReviewerID(intvalue)
           The ID of the reviewer associated with the markup overlay.
ShapeCollectiongetShapes()
Shape collection.
doublegetViewCenterX()
void
setViewCenterX(doublevalue)
           ViewCenterX and ViewCenterY specify a center point on a page that a new view (window) assumes when it is opened initially.
doublegetViewCenterY()
void
setViewCenterY(doublevalue)
           ViewCenterX and ViewCenterY specify a center point on a page that a new view (window) assumes when it is opened initially.
doublegetViewScale()
void
setViewScale(doublevalue)
           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
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.
voidaddText(double pinX, double pinY, double width, double height, java.lang.String text)
Adds Text with defined PinX and PinY.
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.
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)
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 connetion id in container
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

      • 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.
    • Method Detail

      • copy

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

        public void moveTo(int index)
        Moves the page to another location in the pages.
        Parameters:
        index - Destination page index.
      • 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.
      • 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.
      • glueShapesInContainerByID

        public void glueShapesInContainerByID(long shapeFromId, int shapeToBeginConnectionID, int shapeToEndConnectionID, long shapeToId)
                                      throws java.lang.Exception
        Glue shapes by connetion 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 void 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 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.
        text - text string.