public abstract class Palette extends Object
Constructor and Description |
---|
Palette() |
Modifier and Type | Method and Description |
---|---|
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() |
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.
|
abstract void |
setSize(int w,
int h)
Get a localized name for this palette or null if a display name is not
warranted
|
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 palettepublic 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 palettegetColorAt(int, int)
public abstract void paintTo(Graphics g)
g
- - a graphics context to paint intopublic abstract Dimension getSize()
public abstract void setSize(int w, int h)
public abstract String getDisplayName()
public static final Palette[] getDefaultPalettes(boolean continuousFirst)
public static final Palette createContinuousPalette(String name, Dimension size, float saturation)
Jas4pp 1.5 © Java Analysis Studio for Particle Physics