Package uk.ac.starlink.ttools.plot2
Class LegendIcon
java.lang.Object
uk.ac.starlink.ttools.plot2.LegendIcon
- All Implemented Interfaces:
Icon
Icon containing legend information for a plot.
- Since:
- 13 Feb 2013
- Author:
- Mark Taylor
-
Constructor Summary
ConstructorsConstructorDescriptionLegendIcon
(LegendEntry[] entries, Captioner captioner, boolean border, Color bgColor) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns the background colour of this legend.Returns this legend's captioner.int
int
boolean
Indicates whether this legend has a border.int
hashCode()
void
-
Constructor Details
-
LegendIcon
Constructor.- Parameters:
entries
- items to display in legendcaptioner
- text rendererborder
- true to draw a line border around the legendbgColor
- opaque background colour, null for transparent
-
-
Method Details
-
getCaptioner
Returns this legend's captioner.- Returns:
- captioner
-
hasBorder
public boolean hasBorder()Indicates whether this legend has a border.- Returns:
- true for border, false for not
-
getBackground
Returns the background colour of this legend.- Returns:
- background colour
-
getIconWidth
public int getIconWidth()- Specified by:
getIconWidth
in interfaceIcon
-
getIconHeight
public int getIconHeight()- Specified by:
getIconHeight
in interfaceIcon
-
paintIcon
-
equals
-
hashCode
public int hashCode()
-