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 TypeMethodDescriptionbooleanReturns the background colour of this legend.Returns this legend's captioner.intintbooleanIndicates whether this legend has a border.inthashCode()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:
getIconWidthin interfaceIcon
-
getIconHeight
public int getIconHeight()- Specified by:
getIconHeightin interfaceIcon
-
paintIcon
-
equals
-
hashCode
public int hashCode()
-