Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

edu.stanford.genetics.treeview
Interface ColorSetI  view ColorSetI download ColorSetI.java

All Known Implementing Classes:
ConfigColorSet

public interface ColorSetI

This is a general interface to color sets. This should be subclassed for particular color sets. Other classes, such as presets, which want to configure or get colors can do it through this interface in a general way. They can also down-cast if they need to. In general, the types should be constants within the subclass. See an existing example to get the idea.

Version:
@version $Revision: 1.2 $ $Date: 2003/06/22 10:19:15 $

Method Summary
 java.awt.Color getColor(int i)
          get the color corresponding to the i'th type.
 java.lang.String getName()
          get the name of the color set
 java.lang.String getType(int i)
          get the description of the i'th type
 java.lang.String[] getTypes()
          textual descriptions of the types of colors in this set
 void setColor(int i, java.awt.Color newColor)
          set the i'th color to something new.
 

Method Detail

getTypes

public java.lang.String[] getTypes()
textual descriptions of the types of colors in this set


getColor

public java.awt.Color getColor(int i)
get the color corresponding to the i'th type.


setColor

public void setColor(int i,
                     java.awt.Color newColor)
set the i'th color to something new.


getType

public java.lang.String getType(int i)
get the description of the i'th type


getName

public java.lang.String getName()
get the name of the color set