TResult - The type of the result this element will provide @author Xyanid on 28.10.2015.public abstract class SVGElementBase<TResult> extends ElementBase<SVGAttributeType,SVGAttributeHolder,SVGDocumentDataProvider,TResult,SVGElementBase<?>>
| Modifier | Constructor and Description |
|---|---|
protected |
SVGElementBase(String name,
Attributes attributes,
SVGDocumentDataProvider dataProvider)
Creates a new instance of he element using the given attributes, parent and dataProvider.
|
| Modifier and Type | Method and Description |
|---|---|
TResult |
createAndInitializeResult(SVGCssStyle parentStyle,
javafx.scene.transform.Transform parentTransform)
Creates a result represented by this element and uses the given supplier in order to fetch data needed to initialize the result
|
protected abstract TResult |
createResult(SVGCssStyle ownStyle,
javafx.scene.transform.Transform ownTransform)
Must be overwritten in the actual implementation to create a new result for this element based on the information available.
|
void |
endProcessing()
Will be called when the end of the element was been reached and thus the processing is finished.
|
TResult |
getResult()
Returns the result for the current element.
|
protected Optional<javafx.scene.transform.Transform> |
getTransformation() |
protected abstract void |
initializeResult(TResult result,
SVGCssStyle ownStyle,
javafx.scene.transform.Transform ownTransform)
This method will be called in the
createAndInitializeResult(SVGCssStyle, Transform) and allows to modify the result such as applying a style or transformations. |
void |
startProcessing()
Will be called when an element is started that represents this element.
|
getAttributeHolder, getAttributes, getDocumentDataProvider, getName, getUnmodifiableChildren, keepElement, processCharacterData, toStringprotected SVGElementBase(String name, Attributes attributes, SVGDocumentDataProvider dataProvider) throws IllegalArgumentException
name - value of the elementattributes - attributes of the elementdataProvider - dataprovider to be usedIllegalArgumentException - if either value or dataProvider are nullpublic final TResult getResult() throws SAXException
getResult in class ElementBase<SVGAttributeType,SVGAttributeHolder,SVGDocumentDataProvider,TResult,SVGElementBase<?>>SAXException - will be thrown when an error occurs retrieving the resultpublic void startProcessing()
throws SAXException
ElementBasestartProcessing in class ElementBase<SVGAttributeType,SVGAttributeHolder,SVGDocumentDataProvider,TResult,SVGElementBase<?>>SAXException - will be thrown when an error occurs during processingpublic void endProcessing()
throws SAXException
ElementBaseendProcessing in class ElementBase<SVGAttributeType,SVGAttributeHolder,SVGDocumentDataProvider,TResult,SVGElementBase<?>>SAXException - will be thrown when an error occurs during processingpublic final TResult createAndInitializeResult(SVGCssStyle parentStyle, javafx.scene.transform.Transform parentTransform) throws SVGException
parentStyle - the SVGCssStyle to use, which is the parent style of this element. May be null if this element does not have a parent.parentTransform - the transform of the parent of this element.SVGException - thrown when an exception during creation occurs.protected final Optional<javafx.scene.transform.Transform> getTransformation() throws SVGException
CoreAttributeMapper.TRANSFORM is present.
otherwise null.SVGException - if there is a transformation which has invalid data for its matrix.protected abstract TResult createResult(SVGCssStyle ownStyle, javafx.scene.transform.Transform ownTransform) throws SVGException
ownStyle - the SVGCssStyle to use, which represents this elements style which is already resolved of inheritance and collision.ownTransform - the Transform of this element.SVGException - will be thrown when an error during creation occursprotected abstract void initializeResult(TResult result, SVGCssStyle ownStyle, javafx.scene.transform.Transform ownTransform) throws SVGException
createAndInitializeResult(SVGCssStyle, Transform) and allows to modify the result such as applying a style or transformations. The given
inheritanceResolver
should be used to retrieve such data, this simply is needed because some elements can actually be referenced e.g. SVGUse and their actual parent is not the one from which the
inherited style attributes can be retrieved.result - the result which should be modified.ownStyle - the SVGCssStyle to use, which represents this elements style which is already resolved of inheritance and collisionownTransform - the Transform of this element.SVGException - will be thrown when an error during modificationCopyright © 2017 Saxonia Systems AG. All rights reserved.