jwo.utils.gui
Class HollowStroke

java.lang.Object
  extended by jwo.utils.gui.HollowStroke
All Implemented Interfaces:
Stroke

public class HollowStroke
extends Object
implements Stroke

A custom stroke that draws outlined linear features.

Version:
2.3, 17th January, 2007.
Author:
Jo Wood

Constructor Summary
HollowStroke(BasicStroke stroke, float outlineThickness)
          Draws the given stroke with a hollowed out interior of the given thickness.
HollowStroke(Stroke exteriorStroke, Stroke interiorStroke)
          Draws the given stroke with a hollowed out interior defined by the given stroke.
 
Method Summary
 Shape createStrokedShape(Shape shape)
          Generates a shape that is the outline of that supplied to this method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HollowStroke

public HollowStroke(BasicStroke stroke,
                    float outlineThickness)
Draws the given stroke with a hollowed out interior of the given thickness.

Parameters:
stroke - Stroke to draw
outlineThickness - Thickness in pixels of pen to draw along edge of stroke.

HollowStroke

public HollowStroke(Stroke exteriorStroke,
                    Stroke interiorStroke)
Draws the given stroke with a hollowed out interior defined by the given stroke.

Parameters:
exteriorStroke - Stroke representing the foreground of the line.
interiorStroke - Stroke representing the background (interior) of the line.
Method Detail

createStrokedShape

public Shape createStrokedShape(Shape shape)
Generates a shape that is the outline of that supplied to this method.

Specified by:
createStrokedShape in interface Stroke
Parameters:
shape - Shape of stroke to outline
Returns:
Outlined shape.


Copyright Jo Wood, 1996-2009, last modified, 17th April, 2009