java.lang.Object
org.jhotdraw8.fxbase.beans.AbstractPropertyBean
org.jhotdraw8.svg.io.AbstractFXSvgWriter
- All Implemented Interfaces:
org.jhotdraw8.fxbase.beans.PropertyBean,SvgSceneGraphWriter
- Direct Known Subclasses:
FXSvgFullWriter,FXSvgTinyWriter
public abstract class AbstractFXSvgWriter
extends org.jhotdraw8.fxbase.beans.AbstractPropertyBean
implements SvgSceneGraphWriter
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final IdFactoryprotected final org.jhotdraw8.xml.converter.DoubleXmlConverterprotected final org.jhotdraw8.xml.converter.FloatXmlConverterprotected final org.jhotdraw8.xml.converter.IntegerXmlConverterstatic final Stringstatic final Stringprotected static final Stringprotected static final StringFields inherited from class org.jhotdraw8.fxbase.beans.AbstractPropertyBean
propertiesFields inherited from interface org.jhotdraw8.svg.io.SvgSceneGraphWriter
CONVERT_TEXT_TO_PATH_KEY, DESC_PROPERTY_NAME, EXPORT_INVISIBLE_ELEMENTS_KEY, RELATIVIZE_PATHS_KEY, TITLE_PROPERTY_NAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAdditionalNodeClasses(javafx.scene.Node node) protected abstract Stringprotected abstract StringbooleanbooleanbooleanvoidsetConvertTextToPath(boolean newValue) voidsetExportInvisibleElements(boolean newValue) voidsetRelativizePaths(boolean relativizePaths) toDocument(javafx.scene.Node drawingNode, @Nullable CssDimension2D size) voidwrite(OutputStream out, javafx.scene.Node drawingNode, @Nullable CssDimension2D size) voidwrite(Writer out, javafx.scene.Node drawingNode, @Nullable CssDimension2D size) protected abstract voidwriteClipAttributes(XMLStreamWriter w, javafx.scene.Node node) protected abstract voidwriteClipPathDefs(XMLStreamWriter w, javafx.scene.Node node) protected abstract voidwriteCompositingAttributes(XMLStreamWriter w, javafx.scene.Node node) protected voidwriteDescElement(XMLStreamWriter w, javafx.scene.Node node) protected abstract voidwriteDocumentElementAttributes(XMLStreamWriter w, javafx.scene.Node drawingNode, @Nullable CssDimension2D size) protected voidwriteGroupStartElement(XMLStreamWriter w, javafx.scene.Group node) protected voidwriteIdAttribute(XMLStreamWriter w, javafx.scene.Node node) protected voidwriteNodeRecursively(XMLStreamWriter w, javafx.scene.Node node, int depth) protected voidwritePathStartElement(XMLStreamWriter w, javafx.scene.shape.Path node) protected voidwriteStrokedShapeElement(XMLStreamWriter w, javafx.scene.shape.Shape fxShape) protected voidwriteStyleAttributes(XMLStreamWriter w, javafx.scene.Node node) protected voidwriteTitleElement(XMLStreamWriter w, javafx.scene.Node node) Methods inherited from class org.jhotdraw8.fxbase.beans.AbstractPropertyBean
get, getNonNull, getPropertiesMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jhotdraw8.fxbase.beans.PropertyBean
getProperty, put, remove, set, setNonNull, valueAt
-
Field Details
-
SVG_MIME_TYPE
- See Also:
-
SVG_NS
- See Also:
-
XLINK_NS
- See Also:
-
XLINK_PREFIX
- See Also:
-
nb
protected final org.jhotdraw8.xml.converter.DoubleXmlConverter nb -
nbi
protected final org.jhotdraw8.xml.converter.IntegerXmlConverter nbi -
nbf
protected final org.jhotdraw8.xml.converter.FloatXmlConverter nbf -
idFactory
-
-
Constructor Details
-
AbstractFXSvgWriter
- Parameters:
imageUriKey- this property is used to retrieve an URL from an ImageView. If an ImageView does not have an URL, then the exporter includes the image with a data URL.skipKey- this property is used to retrieve a Boolean from a Node. If the Boolean is true, then the node is skipped.
-
-
Method Details
-
getAdditionalNodeClasses
-
getSvgBaseProfile
-
getSvgVersion
-
isExportInvisibleElements
public boolean isExportInvisibleElements() -
setExportInvisibleElements
public void setExportInvisibleElements(boolean newValue) -
isRelativizePaths
public boolean isRelativizePaths() -
setRelativizePaths
public void setRelativizePaths(boolean relativizePaths) -
isConvertTextToPath
public boolean isConvertTextToPath() -
setConvertTextToPath
public void setConvertTextToPath(boolean newValue) -
toDocument
public Document toDocument(javafx.scene.Node drawingNode, @Nullable CssDimension2D size) throws IOException - Throws:
IOException
-
write
public void write(OutputStream out, javafx.scene.Node drawingNode, @Nullable CssDimension2D size) throws IOException - Throws:
IOException
-
write
public void write(Writer out, javafx.scene.Node drawingNode, @Nullable CssDimension2D size) throws IOException - Throws:
IOException
-
writeClipAttributes
protected abstract void writeClipAttributes(XMLStreamWriter w, javafx.scene.Node node) throws XMLStreamException - Throws:
XMLStreamException
-
writeClipPathDefs
protected abstract void writeClipPathDefs(XMLStreamWriter w, javafx.scene.Node node) throws XMLStreamException, IOException - Throws:
XMLStreamExceptionIOException
-
writeCompositingAttributes
protected abstract void writeCompositingAttributes(XMLStreamWriter w, javafx.scene.Node node) throws XMLStreamException - Throws:
XMLStreamException
-
writeDescElement
protected void writeDescElement(XMLStreamWriter w, javafx.scene.Node node) throws XMLStreamException - Throws:
XMLStreamException
-
writeDocumentElementAttributes
protected abstract void writeDocumentElementAttributes(XMLStreamWriter w, javafx.scene.Node drawingNode, @Nullable CssDimension2D size) throws XMLStreamException - Throws:
XMLStreamException
-
writeGroupStartElement
protected void writeGroupStartElement(XMLStreamWriter w, javafx.scene.Group node) throws XMLStreamException - Throws:
XMLStreamException
-
writeIdAttribute
protected void writeIdAttribute(XMLStreamWriter w, javafx.scene.Node node) throws XMLStreamException - Throws:
XMLStreamException
-
writeNodeRecursively
protected void writeNodeRecursively(XMLStreamWriter w, javafx.scene.Node node, int depth) throws IOException, XMLStreamException - Throws:
IOExceptionXMLStreamException
-
writePathStartElement
protected void writePathStartElement(XMLStreamWriter w, javafx.scene.shape.Path node) throws XMLStreamException - Throws:
XMLStreamException
-
writeStrokedShapeElement
protected void writeStrokedShapeElement(XMLStreamWriter w, javafx.scene.shape.Shape fxShape) throws XMLStreamException, IOException - Throws:
XMLStreamExceptionIOException
-
writeStyleAttributes
protected void writeStyleAttributes(XMLStreamWriter w, javafx.scene.Node node) throws XMLStreamException - Throws:
XMLStreamException
-
writeTitleElement
protected void writeTitleElement(XMLStreamWriter w, javafx.scene.Node node) throws XMLStreamException - Throws:
XMLStreamException
-