de.dante.extex.interpreter.context
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: 1.15 $
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

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

See Also:
Constant Field Values
Method Detail

getAlpha

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

Returns:
the alpha channel

equals

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

Parameters:
other - the other object to compare to
Returns:
true iff the color system is identical and the colors are the same

visit

public 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

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

Returns:
the string representation