contrib.ch.randelshofer.quaqua.colorchooser
Class ColorTrackImageProducer

java.lang.Object
  extended by java.awt.image.MemoryImageSource
      extended by contrib.ch.randelshofer.quaqua.colorchooser.ColorTrackImageProducer
All Implemented Interfaces:
java.awt.image.ImageProducer

public class ColorTrackImageProducer
extends java.awt.image.MemoryImageSource

ColorTrackImageProducer creates the image for the track of a color slider.

Version:
1.1 2005-08-28 Support for vertical color track implemented. Passing now a null pixel array to super constructor to avoid unnecessary memory allocation. Method markAsDirty() added.
1.0.1 2005-04-18 Fixed a minor shift in the color range.
1.0 29 March 2005 Created.
Author:
Werner Randelshofer
See Also:
ColorSliderUI

Constructor Summary
ColorTrackImageProducer(int w, int h, int trackBuffer, boolean isHorizontal)
          Creates a new instance.
 
Method Summary
 void componentChanged(int index)
           
 void generateColorTrack()
           
 int getHeight()
           
 int getWidth()
           
 void markAsDirty()
           
 boolean needsGeneration()
           
 void regenerateColorTrack()
           
 void setBaseComponents(javax.swing.BoundedRangeModel[] components)
           
 void setColorComponentIndex(int index)
           
 void setColorSliderModel(ColorSliderModel colorizer)
           
 
Methods inherited from class java.awt.image.MemoryImageSource
addConsumer, isConsumer, newPixels, newPixels, newPixels, newPixels, newPixels, removeConsumer, requestTopDownLeftRightResend, setAnimated, setFullBufferUpdates, startProduction
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ColorTrackImageProducer

public ColorTrackImageProducer(int w,
                               int h,
                               int trackBuffer,
                               boolean isHorizontal)
Creates a new instance.

Method Detail

getWidth

public int getWidth()

getHeight

public int getHeight()

markAsDirty

public void markAsDirty()

needsGeneration

public boolean needsGeneration()

regenerateColorTrack

public void regenerateColorTrack()

generateColorTrack

public void generateColorTrack()

setBaseComponents

public void setBaseComponents(javax.swing.BoundedRangeModel[] components)

setColorSliderModel

public void setColorSliderModel(ColorSliderModel colorizer)

setColorComponentIndex

public void setColorComponentIndex(int index)

componentChanged

public void componentChanged(int index)