com.neuron.app.tonto
Class CCFColor

java.lang.Object
  extended by com.neuron.app.tonto.CCFColor

public class CCFColor
extends java.lang.Object

A representation of valid CCF Colors.


Field Summary
static int BLACK
           
static int DARK_GRAY
           
static CCFColor[] defaultMap
           
static int LIGHT_GRAY
           
static int WHITE
           
 
Method Summary
 java.awt.Color getAWTColor(boolean ext)
          Return a suitable AWT Color to match this CCF Color.
static CCFColor getColor(int color)
           
static int getColorFromRGB(int r, int g, int b)
           
 int getColorIndex()
           
static java.awt.Color[] getColorModel(boolean ext)
           
static int getGrayTint()
           
static int grayIndexToRGB(int gray, int[] rgb)
           
static int grayToRGB(int gray, int[] rgb)
           
 CCFColor makeColor(int[] rgbindex)
           
 CCFColor makeGray()
           
static int rgbIndexToGrayIndex(int val)
           
static int rgbToGrayIndex(int val)
           
static void setGrayTint(int tint)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

BLACK

public static final int BLACK
See Also:
Constant Field Values

DARK_GRAY

public static final int DARK_GRAY
See Also:
Constant Field Values

LIGHT_GRAY

public static final int LIGHT_GRAY
See Also:
Constant Field Values

WHITE

public static final int WHITE
See Also:
Constant Field Values

defaultMap

public static CCFColor[] defaultMap
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getGrayTint

public static int getGrayTint()

setGrayTint

public static void setGrayTint(int tint)

rgbIndexToGrayIndex

public static int rgbIndexToGrayIndex(int val)

rgbToGrayIndex

public static int rgbToGrayIndex(int val)

grayToRGB

public static int grayToRGB(int gray,
                            int[] rgb)

grayIndexToRGB

public static int grayIndexToRGB(int gray,
                                 int[] rgb)

getAWTColor

public java.awt.Color getAWTColor(boolean ext)
Return a suitable AWT Color to match this CCF Color.


makeGray

public CCFColor makeGray()

makeColor

public CCFColor makeColor(int[] rgbindex)

getColorIndex

public int getColorIndex()

getColorModel

public static java.awt.Color[] getColorModel(boolean ext)

getColor

public static CCFColor getColor(int color)

getColorFromRGB

public static int getColorFromRGB(int r,
                                  int g,
                                  int b)
Returns:
color index that most closely matches RGB value.