public class IlvEnumerationColorModel extends IndexColorModel implements IlvColorEncoder, IlvColorIntervalLimitFormat
IlvEnumerationColorModel
implements a color model that attaches
a color to each of the values passed in an array list.pixel_bits, transferType
BITMASK, OPAQUE, TRANSLUCENT
Constructor and Description |
---|
IlvEnumerationColorModel(IlvInputStream stream)
Creates a new
IlvEnumerationColorModel instance. |
IlvEnumerationColorModel(int[] rgb,
IlvEnumerationColorModel origin)
Creates a new
IlvEnumerationColorModel instance. |
Modifier and Type | Method and Description |
---|---|
boolean |
allowLimitChange()
If the color model editor is able to change the value of the limits
|
String |
format(int value)
Returns the string attached to the value.
|
int |
getValueRGB(Object value)
Encodes a graphical object meta data into a color.
|
static IlvEnumerationColorModel |
makeModel(ArrayList<?> valuesList)
Creates an enumeration model with one random color for each of the values.
|
int |
parse(String limit)
Finds the value attached to the limit.
|
void |
write(IlvOutputStream out)
Writes the attributes of a persistent object.
|
convertToIntDiscrete, createCompatibleSampleModel, createCompatibleWritableRaster, finalize, getAlpha, getAlphas, getBlue, getBlues, getComponents, getComponents, getComponentSize, getDataElement, getDataElements, getDataElements, getGreen, getGreens, getMapSize, getRed, getReds, getRGB, getRGBs, getTransparency, getTransparentPixel, getValidPixels, isCompatibleRaster, isCompatibleSampleModel, isValid, isValid, toString
coerceData, equals, getAlpha, getAlphaRaster, getBlue, getColorSpace, getComponentSize, getDataElement, getDataElements, getGreen, getNormalizedComponents, getNormalizedComponents, getNumColorComponents, getNumComponents, getPixelSize, getRed, getRGB, getRGBdefault, getTransferType, getUnnormalizedComponents, hasAlpha, hashCode, isAlphaPremultiplied
public IlvEnumerationColorModel(int[] rgb, IlvEnumerationColorModel origin)
IlvEnumerationColorModel
instance.rgb
- A new array of RGB colors.origin
- The initial color model.public IlvEnumerationColorModel(IlvInputStream stream) throws IlvReadFileException
IlvEnumerationColorModel
instance.stream
- The stream to read data from.IlvReadFileException
- if there is a problem reading from
stream
.public static IlvEnumerationColorModel makeModel(ArrayList<?> valuesList)
valuesList
- A list of values that should be attached to colors.public boolean allowLimitChange()
false
.allowLimitChange
in interface IlvColorIntervalLimitFormat
true
to give user access to insert/delete/change limits.IlvColorIntervalLimitFormat.allowLimitChange()
public String format(int value)
format
in interface IlvColorIntervalLimitFormat
value
- The value.IlvColorIntervalLimitFormat.format(int)
public int parse(String limit)
parse
in interface IlvColorIntervalLimitFormat
limit
- The limit.IlvColorIntervalLimitFormat.parse(java.lang.String)
public int getValueRGB(Object value)
getValueRGB
in interface IlvColorEncoder
value
- The metadata to encode.ColorModel.getRGBdefault()
color model.IlvColorEncoder.getValueRGB(java.lang.Object)
public void write(IlvOutputStream out) throws IOException
write
in interface IlvPersistentObject
out
- the output streamIOException
- thrown when an exception occurs during
the write operation for this object.IlvPersistentObject.write(ilog.views.io.IlvOutputStream)
© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.