|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.cosylab.gui.components.util.ColorManager
public class ColorManager
ColorManager provides a sequence of colors which can be used for example in charts.
Field Summary | |
---|---|
static java.awt.Color[] |
DEFAULT_COLORS
|
Constructor Summary | |
---|---|
ColorManager()
|
Method Summary | |
---|---|
void |
dropColor(java.awt.Color color)
Drops the color into a container with unused colors. |
int |
getColorIndex()
Returns the current index at which the color is picked from the array. |
void |
loadColors(java.awt.Color[] colors)
Loads the colors among which manager will pick a color when requested. |
void |
loadDefaultColors()
Loads Default colors as the colors used by this manager. |
java.awt.Color |
pickColor()
Picks the next color in the sequence. |
java.awt.Color |
previewNextColor()
Previews the next color that will be picked. |
void |
reset()
Empties the container with all dropped colors. |
void |
setColorIndex(int index)
Sets the index at which the next color will be picked from array. |
void |
setIndexByColor(java.awt.Color color)
Sets the color which will be the next to be picked out from the array. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.awt.Color[] DEFAULT_COLORS
Constructor Detail |
---|
public ColorManager()
Method Detail |
---|
public void loadDefaultColors()
public void loadColors(java.awt.Color[] colors)
colors
- color bank (null or zero-length value not permitted)public java.awt.Color pickColor()
public void dropColor(java.awt.Color color)
color
- color to be dropped into the bankpublic int getColorIndex()
public void setColorIndex(int index)
index
- new color indexpublic void setIndexByColor(java.awt.Color color)
color
- the next colorpublic void reset()
public java.awt.Color previewNextColor()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |