strokes
Class StrokeIcon
java.lang.Object
strokes.StrokeIcon
- All Implemented Interfaces:
- javax.swing.Icon
public class StrokeIcon
- extends java.lang.Object
- implements javax.swing.Icon
A javax.swing.Icon of a stroke.
It can be used e.g. to implement custom visual clues for strokes.
- Author:
- Caroline Appert
Constructor Summary |
StrokeIcon(int width,
int height,
java.awt.Color colorStroke,
int sizeStartingPoint,
java.awt.Color colorStartingPoint,
java.util.Vector<java.awt.geom.Point2D> stroke)
Builds a StrokeIcon . |
StrokeIcon(int width,
int height,
java.util.Vector<java.awt.geom.Point2D> stroke)
Builds a StrokeIcon . |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StrokeIcon
public StrokeIcon(int width,
int height,
java.awt.Color colorStroke,
int sizeStartingPoint,
java.awt.Color colorStartingPoint,
java.util.Vector<java.awt.geom.Point2D> stroke)
- Builds a
StrokeIcon
.
- Parameters:
width
- The width of the iconheight
- The height of the iconcolorStroke
- The color of the strokesizeStartingPoint
- The diameter of the starting pointcolorStartingPoint
- The color of the starting pointstroke
- The stroke
StrokeIcon
public StrokeIcon(int width,
int height,
java.util.Vector<java.awt.geom.Point2D> stroke)
- Builds a
StrokeIcon
. The stroke is drawn in black
with a red starting point of diameter 6.
- Parameters:
width
- The width of the iconheight
- The height of the iconstroke
- The stroke
getIconHeight
public int getIconHeight()
-
- Specified by:
getIconHeight
in interface javax.swing.Icon
getIconWidth
public int getIconWidth()
-
- Specified by:
getIconWidth
in interface javax.swing.Icon
paintIcon
public void paintIcon(java.awt.Component c,
java.awt.Graphics g,
int x,
int y)
-
- Specified by:
paintIcon
in interface javax.swing.Icon