Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.ka2ddo.yaac.gui.drawlayer
Class StrokeIcon

    java.lang.Object
      org.ka2ddo.yaac.gui.drawlayer.StrokeIcon

All Implemented Interfaces:
  javax.swing.Icon

    public class StrokeIcon

extends java.lang.Object
implements javax.swing.Icon

Constructor Summary
`StrokeIcon(java.awt.BasicStroke stroke, java.lang.String strokeType)` Create a StrokeIcon object.

Method Summary
`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.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### StrokeIcon

    public StrokeIcon(java.awt.BasicStroke stroke,
                      java.lang.String strokeType)

  Create a StrokeIcon object.

  Parameters:
    `stroke` - the BasicStroke to draw for this icon
    `strokeType` - the String name of the stroke type

Method Detail

### getIconHeight

    public int getIconHeight()

  Returns the icon's height.

  Specified by:
    `getIconHeight` in interface `javax.swing.Icon`
  Returns:
    an int specifying the fixed height of the icon.

### paintIcon

    public void paintIcon(java.awt.Component c,
                          java.awt.Graphics g,
                          int x,
                          int y)

  Draw the icon at the specified location. Icon implementations may use the Component argument to get properties useful for painting, e.g. the foreground or background color.

  Specified by:
    `paintIcon` in interface `javax.swing.Icon`

### getIconWidth

    public int getIconWidth()

  Returns the icon's width.

  Specified by:
    `getIconWidth` in interface `javax.swing.Icon`
  Returns:
    an int specifying the fixed width of the icon.

### getStroke

    public java.awt.BasicStroke getStroke()

  Get the stroke associated with this icon.

  Returns:
    BasicStroke object

### getStrokeType

    public java.lang.String getStrokeType()

  Get the name of this generic stroke type.

  Returns:
    String stroke type name

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD