Package cz.vutbr.fit.layout.model
Interface Page
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Box
createBox()
Creates a new empty box wihtin this page.Box
createBox(Box src)
Creates a new box within this page by copying an existing one.List<Box>
getBoxesAt(int x, int y)
Finds all the boxes that contain the given point within their visual bounds.List<Box>
getBoxesInRegion(Rectangular r)
Finds the root boxes of subtrees that are fully contained in the given region based on their visual bounds.int
getHeight()
Obtains the page height.byte[]
getPngImage()
Gets the PNG image of the rendered page if provided by the renderer.Box
getRoot()
Returns the root box of the page.URL
getSourceURL()
Obtains the source URL of the page.String
getTitle()
Obtains the page title specified using the<title>
tag.int
getWidth()
Obtains the page width.-
Methods inherited from interface cz.vutbr.fit.layout.model.Artifact
getArtifactType, getCreatedOn, getCreator, getCreatorParams, getIri, getLabel, getMetadata, getParentIri, setIri
-
-
-
-
Method Detail
-
getSourceURL
URL getSourceURL()
Obtains the source URL of the page.- Returns:
- the URL
-
getTitle
String getTitle()
Obtains the page title specified using the<title>
tag.- Returns:
- the page title or an empty string when not set
-
getWidth
int getWidth()
Obtains the page width.- Returns:
- the width in pixels
-
getHeight
int getHeight()
Obtains the page height.- Returns:
- the height in pixels
-
getRoot
Box getRoot()
Returns the root box of the page.- Returns:
- the root box
-
getPngImage
byte[] getPngImage()
Gets the PNG image of the rendered page if provided by the renderer.- Returns:
- PNG image data array or
null
when the page image was not provided by the renderer.
-
getBoxesAt
List<Box> getBoxesAt(int x, int y)
Finds all the boxes that contain the given point within their visual bounds.- Parameters:
x
- The point X coordinatey
- The point Y coordinate- Returns:
- A list of boxes that contain [x, y] within their visual bounds.
-
getBoxesInRegion
List<Box> getBoxesInRegion(Rectangular r)
Finds the root boxes of subtrees that are fully contained in the given region based on their visual bounds.- Parameters:
r
- The region to be tested- Returns:
- A list of subtree root boxes (possibly empty)
-
createBox
Box createBox()
Creates a new empty box wihtin this page.- Returns:
- the new box
-
-