diff options
Diffstat (limited to 'src/java/org/apache/poi/ddf/EscherRGBProperty.java')
-rw-r--r-- | src/java/org/apache/poi/ddf/EscherRGBProperty.java | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/java/org/apache/poi/ddf/EscherRGBProperty.java b/src/java/org/apache/poi/ddf/EscherRGBProperty.java new file mode 100644 index 0000000000..1b8c9d2952 --- /dev/null +++ b/src/java/org/apache/poi/ddf/EscherRGBProperty.java @@ -0,0 +1,37 @@ +package org.apache.poi.ddf; + +/** + * A color property. + * + * @author Glen Stampoultzis (glens at apache.org) + */ +public class EscherRGBProperty + extends EscherSimpleProperty +{ + + public EscherRGBProperty( short propertyNumber, int rgbColor ) + { + super( propertyNumber, false, false, rgbColor ); + } + + public int getRgbColor() + { + return propertyValue; + } + + public byte getRed() + { + return (byte) ( propertyValue & 0xFF ); + } + + public byte getGreen() + { + return (byte) ( (propertyValue >> 8) & 0xFF ); + } + + public byte getBlue() + { + return (byte) ( (propertyValue >> 16) & 0xFF ); + } + +} |