Package org.apache.fop.fo.properties
Class ColorProperty
java.lang.Object
org.apache.fop.fo.properties.Property
org.apache.fop.fo.properties.ColorProperty
Class for properties that wrap Color values
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Inner class for creating instances of ColorTypeProperty -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final PropertyCache<ColorProperty>
cache holding canonical ColorProperty instancesprivate final Color
The color represented by this property. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
ColorProperty
(Color value) Create a new ColorProperty with a given color. -
Method Summary
Modifier and TypeMethodDescriptionboolean
getColor
(FOUserAgent foUserAgent) Returns an AWT instance of this colorCan't convert to any other typesstatic ColorProperty
getInstance
(FOUserAgent foUserAgent, String value) Set the color given a particular String.This method expects to be overridden by subclassesint
hashCode()
toString()
Methods inherited from class org.apache.fop.fo.properties.Property
getCharacter, getCondLength, getEnum, getKeep, getLength, getLengthPair, getLengthRange, getList, getNCname, getNumber, getNumeric, getSpace, getSpecifiedValue, getString, isAuto, setSpecifiedValue
-
Field Details
-
CACHE
cache holding canonical ColorProperty instances -
color
The color represented by this property.
-
-
Constructor Details
-
ColorProperty
Create a new ColorProperty with a given color.- Parameters:
value
- the color to use.
-
-
Method Details
-
getInstance
public static ColorProperty getInstance(FOUserAgent foUserAgent, String value) throws PropertyException Set the color given a particular String. For a full List of supported values please see ColorUtil.- Parameters:
foUserAgent
- FOP user agentvalue
- RGB value as String to be parsed- Returns:
- the canonical ColorProperty instance corresponding to the given value
- Throws:
PropertyException
- if the value can't be parsed- See Also:
-
getColor
Returns an AWT instance of this color -
toString
-
getColorProperty
Can't convert to any other types- Returns:
- this.colorType
-
getObject
Description copied from class:Property
This method expects to be overridden by subclasses -
equals
-
hashCode
public int hashCode()
-