Class SVGColorManager
- java.lang.Object
-
- org.apache.batik.css.engine.value.AbstractValueFactory
-
- org.apache.batik.css.engine.value.AbstractValueManager
-
- org.apache.batik.css.engine.value.IdentifierManager
-
- org.apache.batik.css.engine.value.AbstractColorManager
-
- org.apache.batik.css.engine.value.svg.ColorManager
-
- org.apache.batik.css.engine.value.svg.SVGColorManager
-
- All Implemented Interfaces:
ValueManager
- Direct Known Subclasses:
SVGPaintManager
public class SVGColorManager extends ColorManager
This class provides a manager for the SVGColor property values.- Version:
- $Id: SVGColorManager.java 1733416 2016-03-03 07:07:13Z gadams $
-
-
Field Summary
Fields Modifier and Type Field Description protected ValuedefaultValueThe default value.protected java.lang.StringpropertyThe name of the handled property.-
Fields inherited from class org.apache.batik.css.engine.value.svg.ColorManager
DEFAULT_VALUE
-
Fields inherited from class org.apache.batik.css.engine.value.AbstractColorManager
computedValues, values
-
-
Constructor Summary
Constructors Constructor Description SVGColorManager(java.lang.String prop)Creates a new SVGColorManager.SVGColorManager(java.lang.String prop, Value v)Creates a new SVGColorManager.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ValuecomputeValue(CSSStylableElement elt, java.lang.String pseudo, CSSEngine engine, int idx, StyleMap sm, Value value)private ValuecreateCIELabColorValue(org.w3c.css.sac.LexicalUnit lu, Value v)private ValuecreateCIELCHColorValue(org.w3c.css.sac.LexicalUnit lu, Value v)private ValuecreateDeviceColorValue(org.w3c.css.sac.LexicalUnit lu, Value v, int expectedComponents)private ValuecreateICCColorValue(org.w3c.css.sac.LexicalUnit lu, Value v)private ValuecreateICCNamedColorValue(org.w3c.css.sac.LexicalUnit lu, Value v)ValuecreateValue(org.w3c.css.sac.LexicalUnit lu, CSSEngine engine)ImplementsValueManager.createValue(LexicalUnit,CSSEngine).private voidexpectComma(org.w3c.css.sac.LexicalUnit lu)private voidexpectIdent(org.w3c.css.sac.LexicalUnit lu)private voidexpectNonNull(org.w3c.css.sac.LexicalUnit lu)protected floatgetColorValue(org.w3c.css.sac.LexicalUnit lu)Creates a float value usable as a component of an RGBColor.ValuegetDefaultValue()ImplementsValueManager.getDefaultValue().java.lang.StringgetPropertyName()ImplementsValueManager.getPropertyName().intgetPropertyType()ImplementsValueManager.getPropertyType().booleanisAdditiveProperty()ImplementsValueManager.isAdditiveProperty().booleanisAnimatableProperty()ImplementsValueManager.isAnimatableProperty().booleanisInheritedProperty()ImplementsValueManager.isInheritedProperty().private ValueparseColor12Function(org.w3c.css.sac.LexicalUnit lu, Value v)private ValueparseColorFunction(org.w3c.css.sac.LexicalUnit lu, Value v)-
Methods inherited from class org.apache.batik.css.engine.value.AbstractColorManager
createColorComponent, createRGBColor, getIdentifiers
-
Methods inherited from class org.apache.batik.css.engine.value.IdentifierManager
createStringValue
-
Methods inherited from class org.apache.batik.css.engine.value.AbstractValueManager
createFloatValue
-
Methods inherited from class org.apache.batik.css.engine.value.AbstractValueFactory
createDOMException, createInvalidFloatTypeDOMException, createInvalidFloatValueDOMException, createInvalidIdentifierDOMException, createInvalidLexicalUnitDOMException, createInvalidStringTypeDOMException, createMalformedLexicalUnitDOMException, resolveURI
-
-
-
-
Field Detail
-
property
protected java.lang.String property
The name of the handled property.
-
defaultValue
protected Value defaultValue
The default value.
-
-
Constructor Detail
-
SVGColorManager
public SVGColorManager(java.lang.String prop)
Creates a new SVGColorManager. The default value is black.
-
SVGColorManager
public SVGColorManager(java.lang.String prop, Value v)Creates a new SVGColorManager.
-
-
Method Detail
-
isInheritedProperty
public boolean isInheritedProperty()
ImplementsValueManager.isInheritedProperty().- Specified by:
isInheritedPropertyin interfaceValueManager- Overrides:
isInheritedPropertyin classColorManager
-
isAnimatableProperty
public boolean isAnimatableProperty()
ImplementsValueManager.isAnimatableProperty().- Specified by:
isAnimatablePropertyin interfaceValueManager- Overrides:
isAnimatablePropertyin classColorManager
-
isAdditiveProperty
public boolean isAdditiveProperty()
ImplementsValueManager.isAdditiveProperty().- Specified by:
isAdditivePropertyin interfaceValueManager- Overrides:
isAdditivePropertyin classColorManager
-
getPropertyType
public int getPropertyType()
ImplementsValueManager.getPropertyType().- Specified by:
getPropertyTypein interfaceValueManager- Overrides:
getPropertyTypein classColorManager
-
getPropertyName
public java.lang.String getPropertyName()
ImplementsValueManager.getPropertyName().- Specified by:
getPropertyNamein interfaceValueManager- Overrides:
getPropertyNamein classColorManager
-
getDefaultValue
public Value getDefaultValue()
ImplementsValueManager.getDefaultValue().- Specified by:
getDefaultValuein interfaceValueManager- Overrides:
getDefaultValuein classColorManager
-
createValue
public Value createValue(org.w3c.css.sac.LexicalUnit lu, CSSEngine engine) throws org.w3c.dom.DOMException
ImplementsValueManager.createValue(LexicalUnit,CSSEngine).- Specified by:
createValuein interfaceValueManager- Overrides:
createValuein classAbstractColorManager- Parameters:
lu- The SAC lexical unit used to create the value.engine- The calling CSSEngine.- Throws:
org.w3c.dom.DOMException
-
createICCNamedColorValue
private Value createICCNamedColorValue(org.w3c.css.sac.LexicalUnit lu, Value v)
-
createCIELabColorValue
private Value createCIELabColorValue(org.w3c.css.sac.LexicalUnit lu, Value v)
-
createCIELCHColorValue
private Value createCIELCHColorValue(org.w3c.css.sac.LexicalUnit lu, Value v)
-
createDeviceColorValue
private Value createDeviceColorValue(org.w3c.css.sac.LexicalUnit lu, Value v, int expectedComponents)
-
expectIdent
private void expectIdent(org.w3c.css.sac.LexicalUnit lu)
-
expectComma
private void expectComma(org.w3c.css.sac.LexicalUnit lu)
-
expectNonNull
private void expectNonNull(org.w3c.css.sac.LexicalUnit lu)
-
computeValue
public Value computeValue(CSSStylableElement elt, java.lang.String pseudo, CSSEngine engine, int idx, StyleMap sm, Value value)
- Specified by:
computeValuein interfaceValueManager- Overrides:
computeValuein classAbstractColorManager- Parameters:
elt- The owner of the value.pseudo- The pseudo element.engine- The CSSEngine.idx- The property index in the engine.sm- The computed style map.value- The value to compute.
-
getColorValue
protected float getColorValue(org.w3c.css.sac.LexicalUnit lu)
Creates a float value usable as a component of an RGBColor.
-
-