org.extex.color
Interface Color

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
CmykColor, GrayscaleColor, HsvColor, RgbColor

public interface Color
extends java.io.Serializable

This interface declares some methods to access the color with an alpha channel.

Version:
$Revision: 5573 $
Author:
Gerd Neugebauer

Field Summary
static int MAX_VALUE
          The constant MAX_VALUE contains the maximal values for all channels.
 
Method Summary
 boolean equals(java.lang.Object other)
          Check that the current color is identical to another one.
 int getAlpha()
          Getter for the alpha channel.
 java.lang.String toString()
          Provide the string representation for the color.
 java.lang.Object visit(ColorVisitor visitor, java.lang.Object value)
          This method provides an entry point for the visitor pattern.
 

Field Detail

MAX_VALUE

static final int MAX_VALUE
The constant MAX_VALUE contains the maximal values for all channels.

See Also:
Constant Field Values
Method Detail

getAlpha

int getAlpha()
Getter for the alpha channel. The range of the value is 0x00 to 0xffff.

Returns:
the alpha channel

equals

boolean equals(java.lang.Object other)
Check that the current color is identical to another one.

Overrides:
equals in class java.lang.Object
Parameters:
other - the other object to compare to
Returns:
true iff the color system is identical and the colors are the same

visit

java.lang.Object visit(ColorVisitor visitor,
                       java.lang.Object value)
                       throws GeneralException
This method provides an entry point for the visitor pattern.

Parameters:
visitor - the visitor to apply
value - the argument for the visitor
Returns:
the result of the method invocation of the visitor
Throws:
GeneralException - in case of an error

toString

java.lang.String toString()
Provide the string representation for the color.

Overrides:
toString in class java.lang.Object
Returns:
the string representation