TResult - The type of the result this element will provide Created by Xyanid on 28.10.2015.public abstract class SVGElementBase<TResult> extends ElementBase<SVGDataProvider,TResult,SVGElementBase<SVGDataProvider>>
| Constructor and Description |
|---|
SVGElementBase(String name,
Attributes attributes,
SVGElementBase<SVGDataProvider> parent,
SVGDataProvider dataProvider)
Creates a new instance of he element using the given attributes, parent and dataProvider.
|
| Modifier and Type | Method and Description |
|---|---|
TResult |
createResult()
|
protected abstract TResult
|
createResultInternal()
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.
|
CssStyle |
getCssStyle()
Returns the
CssStyle of
this element, which is either a reference to an existing style or the element
itself has a style.
|
TResult |
getResult()
Returns the result for the current element.
|
javafx.scene.transform.Transform |
getTransformation()
|
protected abstract void |
initializeResult(TResult result)
This method will be called in the
createResult()
and allows to modify the result such as applying a style or transformations.
|
void |
processCharacterData(char[] ch,
int start,
int length)
Will be called when character data (CDATA) is read for an element.
|
void |
startProcessing()
Will be called when an element is started that represents this element.
|
getAttribute, getAttributes, getChildren, getDataProvider, getName, getParentpublic SVGElementBase(String name, Attributes attributes, SVGElementBase<SVGDataProvider> parent, SVGDataProvider dataProvider) throws IllegalArgumentException
name - value of the elementattributes - attributes of the elementparent - parent of the elementdataProvider - dataprovider to be usedIllegalArgumentException
- if either value or dataProvider are null
public final CssStyle getCssStyle()
CssStyle of this
element, which is either a reference to an existing style or the element
itself has a style. If the element itself does not provide a style then the style of the
ElementBase.parent will be used if it exist. This is a cascading call
meaning that at worst case the
last ElementBase.parent that has a style will be called
CssStyle of this element or first
style in the ElementBase.parent tree
public final javafx.scene.transform.Transform getTransformation()
throws SVGException
Enumerations.SvgAttribute#TRANSFORM is present.
otherwise null.
SVGException - if there is a transformation
which has invalid data for its matrix.
protected abstract TResult createResultInternal() throws SVGException
SVGException - will be thrown when an error
during creation occurs
protected abstract void initializeResult(TResult result) throws SVGException
createResult() and
allows to modify the result such as applying a style or transformations.
result - the result which should be modified.SVGException - will be thrown when an error
during modification
public final TResult createResult() throws SVGException
SVGExceptionpublic final TResult getResult() throws SVGException
getResult in class ElementBase<SVGDataProvider,TResult,SVGElementBase<SVGDataProvider>>SVGExceptionpublic void startProcessing()
throws SVGException
startProcessing in class ElementBase<SVGDataProvider,TResult,SVGElementBase<SVGDataProvider>>SVGExceptionpublic void processCharacterData(char[] ch,
int start,
int length)
throws SVGException
processCharacterData in class ElementBase<SVGDataProvider,TResult,SVGElementBase<SVGDataProvider>>ch - The characters.start - The start position in the character array.length - The number of characters to use from the
character array.
SVGExceptionpublic void endProcessing()
throws SVGException
endProcessing in class ElementBase<SVGDataProvider,TResult,SVGElementBase<SVGDataProvider>>SVGExceptionCopyright © 2015 Saxonia Systems AG. All rights reserved.