charva.awt

Class ColorPair


public class ColorPair
extends java.lang.Object

This class is used to represent a color-pair (a combination of a foreground color and a background color).

Constructor Summary

ColorPair(Color foreground_, Color background_)
Construct a color-pair from a foreground color and a background color.

Method Summary

boolean
equals(Object object_)
Returns true if this color pair is equal to the specified color pair.
int
getBackground()
int
getForeground()
void
setBackground(int color_)
Set the background color.
void
setForeground(int color_)
Set the foreground color.
String
toString()
Return a string representation of this object.

Constructor Details

ColorPair

public ColorPair(Color foreground_,
                 Color background_)
Construct a color-pair from a foreground color and a background color. The parameters must be fields of the Color class.

Method Details

equals

public boolean equals(Object object_)
Returns true if this color pair is equal to the specified color pair.

getBackground

public int getBackground()

getForeground

public int getForeground()

setBackground

public void setBackground(int color_)
Set the background color. The parameter must be a field of the Color class.

setForeground

public void setForeground(int color_)
Set the foreground color. The parameter must be a field of the Color class.

toString

public String toString()
Return a string representation of this object.