Package uk.ac.starlink.topcat.plot2
Class ZoneIcon
java.lang.Object
uk.ac.starlink.topcat.plot2.ZoneIcon
- All Implemented Interfaces:
Icon
Icon that displays the position of a Zone within a Gang.
This is supposed to be suitable for inclusion into a GUI component
like a combo box renderer.
- Since:
- 12 Feb 2016
- Author:
- Mark Taylor
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic IconcreateZoneIcon(Dimension size, int border, uk.ac.starlink.ttools.plot2.Gang gang, int izone) Creates a zone icon from a gang.intintvoid
-
Constructor Details
-
ZoneIcon
Constructor.- Parameters:
size- icon sizerects- zone rectanglesiHighlight- index intorectsgiving the one to highlight (may be negative for no highlight)- See Also:
-
-
Method Details
-
getIconWidth
public int getIconWidth()- Specified by:
getIconWidthin interfaceIcon
-
getIconHeight
public int getIconHeight()- Specified by:
getIconHeightin interfaceIcon
-
paintIcon
-
createZoneIcon
public static Icon createZoneIcon(Dimension size, int border, uk.ac.starlink.ttools.plot2.Gang gang, int izone) Creates a zone icon from a gang.- Parameters:
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)- Returns:
- icon
-