org.jhotdraw.color
Class ColorTrackImageProducer

java.lang.Object
  extended by java.awt.image.MemoryImageSource
      extended by org.jhotdraw.color.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:
$Id: ColorTrackImageProducer.java 527 2009-06-07 14:28:19Z rawcoder $
Author:
Werner Randelshofer
See Also:
ColorSliderUI

Field Summary
private  float[] baseComponents
           
private  ColorSliderModel colorizer
           
private  int component
           
private  int componentIndex
           
private  int h
           
private  boolean isDirty
           
private  boolean isHorizontal
           
private  int[] pixels
           
private  int trackBuffer
           
private  int w
           
 
Constructor Summary
ColorTrackImageProducer(int w, int h, int trackBuffer, boolean isHorizontal)
          Creates a new instance.
 
Method Summary
 void componentChanged(int index)
           
 void generateColorTrack()
           
private  void generateHorizontalColorTrack()
           
private  void generateVerticalColorTrack()
           
 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
 

Field Detail

pixels

private int[] pixels

w

private int w

h

private int h

baseComponents

private float[] baseComponents

component

private int component

trackBuffer

private int trackBuffer

colorizer

private ColorSliderModel colorizer

isDirty

private boolean isDirty

componentIndex

private int componentIndex

isHorizontal

private boolean isHorizontal
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()

generateHorizontalColorTrack

private void generateHorizontalColorTrack()

generateVerticalColorTrack

private void generateVerticalColorTrack()

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)