uk.ac.starlink.ttools.plot2
Class LegendEntry

java.lang.Object
  extended by uk.ac.starlink.ttools.plot2.LegendEntry

@Equality
public class LegendEntry
extends Object

Aggregates a plot style or group of styles and a label to be paired together as one entry in a plot legend.

Since:
13 Feb 2013
Author:
Mark Taylor

Constructor Summary
LegendEntry(String label, Style style)
          Constructs a legend entry for a single style.
LegendEntry(String label, Style[] styles)
          Constructs a legend entry for a group of styles.
 
Method Summary
 boolean equals(Object o)
           
 Icon getIcon()
          Returns the icon associated with this entry.
 String getLabel()
          Returns the text label associated with this entry.
 int hashCode()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LegendEntry

public LegendEntry(String label,
                   Style[] styles)
Constructs a legend entry for a group of styles. This would typically be used where the same data set is represented by several different layers in a plot.

Parameters:
label - dataset label
styles - dataset styles

LegendEntry

public LegendEntry(String label,
                   Style style)
Constructs a legend entry for a single style.

Parameters:
style - dataset style
label - dataset label
Method Detail

getIcon

public Icon getIcon()
Returns the icon associated with this entry.

Returns:
icon

getLabel

public String getLabel()
Returns the text label associated with this entry.

Returns:
label

equals

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

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2015 Central Laboratory of the Research Councils. All Rights Reserved.