|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.image.ColorModel
ilog.views.maps.graphic.style.IlvDoubleIntervalColorModel
public class IlvDoubleIntervalColorModel
Implements a color model that performs a linear interpolation to compute the pixel colors within intervals specified by the user.
| Field Summary |
|---|
| Fields inherited from class java.awt.image.ColorModel |
|---|
pixel_bits, transferType |
| Fields inherited from interface java.awt.Transparency |
|---|
BITMASK, OPAQUE, TRANSLUCENT |
| Constructor Summary | |
|---|---|
IlvDoubleIntervalColorModel(Color[] colors,
double[] limits)
Creates an instance of IlvIntervalColorModel. |
|
IlvDoubleIntervalColorModel(double min,
double max)
Creates a new IlvDoubleIntervalColorModel instance. |
|
IlvDoubleIntervalColorModel(IlvInputStream stream)
Reads an IlvIntervalColorModel instance from an
IlvIntervalColorModel object. |
|
| Method Summary | |
|---|---|
boolean |
allowLimitChange()
Should the color model editor be able to change the value of the limits Returns true. |
static double |
convertToDouble(Object o)
Converts an IlvFeatureAttribute value to a
double value. |
boolean |
equals(Object object)
Compares this color model to the specified object. |
String |
format(int value)
Formats the value using a DecimalFormat object. |
int |
getAlpha(int pixel)
Returns the alpha component for this pixel value. |
int |
getBlue(int pixel)
Returns the interpolated blue component for this pixel value. |
Color[] |
getColors()
Returns the color array. |
int |
getGreen(int pixel)
Returns the interpolated green component for this pixel value. |
int |
getIntervalCount()
Returns the number of intervals, that is, the number of limits + 1. |
double[] |
getLimits()
Returns the limit array. |
int |
getRed(int pixel)
Returns the interpolated red component for this pixel value. |
int |
getRGB(int pixel)
Returns the interpolated RGB component for this pixel value. |
int |
getValueRGB(Object value)
Encodes a graphical object meta data into a color. |
int |
hashCode()
Returns a hash value for this object. |
boolean |
isPersistent()
Returns true. |
int |
parse(String limit)
Parses the limit using a DecimalFormat object. |
void |
write(IlvOutputStream stream)
Writes the renderer to an IlvOutputStream. |
| Methods inherited from class java.lang.Object |
|---|
clone, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public IlvDoubleIntervalColorModel(Color[] colors,
double[] limits)
IlvIntervalColorModel. The intervals
from which the color model will interpolate the values are specified by an
array of colors and an array of limits arranged in descending order.
colors - The array of Color objects that define the
color limits.limits - The array of double values that define the
interval limits. The length of limits should be equal to
colors.length - 2.
public IlvDoubleIntervalColorModel(IlvInputStream stream)
throws IlvReadFileException
IlvIntervalColorModel instance from an
IlvIntervalColorModel object.
stream - The input stream.
IlvReadFileException - if an error occurs while reading.
public IlvDoubleIntervalColorModel(double min,
double max)
IlvDoubleIntervalColorModel instance. The model
will contain exactly 2 limits and a black to white color model.
min - The minimum value.max - The maximum value.| Method Detail |
|---|
public boolean equals(Object object)
equals in class ColorModelobject - The object to compare.
true is returned.public int hashCode()
hashCode in class ColorModelpublic int getAlpha(int pixel)
getAlpha in class ColorModelpixel - The pixel value.
public int getRed(int pixel)
getRed in class ColorModelpixel - The pixel value.
public int getGreen(int pixel)
getGreen in class ColorModelpixel - The pixel value.
public int getBlue(int pixel)
getBlue in class ColorModelpixel - The pixel value.
public int getRGB(int pixel)
getRGB in class ColorModelpixel - The pixel value.
public int getValueRGB(Object value)
getValueRGB in interface IlvColorEncodervalue - The metadata to encode.
ColorModel.getRGBdefault() color model.IlvColorEncoder.getValueRGB(java.lang.Object)public static double convertToDouble(Object o)
IlvFeatureAttribute value to a
double value.
o - The IlvFeatureAttribute to convert.
double value or
Double.NaN if no conversion is possible.public Color[] getColors()
public double[] getLimits()
public int getIntervalCount()
public void write(IlvOutputStream stream)
throws IOException
IlvOutputStream.
write in interface IlvPersistentObjectstream - the output stream
IOException - thrown when an exception occurs during
the write operation for this object.public boolean isPersistent()
true.
true.public boolean allowLimitChange()
true.
allowLimitChange in interface IlvColorIntervalLimitFormatIlvColorIntervalLimitFormat.allowLimitChange()public String format(int value)
DecimalFormat object.
format in interface IlvColorIntervalLimitFormatvalue - The value.
IlvColorIntervalLimitFormat.format(int)public int parse(String limit)
DecimalFormat object.
parse in interface IlvColorIntervalLimitFormatlimit - The limit.
IlvColorIntervalLimitFormat.parse(java.lang.String)
|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||