|
JHotDraw 7.5.1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.image.MemoryImageSource org.jhotdraw.color.AbstractColorWheelImageProducer org.jhotdraw.color.ColorSquareImageProducer
public class ColorSquareImageProducer
Produces a square image for JColorWheel
by interpreting two
components of a ColorSpace
as x and y coordinates.
JColorWheel
Field Summary | |
---|---|
protected int[] |
alphas
Lookup table for alphas. |
protected float[] |
angulars
Lookup table for angular component values. |
protected float[] |
radials
Lookup table for radial component values. |
Fields inherited from class org.jhotdraw.color.AbstractColorWheelImageProducer |
---|
angularIndex, colorSpace, h, isLookupValid, isPixelsValid, pixels, radialIndex, verticalIndex, verticalValue, w |
Constructor Summary | |
---|---|
ColorSquareImageProducer(java.awt.color.ColorSpace sys,
int w,
int h)
Creates a new instance. |
|
ColorSquareImageProducer(java.awt.color.ColorSpace sys,
int w,
int h,
boolean flipX,
boolean flipY)
Creates a new instance. |
Method Summary | |
---|---|
void |
generateColorWheel()
|
protected void |
generateLookupTables()
|
float[] |
getColorAt(int x,
int y)
|
java.awt.Point |
getColorLocation(float[] components)
|
boolean |
needsGeneration()
|
void |
regenerateColorWheel()
|
Methods inherited from class org.jhotdraw.color.AbstractColorWheelImageProducer |
---|
getColorLocation, getRadius, setAngularComponentIndex, setRadialComponentIndex, setVerticalComponentIndex, setVerticalValue |
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 |
---|
protected float[] angulars
protected float[] radials
protected int[] alphas
Constructor Detail |
---|
public ColorSquareImageProducer(java.awt.color.ColorSpace sys, int w, int h)
public ColorSquareImageProducer(java.awt.color.ColorSpace sys, int w, int h, boolean flipX, boolean flipY)
Method Detail |
---|
protected void generateLookupTables()
public boolean needsGeneration()
needsGeneration
in class AbstractColorWheelImageProducer
public void regenerateColorWheel()
regenerateColorWheel
in class AbstractColorWheelImageProducer
public void generateColorWheel()
generateColorWheel
in class AbstractColorWheelImageProducer
public java.awt.Point getColorLocation(float[] components)
getColorLocation
in class AbstractColorWheelImageProducer
public float[] getColorAt(int x, int y)
getColorAt
in class AbstractColorWheelImageProducer
|
Copyright 1996-2010 (c) by the authors and contributors of the JHotDraw project. Some rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |