|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectvisidia.misc.colorpalette.ColorPaletteManager
public class ColorPaletteManager
ColorPaletteManager is used to manage color palettes.
Method Summary | |
---|---|
ColorPalette |
createAndUseNewPalette(int nbColors)
Creates a new palette and sets it as current palette. |
java.util.Enumeration<java.lang.Object> |
getAllKeys()
Returns custom palette keys if defined. |
java.awt.Color |
getColor(java.lang.Object key)
Gets the color associated to key. |
static ColorPaletteManager |
getInstance()
Gets the single instance of ColorPaletteManager. |
java.util.Enumeration<java.lang.Object> |
getStandardKeys()
Gets keys of standard palette. |
void |
resetPalette()
Resets current palette to standard palette. |
void |
setCustomPalette(ColorPalette colorPalette)
Sets the custom palette. |
int |
size()
Returns the number of colors in current palette. |
boolean |
useCustomPalette()
Tells if using a custom palette. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static ColorPaletteManager getInstance()
public void resetPalette()
public boolean useCustomPalette()
public ColorPalette createAndUseNewPalette(int nbColors)
nbColors
- the number of colors to generate
public java.awt.Color getColor(java.lang.Object key)
key
- the key
public java.util.Enumeration<java.lang.Object> getAllKeys()
public java.util.Enumeration<java.lang.Object> getStandardKeys()
public int size()
public void setCustomPalette(ColorPalette colorPalette)
colorPalette
- the new custom palette
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |