|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.refractions.udig.ui.palette.ColourScheme
public class ColourScheme
A colour scheme remaps the colours in a palette.
| Constructor Summary | |
|---|---|
ColourScheme(BrewerPalette palette,
java.util.HashMap<java.lang.Integer,java.lang.Integer> colourMap,
java.util.HashMap<java.lang.String,java.lang.Integer> idMap,
int itemSize,
int paletteSize)
|
|
ColourScheme(BrewerPalette palette,
int itemSize)
|
|
ColourScheme(BrewerPalette palette,
int itemSize,
int paletteSize)
|
|
| Method Summary | |
|---|---|
java.awt.Color |
addItem()
|
void |
addItem(java.awt.Color color)
Add an item to the scheme, and modify the palette to contain this colour. |
java.awt.Color |
addItem(java.lang.String id)
|
boolean |
alignScheme(java.util.List<java.awt.Color> colours)
|
boolean |
equals(java.lang.Object other)
|
java.awt.Color[] |
getAllColours()
|
boolean |
getAutoSizing()
|
java.awt.Color |
getColour(int index)
|
java.util.HashMap<java.lang.Integer,java.lang.Integer> |
getColourMap()
|
BrewerPalette |
getColourPalette()
|
static ColourScheme |
getDefault(BrewerPalette palette)
|
java.util.HashMap<java.lang.String,java.lang.Integer> |
getIdMap()
|
int |
getMinColours()
|
java.awt.Color |
getNextAvailableColour(java.util.List<java.awt.Color> colours)
Returns the next available colour. |
int |
getSizePalette()
Gets the number of colours currently available in the palette. |
int |
getSizeScheme()
Gets the number of classes utilizing this scheme. |
int |
hashCode()
|
int |
indexOf(java.lang.String id)
|
boolean |
removeItem(int index)
|
boolean |
removeItem(java.lang.String id)
|
boolean |
removeItem(java.lang.String id,
java.awt.Color colour)
|
void |
setAutoSizing(boolean auto)
Sets the behaviour of the colour scheme as items are added. |
void |
setColourMap(java.util.HashMap<java.lang.Integer,java.lang.Integer> colourMap)
|
void |
setColourPalette(BrewerPalette palette)
|
void |
setSizePalette(int numColours)
Sets the number of colours to use from the current palette. |
void |
setSizeScheme(int numItems)
Set the number of items this scheme is used by. |
void |
swapColours(int firstIndex,
int secondIndex)
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ColourScheme(BrewerPalette palette,
int itemSize)
public ColourScheme(BrewerPalette palette,
int itemSize,
int paletteSize)
public ColourScheme(BrewerPalette palette,
java.util.HashMap<java.lang.Integer,java.lang.Integer> colourMap,
java.util.HashMap<java.lang.String,java.lang.Integer> idMap,
int itemSize,
int paletteSize)
| Method Detail |
|---|
public static ColourScheme getDefault(BrewerPalette palette)
public void setColourPalette(BrewerPalette palette)
public boolean getAutoSizing()
public void setAutoSizing(boolean auto)
auto - booleanpublic void setSizeScheme(int numItems)
numItems - the number of items obtaining colours from this schemepublic void setSizePalette(int numColours)
numColours - public int getMinColours()
public int getSizePalette()
public int getSizeScheme()
public boolean alignScheme(java.util.List<java.awt.Color> colours)
public java.awt.Color getNextAvailableColour(java.util.List<java.awt.Color> colours)
colours -
public java.awt.Color getColour(int index)
public java.awt.Color[] getAllColours()
public boolean equals(java.lang.Object other)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic BrewerPalette getColourPalette()
public java.util.HashMap<java.lang.Integer,java.lang.Integer> getColourMap()
public java.util.HashMap<java.lang.String,java.lang.Integer> getIdMap()
public void setColourMap(java.util.HashMap<java.lang.Integer,java.lang.Integer> colourMap)
public void swapColours(int firstIndex,
int secondIndex)
public java.awt.Color addItem()
public java.awt.Color addItem(java.lang.String id)
public void addItem(java.awt.Color color)
color - public int indexOf(java.lang.String id)
public boolean removeItem(java.lang.String id)
public boolean removeItem(java.lang.String id,
java.awt.Color colour)
public boolean removeItem(int index)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||