Package noaa.coastwatch.gui.visual
Class StrokeSwatch
java.lang.Object
noaa.coastwatch.gui.visual.StrokeSwatch
- All Implemented Interfaces:
Icon
The
StrokeSwatch class is an icon that shows a
rectangle of a given line pattern.- Since:
- 3.1.7
- Author:
- Peter Hollemans
-
Constructor Summary
ConstructorsConstructorDescriptionStrokeSwatch(Stroke stroke, int width, int height) Create a new stroke swatch. -
Method Summary
Modifier and TypeMethodDescriptionintGets the icon height.intGets the icon width.voidPaints the icon to the specified graphics context.voidSets the swatch stroke.
-
Constructor Details
-
StrokeSwatch
Create a new stroke swatch.- Parameters:
stroke- the stroke to display.width- the icon width.height- the icon height.
-
-
Method Details
-
getIconWidth
public int getIconWidth()Gets the icon width.- Specified by:
getIconWidthin interfaceIcon
-
getIconHeight
public int getIconHeight()Gets the icon height.- Specified by:
getIconHeightin interfaceIcon
-
paintIcon
Paints the icon to the specified graphics context. -
setStroke
Sets the swatch stroke.
-