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
This class provides a manager for the SVGColor property values.
- Version:
- $Id: SVGColorManager.java 1733416 2016-03-03 07:07:13Z gadams $
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Value
The default value.protected String
The 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
ConstructorsConstructorDescriptionSVGColorManager
(String prop) Creates a new SVGColorManager.SVGColorManager
(String prop, Value v) Creates a new SVGColorManager. -
Method Summary
Modifier and TypeMethodDescriptioncomputeValue
(CSSStylableElement elt, String pseudo, CSSEngine engine, int idx, StyleMap sm, Value value) private Value
createCIELabColorValue
(org.w3c.css.sac.LexicalUnit lu, Value v) private Value
createCIELCHColorValue
(org.w3c.css.sac.LexicalUnit lu, Value v) private Value
createDeviceColorValue
(org.w3c.css.sac.LexicalUnit lu, Value v, int expectedComponents) private Value
createICCColorValue
(org.w3c.css.sac.LexicalUnit lu, Value v) private Value
createICCNamedColorValue
(org.w3c.css.sac.LexicalUnit lu, Value v) createValue
(org.w3c.css.sac.LexicalUnit lu, CSSEngine engine) ImplementsValueManager.createValue(LexicalUnit,CSSEngine)
.private void
expectComma
(org.w3c.css.sac.LexicalUnit lu) private void
expectIdent
(org.w3c.css.sac.LexicalUnit lu) private void
expectNonNull
(org.w3c.css.sac.LexicalUnit lu) protected float
getColorValue
(org.w3c.css.sac.LexicalUnit lu) Creates a float value usable as a component of an RGBColor.ImplementsValueManager.getDefaultValue()
.ImplementsValueManager.getPropertyName()
.int
ImplementsValueManager.getPropertyType()
.boolean
ImplementsValueManager.isAdditiveProperty()
.boolean
ImplementsValueManager.isAnimatableProperty()
.boolean
ImplementsValueManager.isInheritedProperty()
.private Value
parseColor12Function
(org.w3c.css.sac.LexicalUnit lu, Value v) private Value
parseColorFunction
(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 Details
-
property
The name of the handled property. -
defaultValue
The default value.
-
-
Constructor Details
-
SVGColorManager
Creates a new SVGColorManager. The default value is black. -
SVGColorManager
Creates a new SVGColorManager.
-
-
Method Details
-
isInheritedProperty
public boolean isInheritedProperty()ImplementsValueManager.isInheritedProperty()
.- Specified by:
isInheritedProperty
in interfaceValueManager
- Overrides:
isInheritedProperty
in classColorManager
-
isAnimatableProperty
public boolean isAnimatableProperty()ImplementsValueManager.isAnimatableProperty()
.- Specified by:
isAnimatableProperty
in interfaceValueManager
- Overrides:
isAnimatableProperty
in classColorManager
-
isAdditiveProperty
public boolean isAdditiveProperty()ImplementsValueManager.isAdditiveProperty()
.- Specified by:
isAdditiveProperty
in interfaceValueManager
- Overrides:
isAdditiveProperty
in classColorManager
-
getPropertyType
public int getPropertyType()ImplementsValueManager.getPropertyType()
.- Specified by:
getPropertyType
in interfaceValueManager
- Overrides:
getPropertyType
in classColorManager
-
getPropertyName
ImplementsValueManager.getPropertyName()
.- Specified by:
getPropertyName
in interfaceValueManager
- Overrides:
getPropertyName
in classColorManager
-
getDefaultValue
ImplementsValueManager.getDefaultValue()
.- Specified by:
getDefaultValue
in interfaceValueManager
- Overrides:
getDefaultValue
in classColorManager
-
createValue
ImplementsValueManager.createValue(LexicalUnit,CSSEngine)
.- Specified by:
createValue
in interfaceValueManager
- Overrides:
createValue
in classAbstractColorManager
- Parameters:
lu
- The SAC lexical unit used to create the value.engine
- The calling CSSEngine.- Throws:
DOMException
-
parseColorFunction
-
parseColor12Function
-
createICCColorValue
-
createICCNamedColorValue
-
createCIELabColorValue
-
createCIELCHColorValue
-
createDeviceColorValue
-
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, String pseudo, CSSEngine engine, int idx, StyleMap sm, Value value) - Specified by:
computeValue
in interfaceValueManager
- Overrides:
computeValue
in 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.
-