DynamicPDF by ceTe Software

com.cete.dynamicpdf
Class Grayscale

java.lang.Object
  |
  +--com.cete.dynamicpdf.Color
        |
        +--com.cete.dynamicpdf.Grayscale

public class Grayscale
extends Color

Class represents a grayscale color.


Constructor Summary
Grayscale(byte grayLevel)
          Initializes a new instance of the Grayscale class.
Grayscale(float grayLevel)
          Initializes a new instance of the Grayscale class.
Grayscale(int grayLevel)
          Initializes a new instance of the Grayscale class.
 
Method Summary
 void draw(PageWriter writer, Apply apply)
          Draws the color data to the given PageWriter object.
 boolean equals(java.lang.Object obj)
          Tests equality of colors.
 float getGrayLevel()
          Gets the gray value.
 int hashCode()
          Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
 
Methods inherited from class com.cete.dynamicpdf.Color
getAliceBlue, getAntiqueWhite, getAqua, getAquamarine, getAzure, getBeige, getBisque, getBlack, getBlanchedAlmond, getBlue, getBlueViolet, getBrown, getBurlyWood, getCadetBlue, getChartreuse, getChocolate, getCoral, getCornflowerBlue, getCornsilk, getCrimson, getCyan, getDarkBlue, getDarkCyan, getDarkGoldenRod, getDarkGray, getDarkGreen, getDarkKhaki, getDarkMagenta, getDarkOliveGreen, getDarkorange, getDarkOrchid, getDarkRed, getDarkSalmon, getDarkSeaGreen, getDarkSlateBlue, getDarkSlateGray, getDarkTurquoise, getDarkViolet, getDeepPink, getDeepSkyBlue, getDimGray, getDodgerBlue, getFeldspar, getFireBrick, getFloralWhite, getForestGreen, getFuchsia, getGainsboro, getGhostWhite, getGold, getGoldenRod, getGray, getGreen, getGreenYellow, getHoneyDew, getHotPink, getIndianRed, getIndigo, getIvory, getKhaki, getLavender, getLavenderBlush, getLawnGreen, getLemonChiffon, getLightBlue, getLightCoral, getLightCyan, getLightGoldenRodYellow, getLightGreen, getLightGrey, getLightPink, getLightSalmon, getLightSeaGreen, getLightSkyBlue, getLightSlateBlue, getLightSlateGray, getLightSteelBlue, getLightYellow, getLime, getLimeGreen, getLinen, getMagenta, getMaroon, getMediumAquaMarine, getMediumBlue, getMediumOrchid, getMediumPurple, getMediumSeaGreen, getMediumSlateBlue, getMediumSpringGreen, getMediumTurquoise, getMediumVioletRed, getMidnightBlue, getMintCream, getMistyRose, getMoccasin, getNavajoWhite, getNavy, getOldLace, getOlive, getOliveDrab, getOrange, getOrangeRed, getOrchid, getPaleGoldenRod, getPaleGreen, getPaleTurquoise, getPaleVioletRed, getPapayaWhip, getPeachPuff, getPeru, getPink, getPlum, getPowderBlue, getPurple, getRed, getRosyBrown, getRoyalBlue, getSaddleBrown, getSalmon, getSandyBrown, getSeaGreen, getSeaShell, getSienna, getSilver, getSkyBlue, getSlateBlue, getSlateGray, getSnow, getSpringGreen, getSteelBlue, getTan, getTeal, getThistle, getTomato, getTurquoise, getViolet, getVioletRed, getWheat, getWhite, getWhiteSmoke, getYellow, getYellowGreen
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Grayscale

public Grayscale(byte grayLevel)
Initializes a new instance of the Grayscale class.

Parameters:
grayLevel - The gray intensity.
See Also:
Grayscale

Grayscale

public Grayscale(int grayLevel)
Initializes a new instance of the Grayscale class.

Parameters:
grayLevel - The gray intensity.
See Also:
Grayscale

Grayscale

public Grayscale(float grayLevel)
Initializes a new instance of the Grayscale class.

Throws:
java.lang.IllegalArgumentException - Grayscale value must be from 0.0 to 1.0.
Parameters:
grayLevel - The gray intensity.
See Also:
Grayscale
Method Detail

getGrayLevel

public float getGrayLevel()
Gets the gray value.


equals

public boolean equals(java.lang.Object obj)
Tests equality of colors.

Specified by:
equals in class Color
Parameters:
obj - Object to compare to the current Color.
Returns:
true if the two colors are equal.

hashCode

public int hashCode()
Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.

Specified by:
hashCode in class Color
Returns:
A hash code for the current Color.

draw

public void draw(PageWriter writer,
                 Apply apply)
Draws the color data to the given PageWriter object.

Specified by:
draw in class Color
Parameters:
writer - PageWriter object to receive the color data.
apply - Defines how the color is applied.

DynamicPDF by ceTe Software

API Reference for DynamicPDF™ for Java generated on December 20, 2005
© Copyright 2005, ceTe Software