Package noaa.coastwatch.gui.visual
Class SymbolSwatch
java.lang.Object
noaa.coastwatch.gui.visual.SymbolSwatch
- All Implemented Interfaces:
Icon
The
SymbolSwatch class is an icon that shows a
plot symbol.- Since:
- 3.2.3
- Author:
- Peter Hollemans
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final intThe size of the border around the icon.protected intThe icon size.protected jahuwaldt.plot.PlotSymbolThe swatch symbol. -
Constructor Summary
ConstructorsConstructorDescriptionSymbolSwatch(jahuwaldt.plot.PlotSymbol symbol, int size) Create a new symbol swatch. -
Method Summary
Modifier and TypeMethodDescriptionintGets the icon height.intGets the icon width.voidPaints the icon to the specified graphics context.voidsetSymbol(jahuwaldt.plot.PlotSymbol symbol) Sets the swatch symbol.
-
Field Details
-
BORDER_SIZE
protected static final int BORDER_SIZEThe size of the border around the icon.- See Also:
-
symbol
protected jahuwaldt.plot.PlotSymbol symbolThe swatch symbol. -
size
protected int sizeThe icon size.
-
-
Constructor Details
-
SymbolSwatch
public SymbolSwatch(jahuwaldt.plot.PlotSymbol symbol, int size) Create a new symbol swatch.- Parameters:
symbol- the symbol to display.size- the icon width and 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. -
setSymbol
public void setSymbol(jahuwaldt.plot.PlotSymbol symbol) Sets the swatch symbol.
-