2.17.2: 2011-06-17

net.sf.basedb.clients.web.servlet
Class ExperimentExplorerPlotServlet.ColumnKey

java.lang.Object
  extended by net.sf.basedb.clients.web.servlet.ExperimentExplorerPlotServlet.ColumnKey
All Implemented Interfaces:
Comparable<ExperimentExplorerPlotServlet.ColumnKey>
Enclosing class:
ExperimentExplorerPlotServlet

public static class ExperimentExplorerPlotServlet.ColumnKey
extends Object
implements Comparable<ExperimentExplorerPlotServlet.ColumnKey>

Uses as a column key in the plots. This allows us to separate the displayed label from the identity of the column. Eg. there is no need to make sure that the label strings are unique since we can use some internal id for this purpose.

Additionally, this class allows us to map annotations to colors that are used to draw small colored boxes below each column label.


Field Summary
private  Map<String,Color> annotations
           
private  Comparable id
           
private  String title
           
 
Constructor Summary
ExperimentExplorerPlotServlet.ColumnKey(Comparable id, String title)
           
 
Method Summary
 int compareTo(ExperimentExplorerPlotServlet.ColumnKey o)
          The ID of the key determines equality.
 boolean equals(Object o)
           
 Color getColor(String annotation)
           
 int hashCode()
           
 void setColor(String annotation, Color color)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

id

private final Comparable id

title

private final String title

annotations

private final Map<String,Color> annotations
Constructor Detail

ExperimentExplorerPlotServlet.ColumnKey

public ExperimentExplorerPlotServlet.ColumnKey(Comparable id,
                                               String title)
Method Detail

compareTo

public int compareTo(ExperimentExplorerPlotServlet.ColumnKey o)
The ID of the key determines equality.

Specified by:
compareTo in interface Comparable<ExperimentExplorerPlotServlet.ColumnKey>

toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

setColor

public void setColor(String annotation,
                     Color color)

getColor

public Color getColor(String annotation)

2.17.2: 2011-06-17