Package org.apache.fop.fo.properties
Class ColorProperty
- java.lang.Object
-
- org.apache.fop.fo.properties.Property
-
- org.apache.fop.fo.properties.ColorProperty
-
public final class ColorProperty extends Property
Class for properties that wrap Color values
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classColorProperty.MakerInner class for creating instances of ColorTypeProperty
-
Field Summary
Fields Modifier and Type Field Description private static PropertyCache<ColorProperty>CACHEcache holding canonical ColorProperty instancesprivate java.awt.ColorcolorThe color represented by this property.
-
Constructor Summary
Constructors Modifier Constructor Description privateColorProperty(java.awt.Color value)Create a new ColorProperty with a given color.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)java.awt.ColorgetColor(FOUserAgent foUserAgent)Returns an AWT instance of this colorColorPropertygetColorProperty()Can't convert to any other typesstatic ColorPropertygetInstance(FOUserAgent foUserAgent, java.lang.String value)Set the color given a particular String.java.lang.ObjectgetObject()This method expects to be overridden by subclassesinthashCode()java.lang.StringtoString()-
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 Detail
-
CACHE
private static final PropertyCache<ColorProperty> CACHE
cache holding canonical ColorProperty instances
-
color
private final java.awt.Color color
The color represented by this property.
-
-
Method Detail
-
getInstance
public static ColorProperty getInstance(FOUserAgent foUserAgent, java.lang.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:
ColorUtil.parseColorString(FOUserAgent, String)
-
getColor
public java.awt.Color getColor(FOUserAgent foUserAgent)
Returns an AWT instance of this color
-
getColorProperty
public ColorProperty getColorProperty()
Can't convert to any other types- Returns:
- this.colorType
-
getObject
public java.lang.Object getObject()
Description copied from class:PropertyThis method expects to be overridden by subclasses
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-