TValue - type of the value.TUnit - the type of the unit if any.public abstract class SVGAttributeType<TValue,TUnit> extends AttributeWrapper
SVGElementBase.| Constructor and Description |
|---|
SVGAttributeType(TValue defaultValue,
SVGDocumentDataProvider dataProvider)
Creates new instance.
|
| Modifier and Type | Method and Description |
|---|---|
SVGDocumentDataProvider |
getDocumentDataProvider() |
boolean |
getIsInherited() |
boolean |
getIsNone() |
TUnit |
getUnit()
Returns the
valueAndUnits value. |
TValue |
getValue()
Returns the
valueAndUnits key. |
javafx.util.Pair<TValue,TUnit> |
getValueAndUnit()
Returns the
valueAndUnit. |
protected abstract javafx.util.Pair<TValue,TUnit> |
getValueAndUnit(String text)
This will be called if actual data is present in the css text, this is the case if the cssText is not
INHERIT_INDICATOR or NONE_INDICATOR. |
boolean |
hasUnit(TUnit unit)
Determines if this length value has the provided unit.
|
void |
setText(String text) |
void |
useDefaultValue()
Set the default value
|
equals, getText, hashCodepublic SVGAttributeType(TValue defaultValue, SVGDocumentDataProvider dataProvider)
defaultValue - the default value of this to use.dataProvider - the SVGDocumentDataProvider to use when data is needed.public final SVGDocumentDataProvider getDocumentDataProvider()
dataProvider.public final boolean getIsInherited()
isInherited.public final boolean getIsNone()
isNone.public final TValue getValue() throws SVGException
valueAndUnits key.valueAndUnits key.SVGException - when an error occurs during the initialization of the value and unit.public final TUnit getUnit() throws SVGException
valueAndUnits value.valueAndUnits value.SVGException - when an error occurs during the initialization of the value and unit.public boolean hasUnit(TUnit unit) throws SVGException
unit - the SVGAttributeTypeLength.Unit that is expected.SVGException - if a problem occurs during the retrieval of the unit and value of this attribute.public final javafx.util.Pair<TValue,TUnit> getValueAndUnit() throws SVGException
valueAndUnit.valueAndUnit.SVGExceptionpublic final void useDefaultValue()
public final void setText(String text)
setText in class AttributeWrapperprotected abstract javafx.util.Pair<TValue,TUnit> getValueAndUnit(String text) throws SVGException
INHERIT_INDICATOR or NONE_INDICATOR.text - cssText which is not equal to INHERIT_INDICATOR or NONE_INDICATOR.Pair which contains the value as the key and the value as the value.SVGException - when any error occurs during the consumption of the given text.Copyright © 2016 Saxonia Systems AG. All rights reserved.