objectdraw
Interface DrawableStrokeInterface

All Known Implementing Classes:
AngLine, FramedArc, FramedOval, FramedRect, FramedRoundedRect, Line, Turtle

public interface DrawableStrokeInterface

DrawableStrokeInterface is the interface shared by all objects that consist of lines, instead of filled in areas. It contains method to change the line width, or to change the stroke of the line, giving it a different appearance at its corners and ends or causing it to be drawn in a dashed pattern.

Author:
Russell Zahniser (russell@zahniser.net)

Field Summary
static double CLICK_SIZE
          The distance a point may be from a line to still be considered contained in it.
static BasicStroke DEFAULT_STROKE
          The default stroke with which lines will be drawn - width 1, round cap and joints.
 
Method Summary
 double getLineWidth()
          Return the width of this object's lines.
 BasicStroke getStroke()
          Return the stroke used for this object's lines.
 void setLineWidth(double width)
          Set the width of this object's lines
 void setStroke(BasicStroke stroke)
          Set the stroke used for this object's lines
 

Field Detail

CLICK_SIZE

static final double CLICK_SIZE
The distance a point may be from a line to still be considered contained in it.

See Also:
Constant Field Values

DEFAULT_STROKE

static final BasicStroke DEFAULT_STROKE
The default stroke with which lines will be drawn - width 1, round cap and joints.

Method Detail

getLineWidth

double getLineWidth()
Return the width of this object's lines.

Returns:
the width of this object's lines

getStroke

BasicStroke getStroke()
Return the stroke used for this object's lines.

Returns:
the stroke used for this object's lines

setLineWidth

void setLineWidth(double width)
Set the width of this object's lines

Parameters:
width - the new width of this object's lines

setStroke

void setStroke(BasicStroke stroke)
Set the stroke used for this object's lines

Parameters:
stroke - the new stroke for this object's lines