net.sf.basedb.clients.web.servlet
Class ExperimentExplorerPlotServlet.ColumnKey
java.lang.Object
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.
id
private final Comparable id
title
private final String title
annotations
private final Map<String,Color> annotations
ExperimentExplorerPlotServlet.ColumnKey
public ExperimentExplorerPlotServlet.ColumnKey(Comparable id,
String title)
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)