| java.lang.Object net.refractions.udig.ui.palette.ColourScheme
ColourScheme | public class ColourScheme (Code) | | A colour scheme remaps the colours in a palette.
author: ptozer author: chorner |
ColourScheme | public ColourScheme(BrewerPalette palette, int itemSize)(Code) | | |
ColourScheme | public ColourScheme(BrewerPalette palette, int itemSize, int paletteSize)(Code) | | |
addItem | public void addItem(Color color)(Code) | | Add an item to the scheme, and modify the palette to contain this colour.
Parameters: color - |
getAllColours | public Color[] getAllColours()(Code) | | Returns all the available colours, without duplicates. |
getAutoSizing | public boolean getAutoSizing()(Code) | | |
getColourPalette | public BrewerPalette getColourPalette()(Code) | | |
getMinColours | public int getMinColours()(Code) | | |
getNextAvailableColour | public Color getNextAvailableColour(List<Color> colours)(Code) | | Returns the next available colour. Good for comparing reality to what we think we have.
Parameters: colours - |
getSizePalette | public int getSizePalette()(Code) | | Gets the number of colours currently available in the palette.
|
getSizeScheme | public int getSizeScheme()(Code) | | Gets the number of classes utilizing this scheme.
|
hashCode | public int hashCode()(Code) | | |
removeItem | public boolean removeItem(int index)(Code) | | |
setAutoSizing | public void setAutoSizing(boolean auto)(Code) | | Sets the behaviour of the colour scheme as items are added. If true, the palette will morph
in size as items are added or removed. If false, the palette will remain static and scheme
colours will be repeated even if some are unused.
Parameters: auto - boolean |
setColourPalette | public void setColourPalette(BrewerPalette palette)(Code) | | |
setSizePalette | public void setSizePalette(int numColours)(Code) | | Sets the number of colours to use from the current palette. This method checks to ensure the
number of colours does not exceed the size of the palette.
Parameters: numColours - |
setSizeScheme | public void setSizeScheme(int numItems)(Code) | | Set the number of items this scheme is used by. The size of the palette is automatically adjusted to fit.
Parameters: numItems - the number of items obtaining colours from this scheme |
swapColours | public void swapColours(int firstIndex, int secondIndex)(Code) | | |
|
|