|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectColorBrewer
public class ColorBrewer
Contains ColorBrewer palettes and suitability data.
modules/extension/brewer (gt-brewer.jar)
Field Summary | |
---|---|
static PaletteType |
ALL
|
static PaletteType |
DIVERGING
|
static PaletteType |
QUALITATIVE
|
static PaletteType |
SEQUENTIAL
|
static PaletteType |
SUITABLE_RANGED
|
static PaletteType |
SUITABLE_UNIQUE
|
Constructor Summary | |
---|---|
ColorBrewer()
Creates a new instance of ColorBrewer |
Method Summary | |
---|---|
String |
getDescription()
|
String |
getName()
|
BrewerPalette |
getPalette(String name)
|
String[] |
getPaletteNames()
Generates a String array with the names of the palettes in the ColorBrewer instance. |
String[] |
getPaletteNames(int minClasses,
int maxClasses)
Generates an array of palette names for palettes which have at least x classes and at most y classes. |
BrewerPalette[] |
getPalettes()
|
BrewerPalette[] |
getPalettes(PaletteType type)
|
BrewerPalette[] |
getPalettes(PaletteType type,
int numClasses)
|
BrewerPalette[] |
getPalettes(PaletteType type,
int numClasses,
int requiredViewers)
|
boolean |
hasPalette(String paletteName)
Returns true if the palette exists in this ColorBrewer |
static ColorBrewer |
instance()
Creates a static instance of ColorBrewer containing all default palettes |
static ColorBrewer |
instance(PaletteType type)
Creates a static instance of ColorBrewer containing a subset of the default palettes. |
boolean |
isSet(int singleValue,
int multipleValue)
|
void |
loadPalettes()
Loads the default ColorBrewer palettes. |
void |
loadPalettes(InputStream XMLinput,
PaletteType type)
Loads into the ColorBrewer instance the set of palettes matching the given parameters. |
void |
loadPalettes(PaletteType type)
Loads into the ColorBrewer instance the set of palettes which have the PaletteType matching that of the parameter. |
void |
registerPalette(BrewerPalette pal)
|
void |
reset()
|
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final PaletteType ALL
public static final PaletteType SUITABLE_RANGED
public static final PaletteType SUITABLE_UNIQUE
public static final PaletteType SEQUENTIAL
public static final PaletteType DIVERGING
public static final PaletteType QUALITATIVE
Constructor Detail |
---|
public ColorBrewer()
Method Detail |
---|
public static ColorBrewer instance()
IOException
public static ColorBrewer instance(PaletteType type) throws IOException
type
- A PaletteType object which will be used to configure the
returned ColorBrewer.
IOException
public void registerPalette(BrewerPalette pal)
public boolean hasPalette(String paletteName)
paletteName
- A String with the name of the palette
public BrewerPalette[] getPalettes()
public BrewerPalette[] getPalettes(PaletteType type)
public BrewerPalette[] getPalettes(PaletteType type, int numClasses)
public BrewerPalette[] getPalettes(PaletteType type, int numClasses, int requiredViewers)
public String[] getPaletteNames()
public String[] getPaletteNames(int minClasses, int maxClasses)
minClasses
- xmaxClasses
- y
public BrewerPalette getPalette(String name)
public void loadPalettes()
IOException
public void loadPalettes(PaletteType type)
type
- The PaletteType for the palettes to load.
IOException
public void loadPalettes(InputStream XMLinput, PaletteType type)
XMLinput
- type
- identifier for palettes. use "new PaletteType();"public String getName()
public String getDescription()
public void reset()
public boolean isSet(int singleValue, int multipleValue)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |