org.geotools.brewer.color
Class BrewerPalette

java.lang.Object
  extended byorg.geotools.brewer.color.ColorPalette
      extended byorg.geotools.brewer.color.BrewerPalette

public class BrewerPalette
extends ColorPalette

A ColorPalette with additional ColorBrewer information (suitability data and colour selection).

Author:
James Macgill, Cory Horner, Refractions Research Inc.

Constructor Summary
BrewerPalette()
          Creates a new instance of BrewerPalette
 
Method Summary
 java.awt.Color getColor(int index, int length)
           
 java.awt.Color[] getColors(int length)
          Obtains a set of colours from the palette.
 SampleScheme getColorScheme()
           
 int getMaxColors()
          Getter for the colour count
 int getMinColors()
          Getter for the colour count
 PaletteSuitability getPaletteSuitability()
           
 PaletteType getType()
          Getter for property type.
 void setColorScheme(SampleScheme scheme)
           
 void setPaletteSuitability(PaletteSuitability suitability)
           
 void setType(PaletteType type)
          Sets the type of palette.
 
Methods inherited from class org.geotools.brewer.color.ColorPalette
getColors, getCount, getDescription, getName, setColors, setDescription, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BrewerPalette

public BrewerPalette()
Creates a new instance of BrewerPalette

Method Detail

getType

public PaletteType getType()
Getter for property type.

Returns:
Value of property type.

setType

public void setType(PaletteType type)
Sets the type of palette.

Parameters:
type - new palette type

getColor

public java.awt.Color getColor(int index,
                               int length)

getMaxColors

public int getMaxColors()
Getter for the colour count

Returns:
the most colours this palette currently supports

getMinColors

public int getMinColors()
Getter for the colour count

Returns:
the minimum number of colours this palette currently supports

getColors

public java.awt.Color[] getColors(int length)
Obtains a set of colours from the palette.

Overrides:
getColors in class ColorPalette

getPaletteSuitability

public PaletteSuitability getPaletteSuitability()

setPaletteSuitability

public void setPaletteSuitability(PaletteSuitability suitability)

getColorScheme

public SampleScheme getColorScheme()

setColorScheme

public void setColorScheme(SampleScheme scheme)


Copyright © GeoTools. All Rights Reserved.