com.eteks.awt.image
Class Web216ColorModel

java.lang.Object
  |
  +--java.awt.image.ColorModel
        |
        +--java.awt.image.IndexColorModel
              |
              +--com.eteks.awt.image.Web216ColorModel
All Implemented Interfaces:
Transparency

public class Web216ColorModel
extends IndexColorModel

A concrete MappingPaleteModel which uses a fixed palette consisting of the standard "safe 216 Web colors" + a tranparent color at index 216. Each Red, Green, Blue component of the 216 colors palette take a value among the 6 values of the following set : (0x00, 0x33, 0x66, 0x99, OxCC, OxFF). 6 power 3 makes 216 total possible combinations.

Since:
PJA2.3
Author:
Fernando Echeverria, Emmanuel PUYBARET

Field Summary
private static int NCOLORS
           
private static byte[] PAL_BLUE
           
private static byte[] PAL_GREEN
           
private static byte[] PAL_RED
           
private static int TRANSPARENT
           
 
Fields inherited from class java.awt.image.IndexColorModel
allgrayopaque, CACHESIZE, lookupcache, map_size, rgb, transparent_index, validBits
 
Fields inherited from class java.awt.image.ColorModel
colorSpace, colorSpaceType, is_sRGB, isAlphaPremultiplied, loaded, maxBits, nBits, numColorComponents, numComponents, pData, pixel_bits, RGBdefault, supportsAlpha, transferType, transparency
 
Fields inherited from interface java.awt.Transparency
BITMASK, OPAQUE, TRANSLUCENT
 
Constructor Summary
Web216ColorModel()
          Creates a color model with fixed Web216 palette.
 
Method Summary
(package private) static void ()
           
 
Methods inherited from class java.awt.image.IndexColorModel
checkAllGrayOpaque, convertToIntDiscrete, createCompatibleSampleModel, createCompatibleWritableRaster, finalize, getAllValid, getAlpha, getAlphas, getBlue, getBlues, getComponents, getComponents, getComponentSize, getDataElement, getDataElements, getDataElements, getGreen, getGreens, getMapSize, getRed, getReds, getRGB, getRGBs, getTransparency, getTransparentPixel, getValidPixels, initIDs, installpixel, isCompatibleRaster, isCompatibleSampleModel, isValid, isValid, setBits, setRGBs, setTransparentPixel, toString
 
Methods inherited from class java.awt.image.ColorModel
coerceData, equals, getAlpha, getAlphaRaster, getBlue, getColorSpace, getComponentSize, getDefaultTransferType, getGreen, getNormalizedComponents, getNumColorComponents, getNumComponents, getPixelSize, getRed, getRGB, getRGBdefault, getTransferType, getUnnormalizedComponents, hasAlpha, hashCode, isAlphaPremultiplied, loadLibraries
 
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

NCOLORS

private static int NCOLORS

TRANSPARENT

private static int TRANSPARENT

PAL_RED

private static byte[] PAL_RED

PAL_GREEN

private static byte[] PAL_GREEN

PAL_BLUE

private static byte[] PAL_BLUE
Constructor Detail

Web216ColorModel

public Web216ColorModel()
Creates a color model with fixed Web216 palette.
Method Detail

static void ()