TPaint - the type of the paint needpublic abstract class SVGGradientBase<TPaint extends javafx.scene.paint.Paint> extends SVGElementBase<TPaint>
| Modifier | Constructor and Description |
|---|---|
protected |
SVGGradientBase(String name,
Attributes attributes,
SVGElementBase<?> parent,
SVGDocumentDataProvider dataProvider)
Creates a new instance of he element using the given attributes, parent and dataProvider.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
canConsumeResult()
Determines whether the result of this element will be requested or not.
|
abstract TPaint |
createResult(SVGShapeBase<?> shape)
This method can be used to create a result, that depends on the provided
SVGElementBase. |
void |
endProcessing()
Will be called when the end of the element was been reached and thus the processing is finished.
|
List<javafx.scene.paint.Stop> |
getStops()
Gets the stops related to this gradient.
|
protected void |
initializeResult(TPaint paint,
StyleSupplier styleSupplier)
This method will be called in the
SVGElementBase.createAndInitializeResult(StyleSupplier) 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.
|
boolean |
rememberElement()
Determines if the element will be kept, meaning it will be kept in memory and is available as a parent for all its children.
|
void |
startProcessing()
Will be called when an element is started that represents this element.
|
createAndInitializeResult, createResult, getClipPath, getResult, getStyle, getStyleAndResolveInheritance, getTransformation, storeElementInDocumentDataProvidergetAttributeHolder, getAttributes, getDocumentDataProvider, getName, getParent, getUnmodifiableChildren, toStringprotected SVGGradientBase(String name, Attributes attributes, SVGElementBase<?> parent, SVGDocumentDataProvider 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 nullpublic final List<javafx.scene.paint.Stop> getStops() throws SVGException
SVGException - if an error occurs during the retrieval of the stops.public boolean rememberElement()
ElementBaserememberElement in class ElementBase<SVGAttributeType,SVGAttributeHolder,SVGDocumentDataProvider,TPaint extends javafx.scene.paint.Paint,SVGElementBase<?>,SVGElementBase<?>>public void startProcessing()
throws SAXException
ElementBasestartProcessing in class ElementBase<SVGAttributeType,SVGAttributeHolder,SVGDocumentDataProvider,TPaint extends javafx.scene.paint.Paint,SVGElementBase<?>,SVGElementBase<?>>SAXException - will be thrown when an error occurs during processingpublic void processCharacterData(char[] ch,
int start,
int length)
throws SAXException
ElementBaseprocessCharacterData in class ElementBase<SVGAttributeType,SVGAttributeHolder,SVGDocumentDataProvider,TPaint extends javafx.scene.paint.Paint,SVGElementBase<?>,SVGElementBase<?>>ch - The characters.start - The start position in the character array.length - The number of characters to use from the
character array.SAXException - will be thrown when an error occurs during processing the characterspublic void endProcessing()
throws SAXException
ElementBaseendProcessing in class ElementBase<SVGAttributeType,SVGAttributeHolder,SVGDocumentDataProvider,TPaint extends javafx.scene.paint.Paint,SVGElementBase<?>,SVGElementBase<?>>SAXException - will be thrown when an error occurs during processingpublic boolean canConsumeResult()
ElementBase.getResult().canConsumeResult in class ElementBase<SVGAttributeType,SVGAttributeHolder,SVGDocumentDataProvider,TPaint extends javafx.scene.paint.Paint,SVGElementBase<?>,SVGElementBase<?>>protected final void initializeResult(TPaint paint, StyleSupplier styleSupplier) throws SVGException
SVGElementBaseSVGElementBase.createAndInitializeResult(StyleSupplier) 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.initializeResult in class SVGElementBase<TPaint extends javafx.scene.paint.Paint>paint - the result which should be modified.styleSupplier - the StyleSupplier to use when a SVGCssStyle is needed.SVGException - will be thrown when an error during modificationpublic abstract TPaint createResult(SVGShapeBase<?> shape) throws SVGException
SVGElementBase.shape - the SVGShapeBase requesting this gradient.TPaint.SVGException - if an error occurs during the creation of the result.Copyright © 2016 Saxonia Systems AG. All rights reserved.