@Equality public class LegendIcon extends java.lang.Object implements javax.swing.Icon
Constructor and Description |
---|
LegendIcon(LegendEntry[] entries,
Captioner captioner,
boolean border,
java.awt.Color bgColor)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
java.awt.Color |
getBackground()
Returns the background colour of this legend.
|
Captioner |
getCaptioner()
Returns this legend's captioner.
|
int |
getIconHeight() |
int |
getIconWidth() |
boolean |
hasBorder()
Indicates whether this legend has a border.
|
int |
hashCode() |
void |
paintIcon(java.awt.Component c,
java.awt.Graphics g,
int x0,
int y0) |
public LegendIcon(LegendEntry[] entries, Captioner captioner, boolean border, java.awt.Color bgColor)
entries
- items to display in legendcaptioner
- text rendererborder
- true to draw a line border around the legendbgColor
- opaque background colour, null for transparentpublic Captioner getCaptioner()
public boolean hasBorder()
public java.awt.Color getBackground()
public int getIconWidth()
getIconWidth
in interface javax.swing.Icon
public int getIconHeight()
getIconHeight
in interface javax.swing.Icon
public void paintIcon(java.awt.Component c, java.awt.Graphics g, int x0, int y0)
paintIcon
in interface javax.swing.Icon
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
Copyright © 2017 Central Laboratory of the Research Councils. All Rights Reserved.