FreeHEP API
Version v1.2

org.freehep.graphicsio.ps
Class MappedColor

java.lang.Object
  |
  +--java.awt.Color
        |
        +--org.freehep.graphicsio.ps.MappedColor
All Implemented Interfaces:
Paint, Serializable, Transparency

public class MappedColor
extends Color

Version:
$Id: MappedColor.java,v 1.1 2002/07/30 19:11:28 duns Exp $
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
 Color brighter()
          Make a brightened color based on this color.
 Color darker()
          Make a darkened color based on this color.
 int getBrightness()
          Get the brightness of this color.
 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 Color brighter()
Make a brightened color based on this color.

Overrides:
brighter in class Color

darker

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

Overrides:
darker in class Color

getBrightness

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


getColorTag

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


FreeHEP API
Version v1.2

Copyright © 2000-2003 FreeHEP, All Rights Reserved.