jcurzez.peer.curses
Class CursesColor

java.lang.Object
  |
  +--jcurzez.peer.curses.CursesColor

public final class CursesColor
extends java.lang.Object

A curses color. This is the object that will be stored in realColor when using the curses implementation.

Each color is defined by :

Version:
0.0.3
Author:
Thomas Girard

Field Summary
(package private)  short blue
          Blue component of this CursesColor.
(package private)  short green
          Green component of this CursesColor.
(package private)  short index
          Index of the color for curses.
(package private)  short red
          Red component of this CursesColor.
 
Constructor Summary
CursesColor(short index, short red, short green, short blue)
          Creates a new color with specified intensified values, using RGB color system.
 
Method Summary
 short getBlue()
          Returns the blue component of this CursesColor.
 short getGreen()
          Returns the green component of this CursesColor.
 short getIndex()
          Returns the index of the color.
 short getRed()
          Returns the red component of this CursesColor.
 java.lang.String toString()
          Returns a string representation of this CursesColor, i.e. the intensity of red, green and blue.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

index

short index
Index of the color for curses.


red

short red
Red component of this CursesColor.


green

short green
Green component of this CursesColor.


blue

short blue
Blue component of this CursesColor.

Constructor Detail

CursesColor

public CursesColor(short index,
                   short red,
                   short green,
                   short blue)
Creates a new color with specified intensified values, using RGB color system.

Parameters:
index - the index of the color.
red - red intensity, in the range 0-1000.
green - green intensity, in the range 0-1000.
blue - blue intensity, in the range 0-1000.
Method Detail

toString

public java.lang.String toString()
Returns a string representation of this CursesColor, i.e. the intensity of red, green and blue.

Overrides:
toString in class java.lang.Object
Returns:
the color in the stringified form "[red=r,green=g,blue=b]".

getIndex

public short getIndex()
Returns the index of the color.

Returns:
the index of this CursesColor.

getRed

public short getRed()
Returns the red component of this CursesColor.

Returns:
the red component.

getGreen

public short getGreen()
Returns the green component of this CursesColor.

Returns:
the green component.

getBlue

public short getBlue()
Returns the blue component of this CursesColor.

Returns:
the blue component.


Send me an email