org.apache.poi.ddf
Class EscherColorRef

java.lang.Object
  extended by org.apache.poi.ddf.EscherColorRef

public class EscherColorRef
extends java.lang.Object

An OfficeArtCOLORREF structure entry which also handles color extension opid data


Nested Class Summary
static class EscherColorRef.SysIndexProcedure
          The following enum specifies values that indicate special procedural properties that are used to modify the color components of another color.
static class EscherColorRef.SysIndexSource
           
 
Constructor Summary
EscherColorRef(byte[] source, int start, int len)
           
EscherColorRef(int colorRef)
           
 
Method Summary
 int getPaletteIndex()
           
 int[] getRGB()
           
 int getSchemeIndex()
           
 int getSysIndex()
           
 int getSysIndexInvert()
           
 EscherColorRef.SysIndexProcedure getSysIndexProcedure()
          Return the EscherColorRef.SysIndexProcedure - for invert flag use getSysIndexInvert()
 EscherColorRef.SysIndexSource getSysIndexSource()
           
 boolean hasPaletteIndexFlag()
           
 boolean hasPaletteRGBFlag()
           
 boolean hasSchemeIndexFlag()
           
 boolean hasSysIndexFlag()
           
 boolean hasSystemRGBFlag()
           
 void setPaletteIndexFlag(boolean flag)
           
 void setPaletteRGBFlag(boolean flag)
           
 void setSchemeIndexFlag(boolean flag)
           
 void setSysIndexFlag(boolean flag)
           
 void setSystemRGBFlag(boolean flag)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EscherColorRef

public EscherColorRef(int colorRef)

EscherColorRef

public EscherColorRef(byte[] source,
                      int start,
                      int len)
Method Detail

hasSysIndexFlag

public boolean hasSysIndexFlag()

setSysIndexFlag

public void setSysIndexFlag(boolean flag)

hasSchemeIndexFlag

public boolean hasSchemeIndexFlag()

setSchemeIndexFlag

public void setSchemeIndexFlag(boolean flag)

hasSystemRGBFlag

public boolean hasSystemRGBFlag()

setSystemRGBFlag

public void setSystemRGBFlag(boolean flag)

hasPaletteRGBFlag

public boolean hasPaletteRGBFlag()

setPaletteRGBFlag

public void setPaletteRGBFlag(boolean flag)

hasPaletteIndexFlag

public boolean hasPaletteIndexFlag()

setPaletteIndexFlag

public void setPaletteIndexFlag(boolean flag)

getRGB

public int[] getRGB()

getSysIndexSource

public EscherColorRef.SysIndexSource getSysIndexSource()
Returns:
EscherColorRef.SysIndexSource if hasSysIndexFlag() is true, otherwise null

getSysIndexProcedure

public EscherColorRef.SysIndexProcedure getSysIndexProcedure()
Return the EscherColorRef.SysIndexProcedure - for invert flag use getSysIndexInvert()

Returns:
EscherColorRef.SysIndexProcedure if hasSysIndexFlag() is true, otherwise null

getSysIndexInvert

public int getSysIndexInvert()
Returns:
0 for no invert flag, 1 for EscherColorRef.SysIndexProcedure.INVERT_AFTER and 2 for EscherColorRef.SysIndexProcedure.INVERT_HIGHBIT_AFTER

getSchemeIndex

public int getSchemeIndex()
Returns:
index of the scheme color or -1 if hasSchemeIndexFlag() is false
See Also:
ColorSchemeAtom

getPaletteIndex

public int getPaletteIndex()
Returns:
index of current palette (color) or -1 if hasPaletteIndexFlag() is false

getSysIndex

public int getSysIndex()
Returns:
index of system color table or -1 if hasSysIndexFlag() is false
See Also:
PresetColor