public abstract class AbstractConverter extends java.lang.Object implements CSSProperties, NodeConverter
| Modifier and Type | Field and Description |
|---|---|
protected java.util.Map<java.lang.String,java.lang.Object> |
allProperties
The CSS Properties of the Node to convert, including only those which have a not null StyleOrigin.
|
protected java.util.Map<java.lang.String,CSSProperty> |
cssProperties
The CSS Properties of the Node to convert, including all the properties.
|
protected ConverterDelegate |
delegate
The ConverterDelegate.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
properties
The CSS Properties of the Node to convert, including only those which have a not null StyleOrigin.
|
protected XMLNode |
xmlParent
Parent XML node used as the output container.
|
ARC_HEIGHT, ARC_WIDTH, BACKGROUND_COLOR, BACKGROUND_IMAGE, BACKGROUND_RADIUS, BORDER_COLOR, BORDER_RADIUS, FILL_PAINT, FONT, FONT_FAMILY, FONT_SIZE, FONT_STYLE, FONT_WEIGHT, IMAGE, OPACITY, REGION_BACKGROUND, REGION_BACKGROUND_POSITION, REGION_BACKGROUND_RADIUS, REGION_BACKGROUND_SIZE, REGION_BORDER, SCALE_SHAPE, SCALE_X, SCALE_Y, SHAPE, STROKE_DASHARRAY, STROKE_DASHOFFSET, STROKE_LINECAP, STROKE_LINEJOIN, STROKE_MITERLIMIT, STROKE_PAINT, STROKE_TYPE, STROKE_WIDTH, TEXT_BOUNDS_TYPE, TEXT_FILL, TRANSLATE_X, TRANSLATE_Y, VISIBILITY| Constructor and Description |
|---|
AbstractConverter(ConverterDelegate delegate,
javafx.scene.Node node,
XMLNode xmlParent)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addFill(javafx.scene.paint.Paint paint,
java.lang.StringBuilder buf)
Append fill style information based on the provided paint.
|
protected void |
addStroke(javafx.scene.paint.Paint paint,
java.lang.StringBuilder buf)
Append stroke style information based on the provided paint.
|
void |
applyTransforms(XMLNode xmlNode)
Apply all the Nodes transformations on the ConverterDelegate.
|
javafx.scene.Node |
getAdditionalNode()
Return the additional child Node on this Node (this is for example the case with the graphics Node on
Labeled Nodes). |
java.util.Map<java.lang.String,java.lang.Object> |
getAllProperties()
Return all the CSS properties Map of the Node.
|
java.util.Map<java.lang.String,CSSProperty> |
getCSSProperties()
Return the CSS properties Map of the Node.
|
protected double |
getOpacity()
Return the opacity of the Node.
|
javafx.scene.Parent |
getParent()
Return the converter Parent Node (may be null).
|
java.util.Map<java.lang.String,java.lang.Object> |
getProperties()
Return the CSS properties Map of the Node.
|
protected javafx.scene.transform.Transform |
getTransformFromAncestor(javafx.scene.Node node)
Return the Transform from the root of the Scene to the converter Node.
|
boolean |
hasVisibility()
Return true if a visibility property is explicitly set.
|
boolean |
isVisible()
Return true if the node should be visible based on its visibility property.
|
protected void |
setClip(java.lang.StringBuilder buf,
java.lang.String clipID)
Append a clip-path style if a clip id is provided.
|
protected void |
setFillOpacity(javafx.scene.paint.Paint paint,
XMLNode node)
Set the fill opacity attribute on the SVG node when applicable.
|
protected void |
setStrokeOpacity(javafx.scene.paint.Paint paint,
XMLNode node)
Set the stroke opacity attribute on the SVG node when applicable.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitapplyStyle, convertprotected ConverterDelegate delegate
protected final XMLNode xmlParent
protected java.util.Map<java.lang.String,CSSProperty> cssProperties
protected java.util.Map<java.lang.String,java.lang.Object> properties
protected java.util.Map<java.lang.String,java.lang.Object> allProperties
public AbstractConverter(ConverterDelegate delegate, javafx.scene.Node node, XMLNode xmlParent)
delegate - the ConverterDelegatenode - the NodexmlParent - the parent xml nodepublic javafx.scene.Parent getParent()
protected javafx.scene.transform.Transform getTransformFromAncestor(javafx.scene.Node node)
node - the Nodeprotected void setClip(java.lang.StringBuilder buf,
java.lang.String clipID)
buf - the style bufferclipID - the clip id to referencepublic java.util.Map<java.lang.String,CSSProperty> getCSSProperties()
getCSSProperties in interface NodeConverterpublic java.util.Map<java.lang.String,java.lang.Object> getAllProperties()
getAllProperties in interface NodeConverterpublic java.util.Map<java.lang.String,java.lang.Object> getProperties()
getProperties in interface NodeConverterpublic void applyTransforms(XMLNode xmlNode)
xmlNode - the nodepublic boolean hasVisibility()
public boolean isVisible()
protected double getOpacity()
protected void addStroke(javafx.scene.paint.Paint paint,
java.lang.StringBuilder buf)
paint - the stroke paintbuf - the style bufferprotected void addFill(javafx.scene.paint.Paint paint,
java.lang.StringBuilder buf)
paint - the fill paintbuf - the style bufferprotected void setStrokeOpacity(javafx.scene.paint.Paint paint,
XMLNode node)
paint - the stroke paintnode - the SVG node to updateprotected void setFillOpacity(javafx.scene.paint.Paint paint,
XMLNode node)
paint - the fill paintnode - the SVG node to updatepublic javafx.scene.Node getAdditionalNode()
Labeled Nodes). Return null by default.Copyright © 2021, 2022, 2025 Herve Girod. All Rights Reserved. Documentation and source under the BSD 3-Clause licence