public class StrokeIcon
extends java.lang.Object
implements javax.swing.Icon
BasicStroke
style of line.Constructor and Description |
---|
StrokeIcon(java.awt.BasicStroke stroke,
java.lang.String strokeType)
Create a StrokeIcon object.
|
Modifier and Type | Method and Description |
---|---|
int |
getIconHeight()
Returns the icon's height.
|
int |
getIconWidth()
Returns the icon's width.
|
java.awt.BasicStroke |
getStroke()
Get the stroke associated with this icon.
|
java.lang.String |
getStrokeType()
Get the name of this generic stroke type.
|
void |
paintIcon(java.awt.Component c,
java.awt.Graphics g,
int x,
int y)
Draw the icon at the specified location.
|
public StrokeIcon(java.awt.BasicStroke stroke, java.lang.String strokeType)
stroke
- the BasicStroke to draw for this iconstrokeType
- the String name of the stroke typepublic int getIconHeight()
getIconHeight
in interface javax.swing.Icon
public void paintIcon(java.awt.Component c, java.awt.Graphics g, int x, int y)
paintIcon
in interface javax.swing.Icon
public int getIconWidth()
getIconWidth
in interface javax.swing.Icon
public java.awt.BasicStroke getStroke()
public java.lang.String getStrokeType()