javax.swing.Icon
public class ZoneIcon
extends java.lang.Object
implements javax.swing.Icon
Constructor | Description |
---|---|
ZoneIcon(java.awt.Dimension size,
java.awt.Rectangle[] rects,
int iHighlight) |
Constructor.
|
Modifier and Type | Method | Description |
---|---|---|
static javax.swing.Icon |
createZoneIcon(java.awt.Dimension size,
int border,
uk.ac.starlink.ttools.plot2.Gang gang,
int izone) |
Creates a zone icon from a gang.
|
int |
getIconHeight() |
|
int |
getIconWidth() |
|
void |
paintIcon(java.awt.Component c,
java.awt.Graphics g,
int x,
int y) |
public ZoneIcon(java.awt.Dimension size, java.awt.Rectangle[] rects, int iHighlight)
size
- icon sizerects
- zone rectanglesiHighlight
- index into rects
giving the one to
highlight (may be negative for no highlight)createZoneIcon(java.awt.Dimension, int, uk.ac.starlink.ttools.plot2.Gang, int)
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 x, int y)
paintIcon
in interface javax.swing.Icon
public static javax.swing.Icon createZoneIcon(java.awt.Dimension size, int border, uk.ac.starlink.ttools.plot2.Gang gang, int izone)
size
- total icon sizeborder
- empty border in pixels around all sidesgang
- gang defining zone positionsizone
- index of zone in gang to highlight
(may be null for no highlight)Copyright © 2003-2018 CCLRC: Council for the Central Laboratory of the Research Councils. All Rights Reserved.