com.octo.captcha.component.image.color
Class SingleColorGenerator

java.lang.Object
  extended by com.octo.captcha.component.image.color.SingleColorGenerator
All Implemented Interfaces:
ColorGenerator

public class SingleColorGenerator
extends java.lang.Object
implements ColorGenerator

Simple color generator that always return the same color


Field Summary
 java.awt.Color color
          Unique color to be used
 
Constructor Summary
SingleColorGenerator(java.awt.Color color)
          construct a simple color generator
 
Method Summary
 java.awt.Color getNextColor()
          This return a new color, from a finite set.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

color

public java.awt.Color color
Unique color to be used

Constructor Detail

SingleColorGenerator

public SingleColorGenerator(java.awt.Color color)
construct a simple color generator

Parameters:
color - Unique color to be used
Method Detail

getNextColor

public java.awt.Color getNextColor()
Description copied from interface: ColorGenerator
This return a new color, from a finite set.

Specified by:
getNextColor in interface ColorGenerator
Returns:
the next color
See Also:
ColorGenerator.getNextColor()


Copyright 2003-2009 JCaptcha. All Rights Reserved.