|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.java.dev.colorchooser.Palette
public abstract class Palette
Model for a palette that can be painted, and from which colors may be selected. An array of palettes to use may be supplied to a ColorChooser via the setPalettes method.
Constructor Summary | |
---|---|
Palette()
|
Method Summary | |
---|---|
static Palette |
createContinuousPalette(String name,
Dimension size,
float saturation)
|
static Palette |
createPredefinedPalette(String name,
Color[] colors,
String[] names)
|
abstract Color |
getColorAt(int x,
int y)
Returns the color at the specified point, or null if the point is beyond the bounds of the palette or in an area that does not indicate a color |
static Palette[] |
getDefaultPalettes(boolean continuousFirst)
Get the default set of 8 palettes used by the color chooser. |
abstract String |
getDisplayName()
Get a localized name for this palette or null if a display name is not warranted |
abstract String |
getNameAt(int x,
int y)
Returns a string description of the color at the point. |
abstract Dimension |
getSize()
Get the on-screen size of this palette |
abstract void |
paintTo(Graphics g)
Paint this palette to a graphics context. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Palette()
Method Detail |
---|
public abstract Color getColorAt(int x, int y)
x
- - an horizontal coordinate in the coordinate space of the palettey
- - a vertical coordinate in the coordinate space of the palette
public abstract String getNameAt(int x, int y)
x
- an horizontal coordinate in the coordinate space of the palettey
- a vertical coordinate in the coordinate space of the palette
getColorAt(int, int)
public abstract void paintTo(Graphics g)
g
- - a graphics context to paint intopublic abstract Dimension getSize()
public abstract String getDisplayName()
public static final Palette[] getDefaultPalettes(boolean continuousFirst)
public static final Palette createContinuousPalette(String name, Dimension size, float saturation)
public static final Palette createPredefinedPalette(String name, Color[] colors, String[] names)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |