Top Description Fields Constructors Methods
javafx.css.converter

public Class ShapeConverter

extends StyleConverter<String, Shape>
Class Inheritance
Imports
javafx.css.ParsedValue, .StyleConverter, javafx.scene.shape.SVGPath, .Shape, javafx.scene.text.Font, java.util.Map

Converter to convert a SVG shape string into a Shape object.
Since
9

Field Summary

Modifier and TypeField and Description
private static Map<ParsedValue<String, Shape>, Shape>
private static final ShapeConverter

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static void
clearCache()

Hides javafx.css.StyleConverter.clearCache.

Clears the ShapeConverter cache.

public Shape
convert(ParsedValue<String, Shape>
The ParsedValue to convert
value
,
Font
The Font to use when converting a relative value.
font
)

Overrides javafx.css.StyleConverter.convert.

Convert from the parsed CSS value to the target property type.

public static StyleConverter<String, Shape>

Returns:

the ShapeConverter instance
getInstance
()

Gets the ShapeConverter instance.

Inherited from javafx.css.StyleConverter:
cacheValueconvertgetBooleanConvertergetCachedValuegetColorConvertergetDurationConvertergetEffectConvertergetEnumConvertergetFontConvertergetInsetsConvertergetPaintConvertergetSizeConvertergetStringConvertergetUrlConverterreadBinarywriteBinary

Field Detail

cacheback to summary
private static Map<ParsedValue<String, Shape>, Shape> cache

Hides javafx.css.StyleConverter.cache.

INSTANCEback to summary
private static final ShapeConverter INSTANCE

Constructor Detail

ShapeConverterback to summary
private ShapeConverter()

Method Detail

clearCacheback to summary
public static void clearCache()

Hides javafx.css.StyleConverter.clearCache.

Clears the ShapeConverter cache.

convertback to summary
public Shape convert(ParsedValue<String, Shape> value, Font font)

Overrides javafx.css.StyleConverter.convert.

Doc from javafx.css.StyleConverter.convert.

Convert from the parsed CSS value to the target property type.

Parameters
value:ParsedValue<String, Shape>

The ParsedValue to convert

font:Font

The Font to use when converting a relative value.

Returns:Shape

the converted target property type

Annotations
@Override
getInstanceback to summary
public static StyleConverter<String, Shape> getInstance()

Gets the ShapeConverter instance.

Returns:StyleConverter<String, Shape>

the ShapeConverter instance