info.monitorenter.gui.util
Class ColorIterator.LuminanceStepper

java.lang.Object
  extended by info.monitorenter.gui.util.ColorIterator.ADefaultStepping
      extended by info.monitorenter.gui.util.ColorIterator.LuminanceStepper
All Implemented Interfaces:
ColorIterator.ISteppingModel, Cloneable
Enclosing class:
ColorIterator

public static class ColorIterator.LuminanceStepper
extends ColorIterator.ADefaultStepping

A stepping model that steps on the luminance line of the HSB color space.

Version:
$Revision: 1.3 $
Author:
Achim Westermann

Field Summary
 
Fields inherited from class info.monitorenter.gui.util.ColorIterator.ADefaultStepping
m_stepping
 
Constructor Summary
ColorIterator.LuminanceStepper()
          Defcon.
ColorIterator.LuminanceStepper(float stepping)
          Creates an instance with the given stepping to go on the luminance line of the color space.
 
Method Summary
 void doStep(ColorIterator tostep)
          Performs a luminance step on the given ColorIterator's HSBColor.
 
Methods inherited from class info.monitorenter.gui.util.ColorIterator.ADefaultStepping
clone
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ColorIterator.LuminanceStepper

public ColorIterator.LuminanceStepper()
Defcon.


ColorIterator.LuminanceStepper

public ColorIterator.LuminanceStepper(float stepping)
                               throws IllegalArgumentException
Creates an instance with the given stepping to go on the luminance line of the color space.

Parameters:
stepping - the stepping for each step in between 0.0 and 1.0.
Throws:
IllegalArgumentException - if stepping is <= 0.0 or >= 1.0.
Method Detail

doStep

public void doStep(ColorIterator tostep)
Performs a luminance step on the given ColorIterator's HSBColor.

The bounds are watched: if a step would cross 1.0f, it will be continued beginning from 0. if a step would cross the luminance value of the ColorIterator's start luminance, the step will only go as far as this value. Else there would be problems with finding the end of the iteration.

Parameters:
tostep - the color iterator to perform the step on.


Copyright © 2001 - 2007 LGPL, All Rights Footloose.