Top Description Inners Fields Constructors Methods
org.apache.poi.ddf

public Class EscherColorRef

extends Object
Class Inheritance
Imports
org.apache.poi.util.BitField, .LittleEndian

An OfficeArtCOLORREF structure entry which also handles color extension opid data

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum
EscherColorRef.SysIndexProcedure

The following enum specifies values that indicate special procedural properties that are used to modify the color components of another color.

public static enum

Field Summary

Modifier and TypeField and Description
private int
private static final BitField
FLAG_BLUE

An unsigned integer that specifies the intensity of the blue color channel.

private static final BitField
FLAG_GREEN

An unsigned integer that specifies the intensity of the green color channel.

private static final BitField
FLAG_PALETTE_INDEX

A bit that specifies whether the current palette will be used to determine the color.

private static final BitField
FLAG_PALETTE_RGB

A bit that specifies whether the current palette will be used to determine the color.

private static final BitField
FLAG_RED

An unsigned integer that specifies the intensity of the red color channel.

private static final BitField
FLAG_SCHEME_INDEX

A bit that specifies whether the current application-defined color scheme will be used to determine the color.

private static final BitField
FLAG_SYS_INDEX

A bit that specifies whether the system color scheme will be used to determine the color.

private static final BitField
FLAG_SYSTEM_RGB

A bit that specifies whether the color is a standard RGB color.

private int

Constructor Summary

AccessConstructor and Description
public
EscherColorRef(int colorRef)

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

Method Summary

Modifier and TypeMethod and Description
private int
public int

Returns:

index of current palette (color) or -1 if hasPaletteIndexFlag() is false
getPaletteIndex
()

public int[]
public int

Returns:

index of the scheme color or -1 if hasSchemeIndexFlag() is false
getSchemeIndex
()

public int

Returns:

index of system color table or -1 if hasSysIndexFlag() is false
getSysIndex
()

public int
public EscherColorRef.SysIndexProcedure

Returns:

SysIndexProcedure if hasSysIndexFlag() is true, otherwise null
getSysIndexProcedure
()

Return the SysIndexProcedure - for invert flag use getSysIndexInvert()

public EscherColorRef.SysIndexSource

Returns:

SysIndexSource if hasSysIndexFlag() is true, otherwise null
getSysIndexSource
()

public boolean
public boolean
public boolean
public boolean
public boolean
public void
setPaletteIndexFlag(boolean flag)

public void
setPaletteRGBFlag(boolean flag)

public void
setSchemeIndexFlag(boolean flag)

public void
setSysIndexFlag(boolean flag)

public void
setSystemRGBFlag(boolean flag)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

colorRefback to summary
private int colorRef
FLAG_BLUEback to summary
private static final BitField FLAG_BLUE

An unsigned integer that specifies the intensity of the blue color channel. A value of 0x00 has the minimum blue intensity. A value of 0xFF has the maximum blue intensity.

FLAG_GREENback to summary
private static final BitField FLAG_GREEN

An unsigned integer that specifies the intensity of the green color channel. A value of 0x00 has the minimum green intensity. A value of 0xFF has the maximum green intensity.

FLAG_PALETTE_INDEXback to summary
private static final BitField FLAG_PALETTE_INDEX

A bit that specifies whether the current palette will be used to determine the color. A value of 0x1 specifies that green and red will be treated as an unsigned 16-bit index into the current color palette. This color MAY be dithered. If this value is 0x1, blue MUST be 0x00.

FLAG_PALETTE_RGBback to summary
private static final BitField FLAG_PALETTE_RGB

A bit that specifies whether the current palette will be used to determine the color. A value of 0x1 specifies that red, green, and blue contain an RGB value that will be matched in the current color palette. This color MUST be solid.

FLAG_REDback to summary
private static final BitField FLAG_RED

An unsigned integer that specifies the intensity of the red color channel. A value of 0x00 has the minimum red intensity. A value of 0xFF has the maximum red intensity.

FLAG_SCHEME_INDEXback to summary
private static final BitField FLAG_SCHEME_INDEX

A bit that specifies whether the current application-defined color scheme will be used to determine the color. A value of 0x1 specifies that red will be treated as an index into the current color scheme table. If this value is 0x1, green and blue MUST be 0x00.

FLAG_SYS_INDEXback to summary
private static final BitField FLAG_SYS_INDEX

A bit that specifies whether the system color scheme will be used to determine the color. A value of 0x1 specifies that green and red will be treated as an unsigned 16-bit index into the system color table. Values less than 0x00F0 map directly to system colors.

FLAG_SYSTEM_RGBback to summary
private static final BitField FLAG_SYSTEM_RGB

A bit that specifies whether the color is a standard RGB color. 0x0 : The RGB color MAY use halftone dithering to display. 0x1 : The color MUST be a solid color.

opidback to summary
private int opid
Annotations
@SuppressWarnings:unused

Constructor Detail

EscherColorRefback to summary
public EscherColorRef(int colorRef)
EscherColorRefback to summary
public EscherColorRef(byte[] source, int start, int len)

Method Detail

getIndexback to summary
private int getIndex()
getPaletteIndexback to summary
public int getPaletteIndex()
Returns:int

index of current palette (color) or -1 if hasPaletteIndexFlag() is false

getRGBback to summary
public int[] getRGB()
getSchemeIndexback to summary
public int getSchemeIndex()
Returns:int

index of the scheme color or -1 if hasSchemeIndexFlag() is false

See Also
org.apache.poi.hslf.record.ColorSchemeAtom#getColor(int)
getSysIndexback to summary
public int getSysIndex()
Returns:int

index of system color table or -1 if hasSysIndexFlag() is false

See Also
org.apache.poi.sl.usermodel.PresetColor
getSysIndexInvertback to summary
public int getSysIndexInvert()
Returns:int

0 for no invert flag, 1 for SysIndexProcedure#INVERT_AFTER and 2 for SysIndexProcedure#INVERT_HIGHBIT_AFTER

getSysIndexProcedureback to summary
public EscherColorRef.SysIndexProcedure getSysIndexProcedure()

Return the SysIndexProcedure - for invert flag use getSysIndexInvert()

Returns:EscherColorRef.SysIndexProcedure

SysIndexProcedure if hasSysIndexFlag() is true, otherwise null

getSysIndexSourceback to summary
public EscherColorRef.SysIndexSource getSysIndexSource()
Returns:EscherColorRef.SysIndexSource

SysIndexSource if hasSysIndexFlag() is true, otherwise null

hasPaletteIndexFlagback to summary
public boolean hasPaletteIndexFlag()
hasPaletteRGBFlagback to summary
public boolean hasPaletteRGBFlag()
hasSchemeIndexFlagback to summary
public boolean hasSchemeIndexFlag()
hasSysIndexFlagback to summary
public boolean hasSysIndexFlag()
hasSystemRGBFlagback to summary
public boolean hasSystemRGBFlag()
setPaletteIndexFlagback to summary
public void setPaletteIndexFlag(boolean flag)
setPaletteRGBFlagback to summary
public void setPaletteRGBFlag(boolean flag)
setSchemeIndexFlagback to summary
public void setSchemeIndexFlag(boolean flag)
setSysIndexFlagback to summary
public void setSysIndexFlag(boolean flag)
setSystemRGBFlagback to summary
public void setSystemRGBFlag(boolean flag)
org.apache.poi.ddf back to summary

public final Enum EscherColorRef.SysIndexProcedure

extends Enum<EscherColorRef.SysIndexProcedure>
Class Inheritance

The following enum specifies values that indicate special procedural properties that are used to modify the color components of another color. These values are combined with those of the SysIndexSource enum or with a user-specified color. The first six values are mutually exclusive.

Field Summary

Modifier and TypeField and Description
public static final EscherColorRef.SysIndexProcedure
ADD_GRAY_LEVEL

Add a gray level RGB value.

public static final EscherColorRef.SysIndexProcedure
DARKEN_COLOR

Darken the color by the value that is specified in the blue field.

public static final EscherColorRef.SysIndexProcedure
INVERT_AFTER

After making other modifications, invert the color.

public static final EscherColorRef.SysIndexProcedure
INVERT_HIGHBIT_AFTER

After making other modifications, invert the color by toggling just the high bit of each color channel.

public static final EscherColorRef.SysIndexProcedure
LIGHTEN_COLOR

Lighten the color by the value that is specified in the blue field.

private BitField
public static final EscherColorRef.SysIndexProcedure
REVERSE_GRAY_LEVEL

Reverse-subtract a gray level RGB value.

public static final EscherColorRef.SysIndexProcedure
SUB_GRAY_LEVEL

Subtract a gray level RGB value.

public static final EscherColorRef.SysIndexProcedure
THRESHOLD

If the color component being modified is less than the parameter contained in the blue field, set it to the minimum intensity.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static EscherColorRef.SysIndexProcedure
public static EscherColorRef.SysIndexProcedure[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

ADD_GRAY_LEVELback to summary
public static final EscherColorRef.SysIndexProcedure ADD_GRAY_LEVEL

Add a gray level RGB value. The blue field contains the gray level to add: NewColor = SourceColor + gray

DARKEN_COLORback to summary
public static final EscherColorRef.SysIndexProcedure DARKEN_COLOR

Darken the color by the value that is specified in the blue field. A blue value of 0xFF specifies that the color is to be left unchanged, whereas a blue value of 0x00 specifies that the color is to be completely darkened.

INVERT_AFTERback to summary
public static final EscherColorRef.SysIndexProcedure INVERT_AFTER

After making other modifications, invert the color. This enum value is only for documentation and won't be directly returned.

INVERT_HIGHBIT_AFTERback to summary
public static final EscherColorRef.SysIndexProcedure INVERT_HIGHBIT_AFTER

After making other modifications, invert the color by toggling just the high bit of each color channel. This enum value is only for documentation and won't be directly returned.

LIGHTEN_COLORback to summary
public static final EscherColorRef.SysIndexProcedure LIGHTEN_COLOR

Lighten the color by the value that is specified in the blue field. A blue value of 0xFF specifies that the color is to be left unchanged, whereas a blue value of 0x00 specifies that the color is to be completely lightened.

maskback to summary
private BitField mask
REVERSE_GRAY_LEVELback to summary
public static final EscherColorRef.SysIndexProcedure REVERSE_GRAY_LEVEL

Reverse-subtract a gray level RGB value. The blue field contains the gray level from which to subtract: NewColor = gray - SourceColor

SUB_GRAY_LEVELback to summary
public static final EscherColorRef.SysIndexProcedure SUB_GRAY_LEVEL

Subtract a gray level RGB value. The blue field contains the gray level to subtract: NewColor = SourceColor - gray

THRESHOLDback to summary
public static final EscherColorRef.SysIndexProcedure THRESHOLD

If the color component being modified is less than the parameter contained in the blue field, set it to the minimum intensity. If the color component being modified is greater than or equal to the parameter, set it to the maximum intensity.

Constructor Detail

SysIndexProcedureback to summary
private SysIndexProcedure(int mask)

Method Detail

valueOfback to summary
public static EscherColorRef.SysIndexProcedure valueOf(String name)
valuesback to summary
public static EscherColorRef.SysIndexProcedure[] values()
org.apache.poi.ddf back to summary

public final Enum EscherColorRef.SysIndexSource

extends Enum<EscherColorRef.SysIndexSource>
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final EscherColorRef.SysIndexSource
CURRENT_OR_LAST_COLOR

Use the current, or last-used, color.

public static final EscherColorRef.SysIndexSource
FILL_BACKGROUND_COLOR

Use the fill background color of the shape.

public static final EscherColorRef.SysIndexSource
FILL_COLOR

Use the fill color of the shape.

public static final EscherColorRef.SysIndexSource
FILL_OR_LINE_COLOR

If the shape contains a fill, use the fill color of the shape.

public static final EscherColorRef.SysIndexSource
LINE_BACKGROUND_COLOR

Use the line background color of the shape.

public static final EscherColorRef.SysIndexSource
LINE_COLOR

Use the line color of the shape.

public static final EscherColorRef.SysIndexSource
LINE_OR_FILL_COLOR

If the shape contains a line, use the line color of the shape.

public static final EscherColorRef.SysIndexSource
SHADOW_COLOR

Use the shadow color of the shape.

private int

Constructor Summary

AccessConstructor and Description
private
SysIndexSource(int value)

Method Summary

Modifier and TypeMethod and Description
public static EscherColorRef.SysIndexSource
public static EscherColorRef.SysIndexSource[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

CURRENT_OR_LAST_COLORback to summary
public static final EscherColorRef.SysIndexSource CURRENT_OR_LAST_COLOR

Use the current, or last-used, color.

FILL_BACKGROUND_COLORback to summary
public static final EscherColorRef.SysIndexSource FILL_BACKGROUND_COLOR

Use the fill background color of the shape.

FILL_COLORback to summary
public static final EscherColorRef.SysIndexSource FILL_COLOR

Use the fill color of the shape.

FILL_OR_LINE_COLORback to summary
public static final EscherColorRef.SysIndexSource FILL_OR_LINE_COLOR

If the shape contains a fill, use the fill color of the shape. Otherwise, use the line color.

LINE_BACKGROUND_COLORback to summary
public static final EscherColorRef.SysIndexSource LINE_BACKGROUND_COLOR

Use the line background color of the shape.

LINE_COLORback to summary
public static final EscherColorRef.SysIndexSource LINE_COLOR

Use the line color of the shape.

LINE_OR_FILL_COLORback to summary
public static final EscherColorRef.SysIndexSource LINE_OR_FILL_COLOR

If the shape contains a line, use the line color of the shape. Otherwise, use the fill color.

SHADOW_COLORback to summary
public static final EscherColorRef.SysIndexSource SHADOW_COLOR

Use the shadow color of the shape.

valueback to summary
private int value

Constructor Detail

SysIndexSourceback to summary
private SysIndexSource(int value)

Method Detail

valueOfback to summary
public static EscherColorRef.SysIndexSource valueOf(String name)
valuesback to summary
public static EscherColorRef.SysIndexSource[] values()