Package cz.vutbr.fit.layout.impl
Class DefaultPage
- java.lang.Object
-
- cz.vutbr.fit.layout.impl.BaseArtifact
-
- cz.vutbr.fit.layout.impl.DefaultPage
-
-
Constructor Summary
Constructors Constructor Description DefaultPage(Page src)DefaultPage(URL url)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BoxcreateBox()Creates a new empty box wihtin this page.BoxcreateBox(Box src)Creates a new box within this page by copying an existing one.org.eclipse.rdf4j.model.IRIgetArtifactType()Gets the artifact type.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.intgetHeight()Obtains the page height.protected intgetNextBoxId()byte[]getPngImage()Gets the PNG image of the rendered page if provided by the renderer.BoxgetRoot()Returns the root box of the page.URLgetSourceURL()Obtains the source URL of the page.StringgetTitle()Obtains the page title specified using the<title>tag.intgetWidth()Obtains the page width.voidsetHeight(int height)voidsetPngImage(byte[] pngImage)voidsetRoot(Box root)voidsetTitle(String title)voidsetWidth(int width)StringtoString()-
Methods inherited from class cz.vutbr.fit.layout.impl.BaseArtifact
equals, getCreatedOn, getCreator, getCreatorParams, getIri, getLabel, getMetadata, getParentIri, hashCode, setCreatedOn, setCreator, setCreatorParams, setIri, setLabel, setMetadata, setParentIri
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface cz.vutbr.fit.layout.model.Artifact
getCreatedOn, getCreator, getCreatorParams, getIri, getLabel, getMetadata, getParentIri, setIri
-
-
-
-
Method Detail
-
getArtifactType
public org.eclipse.rdf4j.model.IRI getArtifactType()
Description copied from interface:ArtifactGets the artifact type.- Specified by:
getArtifactTypein interfaceArtifact- Returns:
- the IRI of the artifact type.
-
getSourceURL
public URL getSourceURL()
Description copied from interface:PageObtains the source URL of the page.- Specified by:
getSourceURLin interfacePage- Returns:
- the URL
-
getTitle
public String getTitle()
Description copied from interface:PageObtains the page title specified using the<title>tag.
-
setTitle
public void setTitle(String title)
-
getRoot
public Box getRoot()
Description copied from interface:PageReturns the root box of the page.
-
setRoot
public void setRoot(Box root)
-
getWidth
public int getWidth()
Description copied from interface:PageObtains the page width.
-
setWidth
public void setWidth(int width)
-
getHeight
public int getHeight()
Description copied from interface:PageObtains the page height.
-
setHeight
public void setHeight(int height)
-
getPngImage
public byte[] getPngImage()
Description copied from interface:PageGets the PNG image of the rendered page if provided by the renderer.- Specified by:
getPngImagein interfacePage- Returns:
- PNG image data array or
nullwhen the page image was not provided by the renderer.
-
setPngImage
public void setPngImage(byte[] pngImage)
-
getBoxesAt
public List<Box> getBoxesAt(int x, int y)
Description copied from interface:PageFinds all the boxes that contain the given point within their visual bounds.- Specified by:
getBoxesAtin interfacePage- Parameters:
x- The point X coordinatey- The point Y coordinate- Returns:
- A list of boxes that contain [x, y] within their visual bounds.
-
getBoxesInRegion
public List<Box> getBoxesInRegion(Rectangular r)
Description copied from interface:PageFinds the root boxes of subtrees that are fully contained in the given region based on their visual bounds.- Specified by:
getBoxesInRegionin interfacePage- Parameters:
r- The region to be tested- Returns:
- A list of subtree root boxes (possibly empty)
-
createBox
public Box createBox()
Description copied from interface:PageCreates a new empty box wihtin this page.
-
createBox
public Box createBox(Box src)
Description copied from interface:PageCreates a new box within this page by copying an existing one.
-
getNextBoxId
protected int getNextBoxId()
-
-