de.lmu.ifi.dbs.elki.visualization.colors
Class ListBasedColorLibrary

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.visualization.colors.ListBasedColorLibrary
All Implemented Interfaces:
ColorLibrary

public class ListBasedColorLibrary
extends Object
implements ColorLibrary

Color library using the color names from a list.


Field Summary
private  String[] colors
          Array of color names.
private  String name
          Color scheme name
 
Fields inherited from interface de.lmu.ifi.dbs.elki.visualization.colors.ColorLibrary
COLOR_AXIS_LABEL, COLOR_AXIS_LINE, COLOR_AXIS_MINOR_TICK, COLOR_AXIS_TICK, COLOR_KEY_BACKGROUND, COLOR_KEY_LABEL, COLOR_LINE_COLORS, COLOR_PAGE_BACKGROUND, COLOR_PLOT_BACKGROUND
 
Constructor Summary
ListBasedColorLibrary(String[] colors, String name)
          Constructor without a properties file name.
 
Method Summary
 String getColor(int index)
          Return the i'th color.
protected  String getName()
          Get the color scheme name.
 int getNumberOfNativeColors()
          Return the number of native colors available.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

colors

private String[] colors
Array of color names.


name

private String name
Color scheme name

Constructor Detail

ListBasedColorLibrary

public ListBasedColorLibrary(String[] colors,
                             String name)
Constructor without a properties file name.

Parameters:
colors - Colors
name - Library name
Method Detail

getColor

public String getColor(int index)
Description copied from interface: ColorLibrary
Return the i'th color.

Specified by:
getColor in interface ColorLibrary
Parameters:
index - color index
Returns:
color in hexadecimal notation (#aabbcc) or color name ("red") as valid in CSS and SVG.

getNumberOfNativeColors

public int getNumberOfNativeColors()
Description copied from interface: ColorLibrary
Return the number of native colors available. These are guaranteed to be unique.

Specified by:
getNumberOfNativeColors in interface ColorLibrary
Returns:
number of native colors

getName

protected String getName()
Get the color scheme name.

Returns:
the name

Release 0.4.0 (2011-09-20_1324)