Top Description Fields Constructors Methods
com.sun.jfx.incubator.scene.control.richtext

public Class CachingStyleResolver

extends Object
implements StyleResolver
Class Inheritance
All Implemented Interfaces
jfx.incubator.scene.control.richtext.StyleResolver
Imports
java.util.HashMap, javafx.scene.Node, javafx.scene.image.WritableImage, jfx.incubator.scene.control.richtext.StyleResolver, jfx.incubator.scene.control.richtext.model.StyleAttributeMap

Caching StyleResolver caches CSSStyle to StyleAttribute conversion results to avoid re-querying for the same information.

Field Summary

Modifier and TypeField and Description
private final HashMap<CssStyles, StyleAttributeMap>
private final StyleResolver

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public StyleAttributeMap
resolveStyles(StyleAttributeMap
the style attributes
attrs
)

Implements jfx.incubator.scene.control.richtext.StyleResolver.resolveStyles.

Resolves CSS styles (when present) to the individual attributes declared in StyleAttributeMap.

public WritableImage
snapshot(Node
the Node to make a snapshot of
node
)

Implements jfx.incubator.scene.control.richtext.StyleResolver.snapshot.

Creates a snapshot of the specified Node to be exported or copied as an image.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

cacheback to summary
private final HashMap<CssStyles, StyleAttributeMap> cache
resolverback to summary
private final StyleResolver resolver

Constructor Detail

CachingStyleResolverback to summary
public CachingStyleResolver(StyleResolver r)

Method Detail

resolveStylesback to summary
public StyleAttributeMap resolveStyles(StyleAttributeMap attrs)

Implements jfx.incubator.scene.control.richtext.StyleResolver.resolveStyles.

Doc from jfx.incubator.scene.control.richtext.StyleResolver.resolveStyles.

Resolves CSS styles (when present) to the individual attributes declared in StyleAttributeMap.

Parameters
attrs:StyleAttributeMap

the style attributes

Returns:StyleAttributeMap

the resolved style attributes

Annotations
@Override
snapshotback to summary
public WritableImage snapshot(Node node)

Implements jfx.incubator.scene.control.richtext.StyleResolver.snapshot.

Doc from jfx.incubator.scene.control.richtext.StyleResolver.snapshot.

Creates a snapshot of the specified Node to be exported or copied as an image.

Parameters
node:Node

the Node to make a snapshot of

Returns:WritableImage

snapshot the generated WritableImage

Annotations
@Override