public static class IltColorModifier.MultiColor extends IltColorModifier
0.5, a yellow representation when the value
is below 0.75, and a red representation when the value is above 0.75.
IltColorModifier.MultiColor, IltColorModifier.Shade| Modifier and Type | Field and Description |
|---|---|
static int |
BLUE
The blue color is modified.
|
static int |
GREEN
The green color is modified.
|
static int |
RED
The red color is modified.
|
static int |
USE_BAR_VALUE
The relevant value is the current bar value.
|
static int |
USE_LAST_VALUE
The relevant value is the last value of the chart.
|
static int |
USE_MAX_VALUE
The relevant value is the maximum value of the chart.
|
static int |
USE_PIXEL_VALUE
The relevant value is the current pixel value.
|
Standard| Constructor and Description |
|---|
MultiColor()
Creates a new color modifier.
|
MultiColor(int relevantValue)
Creates a new color modifier.
|
MultiColor(int relevantValue,
int modifiedColor)
Creates a new color modifier.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getRelevantValue()
Returns the value that is used as the color threshold.
|
int |
modify(int backgroundColor,
int foregroundColor,
IltColorModifierContext context)
This method is invoked for each animated pixel of the gauge or chart.
|
void |
setModifiedColor(int modifiedColor)
Sets the color to be modified.
|
void |
setRelevantValue(int relevantValue)
Sets the relevant value used to modify the current color.
|
Blue, Color, compose, Green, Red, UseForegroundColorpublic static final int USE_PIXEL_VALUE
public static final int USE_BAR_VALUE
public static final int USE_LAST_VALUE
public static final int USE_MAX_VALUE
public static final int RED
public static final int GREEN
public static final int BLUE
public MultiColor(int relevantValue)
new MultiColor(relevantValue,MultiColor.RED && MultiColor.GREEN && MultiColor.BLUE);.relevantValue - The value to be used as the color threshold.
This parameter can be:USE_PIXEL_VALUE,
USE_BAR_VALUE,
USE_LAST_VALUE, or
USE_MAX_VALUE.
USE_PIXEL_VALUE,
USE_BAR_VALUE,
USE_LAST_VALUE,
USE_MAX_VALUEpublic MultiColor(int relevantValue,
int modifiedColor)
modifiedColor flag.relevantValue - The value to be used as the color threshold.
This parameter can be:USE_PIXEL_VALUE,
USE_BAR_VALUE,
USE_LAST_VALUE, or
USE_MAX_VALUE.
modifiedColor - The color to be modified.
This parameter can be: RED, GREEN, BLUE, or more than one
combined using &.RED,
GREEN,
BLUE,
USE_PIXEL_VALUE,
USE_BAR_VALUE,
USE_LAST_VALUE,
USE_MAX_VALUEpublic MultiColor()
new MultiColor(USE_PIXEL_VALUE,MultiColor.RED && MultiColor.GREEN && MultiColor.BLUE);.USE_PIXEL_VALUE,
USE_BAR_VALUE,
USE_LAST_VALUE,
USE_MAX_VALUEpublic final void setRelevantValue(int relevantValue)
relevantValue - The value to be used as the color threshold.
This parameter can be one of the following:
USE_PIXEL_VALUEUSE_BAR_VALUEUSE_LAST_VALUEUSE_MAX_VALUEpublic final int getRelevantValue()
USE_PIXEL_VALUEUSE_BAR_VALUEUSE_LAST_VALUEUSE_MAX_VALUEpublic void setModifiedColor(int modifiedColor)
modifiedColor - The color to be modified.public int modify(int backgroundColor,
int foregroundColor,
IltColorModifierContext context)
IltColorModifierColorModel
for a particular device or for all images. It is merely used as a
common color model format.
This method is supposed to be overridden to implement the appropriate color modification.
modify in class IltColorModifierbackgroundColor - The background color of the chart for this pixel.foregroundColor - The foreground color of the chart for this pixel.context - The context for this pixel.ColorModel.getRGBdefault(),
IltColorModifierContext© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.