org.freehep.graphicsio.ps
Class MappedColor

java.lang.Object
  extended by java.awt.Color
      extended by org.freehep.graphicsio.ps.MappedColor
All Implemented Interfaces:
java.awt.Paint, java.awt.Transparency, java.io.Serializable

public class MappedColor
extends java.awt.Color

Version:
$Id: MappedColor.java 8584 2006-08-10 23:06:37Z duns $
Author:
Charles Loomis
See Also:
Serialized Form

Field Summary
protected  int brightness
          Value of the brightness/darkness of this color.
protected  int colorIndex
          Index of the color in the color map.
 
Fields inherited from class java.awt.Color
black, BLACK, blue, BLUE, cyan, CYAN, DARK_GRAY, darkGray, gray, GRAY, green, GREEN, LIGHT_GRAY, lightGray, magenta, MAGENTA, orange, ORANGE, pink, PINK, red, RED, white, WHITE, yellow, YELLOW
 
Fields inherited from interface java.awt.Transparency
BITMASK, OPAQUE, TRANSLUCENT
 
Constructor Summary
MappedColor(int r, int g, int b, int colorIndex)
          Constructor takes the RGB color components and the color index.
MappedColor(int r, int g, int b, int colorIndex, int brightness)
          Constructor takes the RGB color components, the color index, and the brightness.
 
Method Summary
 java.awt.Color brighter()
          Make a brightened color based on this color.
 java.awt.Color darker()
          Make a darkened color based on this color.
 int getBrightness()
          Get the brightness of this color.
 java.lang.String getColorTag()
          Get the tag associated with this color.
 
Methods inherited from class java.awt.Color
createContext, decode, equals, getAlpha, getBlue, getColor, getColor, getColor, getColorComponents, getColorComponents, getColorSpace, getComponents, getComponents, getGreen, getHSBColor, getRed, getRGB, getRGBColorComponents, getRGBComponents, getTransparency, hashCode, HSBtoRGB, RGBtoHSB, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

colorIndex

protected int colorIndex
Index of the color in the color map.


brightness

protected int brightness
Value of the brightness/darkness of this color. Larger values indicate darker colors and vice versa.

Constructor Detail

MappedColor

public MappedColor(int r,
                   int g,
                   int b,
                   int colorIndex)
Constructor takes the RGB color components and the color index.


MappedColor

public MappedColor(int r,
                   int g,
                   int b,
                   int colorIndex,
                   int brightness)
Constructor takes the RGB color components, the color index, and the brightness.

Method Detail

brighter

public java.awt.Color brighter()
Make a brightened color based on this color.

Overrides:
brighter in class java.awt.Color

darker

public java.awt.Color darker()
Make a darkened color based on this color.

Overrides:
darker in class java.awt.Color

getBrightness

public int getBrightness()
Get the brightness of this color.


getColorTag

public java.lang.String getColorTag()
Get the tag associated with this color.



Copyright © 2000-2007 FreeHEP. All Rights Reserved.