Class BoxTreeBuilder
- java.lang.Object
-
- cz.vutbr.fit.layout.impl.BaseBoxTreeBuilder
-
- cz.vutbr.fit.layout.json.impl.JSONBoxTreeBuilder
-
- cz.vutbr.fit.layout.puppeteer.impl.BoxTreeBuilder
-
public class BoxTreeBuilder extends JSONBoxTreeBuilder
A JSON-based builder that uses the fitlayout-puppeteer backend for obtaining the source JSON page desription.- Author:
- burgetr
-
-
Field Summary
Fields Modifier and Type Field Description static StringDEFAULT_FONT_FAMILYstatic floatDEFAULT_FONT_SIZE-
Fields inherited from class cz.vutbr.fit.layout.impl.BaseBoxTreeBuilder
pageTitle, pageUrl, preserveAux, useVisualBounds
-
-
Constructor Summary
Constructors Constructor Description BoxTreeBuilder(int width, int height, boolean useVisualBounds, boolean preserveAux)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected InputFileinvokeRenderer(URL url)Invokes the backend and parses its ouptut.voidsetAcquireImages(boolean acquireImages)voidsetIncludeScreenshot(boolean includeScreenshot)voidsetPersist(int persist)-
Methods inherited from class cz.vutbr.fit.layout.json.impl.JSONBoxTreeBuilder
getPage, loadJSON, loadJSON, parse, parse, parseInputFile, parseJSON
-
Methods inherited from class cz.vutbr.fit.layout.impl.BaseBoxTreeBuilder
buildTree, computeBackgrounds, computeVisualBounds, contentEncloses, getMinimalVisualBounds, markChildNodes, markNodesInside, recomputeBounds, recomputeVisualBounds, recomputeVisualBounds, takeChildren, visuallyEncloses
-
-
-
-
Field Detail
-
DEFAULT_FONT_FAMILY
public static final String DEFAULT_FONT_FAMILY
- See Also:
- Constant Field Values
-
DEFAULT_FONT_SIZE
public static final float DEFAULT_FONT_SIZE
- See Also:
- Constant Field Values
-
-
Method Detail
-
setPersist
public void setPersist(int persist)
-
setAcquireImages
public void setAcquireImages(boolean acquireImages)
-
setIncludeScreenshot
public void setIncludeScreenshot(boolean includeScreenshot)
-
invokeRenderer
protected InputFile invokeRenderer(URL url) throws IOException, InterruptedException
Invokes the backend and parses its ouptut.- Specified by:
invokeRendererin classJSONBoxTreeBuilder- Parameters:
url-- Returns:
- the parsed output of the backend, or
nullfor an unexpected EOF - Throws:
IOExceptionInterruptedException
-
-