Package info.monitorenter.gui.util
Class ColorIterator.AlphaStepper
- java.lang.Object
-
- info.monitorenter.gui.util.ColorIterator.ADefaultStepping
-
- info.monitorenter.gui.util.ColorIterator.AlphaStepper
-
- All Implemented Interfaces:
ColorIterator.ISteppingModel
,java.lang.Cloneable
- Enclosing class:
- ColorIterator
public static class ColorIterator.AlphaStepper extends ColorIterator.ADefaultStepping
A stepping model that steps on the alpha channel of the HSB color space.- Version:
- $Revision: 1.10 $
- Author:
- Achim Westermann
-
-
Field Summary
-
Fields inherited from class info.monitorenter.gui.util.ColorIterator.ADefaultStepping
m_stepping
-
-
Constructor Summary
Constructors Constructor Description AlphaStepper()
Creates an instance with 100 alpha steps.AlphaStepper(int steps)
Creates an instance with the given stepping to go on the alpha channel of the color space.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
doStep(ColorIterator tostep)
Performs a alpha step on the given ColorIterator's HSBColor.void
setSteps(int steps)
Sets the amount of steps in the color space.-
Methods inherited from class info.monitorenter.gui.util.ColorIterator.ADefaultStepping
clone
-
-
-
-
Constructor Detail
-
AlphaStepper
public AlphaStepper()
Creates an instance with 100 alpha steps.
-
AlphaStepper
public AlphaStepper(int steps)
Creates an instance with the given stepping to go on the alpha channel of the color space.- Parameters:
steps
- the amount of steps to take on the saturation line.
-
-
Method Detail
-
doStep
public void doStep(ColorIterator tostep)
Performs a alpha step on the given ColorIterator's HSBColor.The bounds are watched: if a step would cross 255, it will be continued beginning from 0. if a step would cross the alpha value of the ColorIterator's start alpha, 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.
-
setSteps
public void setSteps(int steps)
Description copied from interface:ColorIterator.ISteppingModel
Sets the amount of steps in the color space.- Specified by:
setSteps
in interfaceColorIterator.ISteppingModel
- Overrides:
setSteps
in classColorIterator.ADefaultStepping
- Parameters:
steps
- the amount of steps in the color space.- See Also:
ColorIterator.ADefaultStepping.setSteps(int)
-
-