Class Location
java.lang.Object
chemaxon.formats.documents.jchemoffice.Location
-
Constructor Summary
ConstructorsConstructorDescriptionLocation()
Constructor of the Location Instantiates a Location object with default positions: page 0, x:0, y:0Location
(int x, int y, int pageNumber) Constructor of the Location Instantiates a Location object with the given positions.This will set the new location instance as a copy of the given source location.Constructor of the Location Instantiates a Location object with the given identified. -
Method Summary
Modifier and TypeMethodDescriptiongetName()
int
Returns the paragraph / slide numberint
getX()
Returns the horizontal position on the page/slideint
getY()
Returns the vertical position on the page/slideboolean
hasName()
void
void
setPageNumber
(int pageNumber) Sets the paragraph/slide numbervoid
setX
(int x) Sets the horizontal position on the page/slidevoid
setY
(int y) Sets the vertical position on the page/slide
-
Constructor Details
-
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 pagey
- - Vertical location in the Document PagepageNumber
- - The Page in the Document. Note the first page has index 0
-
Location
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
This will set the new location instance as a copy of the given source location.- Parameters:
location
- - Source location
-
-
Method Details
-
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
-
setName
-