public class CSSBoxTreeBuilder extends Object
| Modifier and Type | Field and Description |
|---|---|
protected PageImpl |
page
The resulting page
|
protected Dimension |
pageSize
Requested page dimensions
|
protected String |
pageTitle |
protected URL |
pageUrl |
protected boolean |
preserveAux |
protected boolean |
replaceImagesWithAlt
Replace the images with their
alt text |
protected boolean |
useVisualBounds
Use real visual bounds instead of the element content bounds for building the box hierarchy
|
protected org.fit.cssbox.layout.Viewport |
viewport
CSSBox viewport that represents the rendered page box tree
|
| Constructor and Description |
|---|
CSSBoxTreeBuilder(Dimension pageSize,
boolean useVisualBounds,
boolean preserveAux,
boolean replaceImagesWithAlt) |
| Modifier and Type | Method and Description |
|---|---|
protected BoxNode |
buildTree(org.fit.cssbox.layout.ElementBox rootbox) |
org.fit.layout.model.Page |
getPage()
The resulting page model.
|
org.fit.cssbox.layout.Viewport |
getViewport()
Obtains the CSSBox viewport of the rendered page.
|
void |
parse(String urlstring) |
void |
parse(URL url) |
void |
parseList(List<URL> list) |
protected org.fit.cssbox.layout.BrowserCanvas |
renderUrl(URL url,
Dimension pageSize) |
protected URL pageUrl
protected String pageTitle
protected PageImpl page
protected org.fit.cssbox.layout.Viewport viewport
protected Dimension pageSize
protected boolean useVisualBounds
protected boolean preserveAux
protected boolean replaceImagesWithAlt
alt textpublic CSSBoxTreeBuilder(Dimension pageSize, boolean useVisualBounds, boolean preserveAux, boolean replaceImagesWithAlt)
public void parse(URL url) throws IOException, SAXException
IOExceptionSAXExceptionpublic void parseList(List<URL> list) throws IOException, SAXException
IOExceptionSAXExceptionpublic void parse(String urlstring) throws MalformedURLException, IOException, SAXException
public org.fit.layout.model.Page getPage()
public org.fit.cssbox.layout.Viewport getViewport()
null when no page was rendered or multiple pages were rendered.protected org.fit.cssbox.layout.BrowserCanvas renderUrl(URL url, Dimension pageSize) throws IOException, SAXException
IOExceptionSAXExceptionprotected BoxNode buildTree(org.fit.cssbox.layout.ElementBox rootbox)
Copyright © 2018. All rights reserved.