| Modifier and Type | Field and Description |
|---|---|
| public String | |
| public String | |
| private final RootCounterContext | |
| private FSTextTransformer | |
| private FSTextTransformer | |
| private FSTextTransformer | |
| protected FSCanvas | |
| private FSTextBreaker | |
| private static final float | |
| protected StyleReference | |
| protected boolean | |
| protected boolean | |
| protected boolean | |
| protected boolean | |
| private static final int | DEFAULT_DOTS_PER_PIXEL
Deprecated
Belongs in Java2D renderer.
|
| private static final float | DEFAULT_DPI
Deprecated
Belongs in Java2D renderer.
|
| private static final boolean | DEFAULT_INTERACTIVE
Deprecated
Belongs in Java2D renderer.
|
| private Float | |
| private boolean | |
| private Float | |
| private int | dotsPerPixel
Internal program dots per pixel. |
| private float | dpi
Used to adjust fonts, ems, points, into screen resolution. |
| protected FontResolver | |
| private Map | |
| private boolean | |
| private FSTextBreaker | |
| private String | |
| private static final int | |
| private float | mmPerDot
dpi in a more usable way Internal program dots per mm (probably a fraction). |
| private NamespaceHandler | |
| private boolean | |
| private ReplacedElementFactory | |
| private String | |
| private final Map | |
| private Rectangle | |
| private TextRenderer | |
| private UserAgentCallback |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public String | |
| public Box | |
| public FSCanvas | |
| public FSTextBreaker | |
| public StyleReference | |
| public Float | |
| public Float | |
| public int | |
| public float | |
| public Rectangle | |
| public FSFont | |
| public FontResolver | Returns: The fontResolver valueGets the fontResolver attribute of the Context object |
| public RootCounterContext | |
| public Map | |
| public FSTextBreaker | |
| public String | |
| public float | Returns: The dPI valueGets the dPI attribute in a more useful form of the RenderingContext object |
| public NamespaceHandler | |
| public ReplacedElementFactory | |
| public String | Returns: the current replacement text, "#" by defaultThe replacement text to be used if a character cannot be renderered by the current or fallback fonts. |
| public CalculatedStyle | |
| public TextRenderer | |
| public UserAgentCallback | Returns: The uac value (user agent).
Deprecated
Use getUserAgentCallback instead for clearer code.
Gets the uac attribute of the RenderingContext object |
| public FSTextTransformer | |
| public FSTextTransformer | |
| public FSTextTransformer | |
| public UserAgentCallback | |
| public float | |
| public boolean | Returns: true if the page size is in inches, false if it is in mm.If not, consider it as mm. |
| public boolean | |
| public boolean | |
| public boolean | |
| public LayoutContext | |
| public RenderingContext | |
| public void | registerWithThread()
This registers the shared context with a thread local so it can be used anywhere. |
| public void | |
| public void | |
| public void | setBaseURL(String
The new baseURL value url)Sets the baseURL attribute of the RenderingContext object |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | setDefaultPageSize(Float pageWidth, Float pageHeight, boolean isInches)
Set the default page dimensions. |
| public void | |
| public void | |
| public void | setFontMapping(String
The new font name name, Font The actual Font to map font)
Deprecated
Definitely shouldn't use this method as it only applies for
Java2D font resolver. Instead call getFontResolver, cast and use font adding
methods on that.
Adds or overrides a font mapping, meaning you can associate a particular font with a particular string. |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | setTextRenderer(TextRenderer
The new textRenderer value textRenderer)Sets the textRenderer attribute of the RenderingContext object |
| public void | |
| public void | |
| public void | |
| public void |
| _preferredDocumentBuilderFactoryImplementationClass | back to summary |
|---|---|
| public String _preferredDocumentBuilderFactoryImplementationClass | |
| _preferredTransformerFactoryImplementationClass | back to summary |
|---|---|
| public String _preferredTransformerFactoryImplementationClass | |
| _rootCounterContext | back to summary |
|---|---|
| private final RootCounterContext _rootCounterContext | |
| _unicodeToLowerTransformer | back to summary |
|---|---|
| private FSTextTransformer _unicodeToLowerTransformer | |
| _unicodeToTitleTransformer | back to summary |
|---|---|
| private FSTextTransformer _unicodeToTitleTransformer | |
| _unicodeToUpperTransformer | back to summary |
|---|---|
| private FSTextTransformer _unicodeToUpperTransformer | |
| canvas | back to summary |
|---|---|
| protected FSCanvas canvas | |
| characterBreaker | back to summary |
|---|---|
| private FSTextBreaker characterBreaker | |
| CM__PER__IN | back to summary |
|---|---|
| private static final float CM__PER__IN | |
| css | back to summary |
|---|---|
| protected StyleReference css | |
| debug_draw_boxes | back to summary |
|---|---|
| protected boolean debug_draw_boxes | |
| debug_draw_font_metrics | back to summary |
|---|---|
| protected boolean debug_draw_font_metrics | |
| debug_draw_inline_boxes | back to summary |
|---|---|
| protected boolean debug_draw_inline_boxes | |
| debug_draw_line_boxes | back to summary |
|---|---|
| protected boolean debug_draw_line_boxes | |
| DEFAULT_DOTS_PER_PIXEL | back to summary |
|---|---|
| private static final int DEFAULT_DOTS_PER_PIXEL
Deprecated Belongs in Java2D renderer. | |
| DEFAULT_DPI | back to summary |
|---|---|
| private static final float DEFAULT_DPI
Deprecated Belongs in Java2D renderer. | |
| DEFAULT_INTERACTIVE | back to summary |
|---|---|
| private static final boolean DEFAULT_INTERACTIVE
Deprecated Belongs in Java2D renderer. | |
| defaultPageHeight | back to summary |
|---|---|
| private Float defaultPageHeight | |
| defaultPageSizeIsInches | back to summary |
|---|---|
| private boolean defaultPageSizeIsInches | |
| defaultPageWidth | back to summary |
|---|---|
| private Float defaultPageWidth | |
| dotsPerPixel | back to summary |
|---|---|
| private int dotsPerPixel Internal program dots per pixel. | |
| dpi | back to summary |
|---|---|
| private float dpi Used to adjust fonts, ems, points, into screen resolution. Internal program dots per inch. | |
| fontResolver | back to summary |
|---|---|
| protected FontResolver fontResolver | |
| idMap | back to summary |
|---|---|
| private Map<String, Box> idMap | |
| interactive | back to summary |
|---|---|
| private boolean interactive | |
| lineBreaker | back to summary |
|---|---|
| private FSTextBreaker lineBreaker | |
| media | back to summary |
|---|---|
| private String media | |
| MM__PER__CM | back to summary |
|---|---|
| private static final int MM__PER__CM | |
| mmPerDot | back to summary |
|---|---|
| private float mmPerDot dpi in a more usable way Internal program dots per mm (probably a fraction). | |
| namespaceHandler | back to summary |
|---|---|
| private NamespaceHandler namespaceHandler | |
| back to summary | |
|---|---|
| private boolean print | |
| replacedElementFactory | back to summary |
|---|---|
| private ReplacedElementFactory replacedElementFactory | |
| replacementText | back to summary |
|---|---|
| private String replacementText | |
| styleMap | back to summary |
|---|---|
| private final Map<Element, CalculatedStyle> styleMap | |
| tempCanvas | back to summary |
|---|---|
| private Rectangle tempCanvas | |
| textRenderer | back to summary |
|---|---|
| private TextRenderer textRenderer | |
| uac | back to summary |
|---|---|
| private UserAgentCallback uac | |
| SharedContext | back to summary |
|---|---|
| public SharedContext() | |
| addBoxId | back to summary |
|---|---|
| public void addBoxId(String id, Box box) | |
| debugDrawBoxes | back to summary |
|---|---|
| public boolean debugDrawBoxes() | |
| debugDrawFontMetrics | back to summary |
|---|---|
| public boolean debugDrawFontMetrics() | |
| debugDrawInlineBoxes | back to summary |
|---|---|
| public boolean debugDrawInlineBoxes() | |
| debugDrawLineBoxes | back to summary |
|---|---|
| public boolean debugDrawLineBoxes() | |
| getBaseURL | back to summary |
|---|---|
| public String getBaseURL() Gets the baseURL attribute of the RenderingContext object
| |
| getBoxById | back to summary |
|---|---|
| public Box getBoxById(String id) | |
| getCanvas | back to summary |
|---|---|
| public FSCanvas getCanvas() | |
| getCharacterBreaker | back to summary |
|---|---|
| public FSTextBreaker getCharacterBreaker() | |
| getCss | back to summary |
|---|---|
| public StyleReference getCss() | |
| getDefaultPageHeight | back to summary |
|---|---|
| public Float getDefaultPageHeight() Stores a default page height.
| |
| getDefaultPageWidth | back to summary |
|---|---|
| public Float getDefaultPageWidth() Stores a default page width.
| |
| getDotsPerPixel | back to summary |
|---|---|
| public int getDotsPerPixel() Get the internal dots measurement per CSS pixel. | |
| getDPI | back to summary |
|---|---|
| public float getDPI() Gets the dPI attribute of the RenderingContext object
| |
| getFixedRectangle | back to summary |
|---|---|
| public Rectangle getFixedRectangle() | |
| getFont | back to summary |
|---|---|
| public FSFont getFont(FontSpecification spec) | |
| getFontResolver | back to summary |
|---|---|
| public FontResolver getFontResolver() Gets the fontResolver attribute of the Context object
| |
| getGlobalCounterContext | back to summary |
|---|---|
| public RootCounterContext getGlobalCounterContext() | |
| getIdMap | back to summary |
|---|---|
| public Map | |
| getLineBreaker | back to summary |
|---|---|
| public FSTextBreaker getLineBreaker() | |
| getMedia | back to summary |
|---|---|
| public String getMedia() The media for this context | |
| getMmPerDotParent | back to summary |
|---|---|
| public float getMmPerDotParent() Gets the dPI attribute in a more useful form of the RenderingContext object
| |
| getNamespaceHandler | back to summary |
|---|---|
| public NamespaceHandler getNamespaceHandler() | |
| getReplacedElementFactory | back to summary |
|---|---|
| public ReplacedElementFactory getReplacedElementFactory() | |
| getReplacementText | back to summary |
|---|---|
| public String getReplacementText() The replacement text to be used if a character cannot be renderered by the current or fallback fonts.
| |
| getStyle | back to summary |
|---|---|
| public CalculatedStyle getStyle(Element e) Gets the resolved style for an element. All primitive properties will
have values.
| |
| getTextRenderer | back to summary |
|---|---|
| public TextRenderer getTextRenderer() | |
| getUac | back to summary |
|---|---|
| public UserAgentCallback getUac()
Deprecated Use getUserAgentCallback instead for clearer code. Gets the uac attribute of the RenderingContext object
| |
| getUnicodeToLowerTransformer | back to summary |
|---|---|
| public FSTextTransformer getUnicodeToLowerTransformer() | |
| getUnicodeToTitleTransformer | back to summary |
|---|---|
| public FSTextTransformer getUnicodeToTitleTransformer() | |
| getUnicodeToUpperTransformer | back to summary |
|---|---|
| public FSTextTransformer getUnicodeToUpperTransformer() | |
| getUserAgentCallback | back to summary |
|---|---|
| public UserAgentCallback getUserAgentCallback() | |
| getXHeight | back to summary |
|---|---|
| public float getXHeight(FontContext fontContext, FontSpecification fs) | |
| isDefaultPageSizeInches | back to summary |
|---|---|
| public boolean isDefaultPageSizeInches() If not, consider it as mm.
| |
| isInteractive | back to summary |
|---|---|
| public boolean isInteractive() | |
| isPaged | back to summary |
|---|---|
| public boolean isPaged() Returns true if the currently set media type is paged. Currently returns true only for print , projection , and embossed , handheld , and tv . See the media section of the CSS 2.1 spec for more information on media types.
| |
| isPrint | back to summary |
|---|---|
| public boolean isPrint() | |
| newLayoutContextInstance | back to summary |
|---|---|
| public LayoutContext newLayoutContextInstance() | |
| newRenderingContextInstance | back to summary |
|---|---|
| public RenderingContext newRenderingContextInstance() | |
| registerWithThread | back to summary |
|---|---|
| public void registerWithThread() This registers the shared context with a thread local so it
can be used anywhere. It should be matched with a call to
| |
| removeBoxId | back to summary |
|---|---|
| public void removeBoxId(String id) | |
| removeFromThread | back to summary |
|---|---|
| public void removeFromThread() This removes the shared context from a thread local to avoid memory leaks. | |
| setBaseURL | back to summary |
|---|---|
| public void setBaseURL(String url) Sets the baseURL attribute of the RenderingContext object
| |
| setCanvas | back to summary |
|---|---|
| public void setCanvas(FSCanvas canvas) | |
| setCharacterBreaker | back to summary |
|---|---|
| public void setCharacterBreaker(FSTextBreaker breaker) | |
| setCss | back to summary |
|---|---|
| public void setCss(StyleReference css) | |
| setDebug_draw_boxes | back to summary |
|---|---|
| public void setDebug_draw_boxes(boolean debug_draw_boxes) | |
| setDebug_draw_font_metrics | back to summary |
|---|---|
| public void setDebug_draw_font_metrics(boolean debug_draw_font_metrics) | |
| setDebug_draw_inline_boxes | back to summary |
|---|---|
| public void setDebug_draw_inline_boxes(boolean debug_draw_inline_boxes) | |
| setDebug_draw_line_boxes | back to summary |
|---|---|
| public void setDebug_draw_line_boxes(boolean debug_draw_line_boxes) | |
| setDefaultPageSize | back to summary |
|---|---|
| public void setDefaultPageSize(Float pageWidth, Float pageHeight, boolean isInches) Set the default page dimensions. These may be overridden in CSS. If not set in CSS and null here, A4 will be used. | |
| setDotsPerPixel | back to summary |
|---|---|
| public void setDotsPerPixel(int dotsPerPixel) Set the internal dots measurement per CSS pixel. | |
| setDPI | back to summary |
|---|---|
| public void setDPI(float dpi) Sets the effective DPI (Dots Per Inch) of the screen. You should normally
never need to override the dpi, as it is already set to the system
default by
| |
| setFontMapping | back to summary |
|---|---|
| public void setFontMapping(String name, Font font)
Deprecated Definitely shouldn't use this method as it only applies for Java2D font resolver. Instead call getFontResolver, cast and use font adding methods on that. Adds or overrides a font mapping, meaning you can associate a particular font with a particular string. For example, the following would load a font out of the cool.ttf file and associate it with the name CoolFont :
Font font = Font.createFont(Font.TRUETYPE_FONT,
new FileInputStream("cool.ttf");
setFontMapping("CoolFont", font);
You could then put the following css in your page
p { font-family: CoolFont Arial sans-serif; }
You can also override existing font mappings, like replacing Arial with
Helvetica.
| |
| setFontResolver | back to summary |
|---|---|
| public void setFontResolver(FontResolver resolver) | |
| setInteractive | back to summary |
|---|---|
| public void setInteractive(boolean interactive) | |
| setLineBreaker | back to summary |
|---|---|
| public void setLineBreaker(FSTextBreaker breaker) | |
| setMedia | back to summary |
|---|---|
| public void setMedia(String media) Set the current media type. This is usually something like screen or print . See the media section of the CSS 2.1 spec for more information on media types.
| |
| setNamespaceHandler | back to summary |
|---|---|
| public void setNamespaceHandler(NamespaceHandler nh) | |
| setPrint | back to summary |
|---|---|
| public void setPrint(boolean print) | |
| setReplacedElementFactory | back to summary |
|---|---|
| public void setReplacedElementFactory(ReplacedElementFactory ref) | |
| setReplacementText | back to summary |
|---|---|
| public void setReplacementText(String replacement) | |
| setTempCanvas | back to summary |
|---|---|
| public void setTempCanvas(Rectangle rect) | |
| setTextRenderer | back to summary |
|---|---|
| public void setTextRenderer(TextRenderer textRenderer) Sets the textRenderer attribute of the RenderingContext object
| |
| setUnicodeToLowerTransformer | back to summary |
|---|---|
| public void setUnicodeToLowerTransformer(FSTextTransformer tr) | |
| setUnicodeToTitleTransformer | back to summary |
|---|---|
| public void setUnicodeToTitleTransformer(FSTextTransformer tr) | |
| setUnicodeToUpperTransformer | back to summary |
|---|---|
| public void setUnicodeToUpperTransformer(FSTextTransformer tr) | |
| setUserAgentCallback | back to summary |
|---|---|
| public void setUserAgentCallback(UserAgentCallback userAgentCallback) | |