edu.umd.cs.jazz.component
Interface ZStroke

All Superinterfaces:
ZAppearance
All Known Implementing Classes:
ZBasicVisualComponent

public interface ZStroke
extends ZAppearance

ZStroke represents the "stroke" attribute of a visual component. Any visual components that support a stroke should implement this interface. A stroke describes the rendering details of drawing a path - including details such as pen width, join style, cap style, and dashes.

Author:
Benjamin B. Bederson

Method Summary
 double getAbsPenWidth()
          Get the absolute width of the pen used to draw the visual component.
 double getPenWidth()
          Get the width of the pen used to draw the visual component.
 java.awt.Stroke getStroke()
          Get the stroke used to draw the visual component.
 void setAbsPenWidth(double width)
          Set the absolute width of the pen used to draw the visual component.
 void setPenWidth(double width)
          Set the width of the pen used to draw the visual component.
 void setStroke(java.awt.Stroke stroke)
          Set the stroke used to draw the visual component.
 

Method Detail

getPenWidth

public double getPenWidth()
Get the width of the pen used to draw the visual component. If the pen width is absolute (independent of magnification), then this returns 0.
Returns:
the pen width.
See Also:
getAbsPenWidth()

setPenWidth

public void setPenWidth(double width)
Set the width of the pen used to draw the visual component. If the pen width is set here, then the stroke is set to solid (un-dashed), with a "butt" cap style, and a "bevel" join style. The pen width will be dependent on the camera magnification.
Parameters:
width - the pen width.
See Also:
setAbsPenWidth(double)

getAbsPenWidth

public double getAbsPenWidth()
Get the absolute width of the pen used to draw the visual component. If the pen width is not absolute (dependent on magnification), then this returns 0.
Returns:
the pen width.
See Also:
getPenWidth()

setAbsPenWidth

public void setAbsPenWidth(double width)
Set the absolute width of the pen used to draw the visual component. If the pen width is set here, then the stroke is set to solid (un-dashed), with a "butt" cap style, and a "bevel" join style. The pen width will be independent on the camera magnification.
Parameters:
width - the pen width.
See Also:
setPenWidth(double)

getStroke

public java.awt.Stroke getStroke()
Get the stroke used to draw the visual component.
Returns:
the stroke.

setStroke

public void setStroke(java.awt.Stroke stroke)
Set the stroke used to draw the visual component.
Parameters:
stroke - the stroke.


Copyright © 2001 by University of Maryland, College Park, MD 20742, USA All rights reserved.