Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS | NEXT CLASS FRAMES  | NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD

Class ncsa.horizon.awt.color.IndexColorModelData

java.lang.Object
  |
  +--ncsa.horizon.awt.color.IndexColorModelData

public class IndexColorModelData
extends java.lang.Object
implements ColorModelData
a container for serializing an IndexColorModel

See Also:
ColorModelData, Serialized Form

Constructor Summary
IndexColorModelData(int bits, int size, byte[] r, byte[] g, byte[] b, byte[] a, int trans)
          save the data for creating a IndexColorModel
IndexColorModelData(java.awt.image.IndexColorModel dcm)
          save the data for duplicating a given IndexColorModel
 
Method Summary
java.awt.image.ColorModel createColorModel()
          create an IndexColorModel from this data
void getAlphas(byte[] a)
          fill a byte array with the alpha component values from this model data
void getBlues(byte[] b)
          fill a byte array with the blue component values from this model data
void getGreens(byte[] g)
          fill a byte array with the green component values from this model data
int getMapSize()
          return the number of colors in the index color model
int getPixelSize()
          return the size of each pixel
void getReds(byte[] r)
          fill a byte array with the red component values from this model data
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notifyAll, notify, toString, wait, wait, wait
 

Constructor Detail

IndexColorModelData

public IndexColorModelData(int bits,
                           int size,
                           byte[] r,
                           byte[] g,
                           byte[] b,
                           byte[] a,
                           int trans)
save the data for creating a IndexColorModel
Parameters:
bits - number of bits in each pixel
size - the number colors in this model
r - the red components
g - the green components
b - the blue components
a - the alpha components

IndexColorModelData

public IndexColorModelData(java.awt.image.IndexColorModel dcm)
save the data for duplicating a given IndexColorModel
Method Detail

getPixelSize

public int getPixelSize()
return the size of each pixel

getMapSize

public int getMapSize()
return the number of colors in the index color model

getReds

public void getReds(byte[] r)
fill a byte array with the red component values from this model data

getGreens

public void getGreens(byte[] g)
fill a byte array with the green component values from this model data

getBlues

public void getBlues(byte[] b)
fill a byte array with the blue component values from this model data

getAlphas

public void getAlphas(byte[] a)
fill a byte array with the alpha component values from this model data

createColorModel

public java.awt.image.ColorModel createColorModel()
create an IndexColorModel from this data
Specified by:
createColorModel in interface ColorModelData

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS | NEXT CLASS FRAMES  | NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD