Class Location

    • Constructor Summary

      Constructors 
      Constructor Description
      Location()
      Constructor of the Location Instantiates a Location object with default positions: page 0, x:0, y:0
      Location​(int x, int y, int pageNumber)
      Constructor of the Location Instantiates a Location object with the given positions.
      Location​(Location location)
      This will set the new location instance as a copy of the given source location.
      Location​(String name)
      Constructor of the Location Instantiates a Location object with the given identified.
    • Constructor Detail

      • Location

        public Location()
        Constructor of the Location Instantiates a Location object with default positions: page 0, x:0, y:0
      • Location

        public Location​(int x,
                        int y,
                        int pageNumber)
        Constructor of the Location Instantiates a Location object with the given positions.

        The following is one example:

         Location location = new Location(50, 100, 0);
         

        This will set the Location on the first page in horizontal position:50 and vertical position 100.

        Parameters:
        x - - Horizontal location in the Document page
        y - - Vertical location in the Document Page
        pageNumber - - The Page in the Document. Note the first page has index 0
      • Location

        public Location​(String name)
        Constructor of the Location Instantiates a Location object with the given identified.
         Location location = new Location("Position for Structures Bookmark");
         
        Parameters:
        name - - identifier of the named range.
      • Location

        public Location​(Location location)
        This will set the new location instance as a copy of the given source location.
        Parameters:
        location - - Source location
    • Method Detail

      • getPageNumber

        public int getPageNumber()
        Returns the paragraph / slide number
        Returns:
        page number from the Location. First page has index 0.
      • setPageNumber

        public void setPageNumber​(int pageNumber)
        Sets the paragraph/slide number
        Parameters:
        pageNumber - - The page number of the Location. First page has index 0.
      • getX

        public int getX()
        Returns the horizontal position on the page/slide
        Returns:
        Horizontal position
      • setX

        public void setX​(int x)
        Sets the horizontal position on the page/slide
        Parameters:
        x - - Horizontal position on the page
      • getY

        public int getY()
        Returns the vertical position on the page/slide
        Returns:
        Vertical position
      • setY

        public void setY​(int y)
        Sets the vertical position on the page/slide
        Parameters:
        y - - Vertical position on the page
      • hasName

        public boolean hasName()
        Returns:
        If the location has a dedicated name
      • getName

        public String getName()
      • setName

        public void setName​(String name)