gov.noaa.pmel.sgt.swing
Class PlotMarkIcon

java.lang.Object
  extended by gov.noaa.pmel.sgt.PlotMark
      extended by gov.noaa.pmel.sgt.swing.PlotMarkIcon
All Implemented Interfaces:
javax.swing.Icon

public class PlotMarkIcon
extends PlotMark
implements javax.swing.Icon

PlotMarkIcon extends PlotMark to create a icon than displays the sgt plot marks. The PlotMarkIcon can be used with buttons, e.g. selecting a plot mark for a line, or labels.

Since:
2.0
Version:
$Revision$, $Date$
Author:
Donald Denbo
See Also:
PlotMark, Icon

Field Summary
 
Fields inherited from class gov.noaa.pmel.sgt.PlotMark
circle_, fill_, fillMark_, firstPoint_, lastPoint_, mark_, markHeight_, markTable, table, tableSize_
 
Constructor Summary
PlotMarkIcon(int mark)
          Construct a PlotMarkIcon.
PlotMarkIcon(int mark, int size)
          Construct a PlotMarkIcon.
 
Method Summary
 int getIconHeight()
          Set the icon height
 int getIconWidth()
          Get the icon with
 int getSize()
          Get the size of the plot mark
 void paintIcon(java.awt.Component c, java.awt.Graphics g, int x, int y)
          Paint the icon at the specified location
 void setSize(int size)
          Set the size of the plot mark in device units.
 java.lang.String toString()
           
 
Methods inherited from class gov.noaa.pmel.sgt.PlotMark
getMark, getMarkHeightP, main, paintMark, setLineAttribute, setMark, setMarkHeightP, setPointAttribute
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PlotMarkIcon

public PlotMarkIcon(int mark,
                    int size)
Construct a PlotMarkIcon.

Parameters:
mark - the plot mark code
size - plot mark size in device units

PlotMarkIcon

public PlotMarkIcon(int mark)
Construct a PlotMarkIcon.

Parameters:
mark - the plot mark code
Method Detail

setSize

public void setSize(int size)
Set the size of the plot mark in device units.


getSize

public int getSize()
Get the size of the plot mark


paintIcon

public void paintIcon(java.awt.Component c,
                      java.awt.Graphics g,
                      int x,
                      int y)
Paint the icon at the specified location

Specified by:
paintIcon in interface javax.swing.Icon

getIconWidth

public int getIconWidth()
Get the icon with

Specified by:
getIconWidth in interface javax.swing.Icon

getIconHeight

public int getIconHeight()
Set the icon height

Specified by:
getIconHeight in interface javax.swing.Icon

toString

public java.lang.String toString()
Overrides:
toString in class PlotMark