JHotDraw 7.0.9

org.jhotdraw.draw
Interface LineDecoration

All Superinterfaces:
java.lang.Cloneable, java.io.Serializable
All Known Implementing Classes:
AbstractLineDecoration, ArrowTip, GeneralPathTip

public interface LineDecoration
extends java.lang.Cloneable, java.io.Serializable

Decorate the start or end Point2D.Double of a line or poly line figure. LineDecoration is the base class for the different line decorations.

Version:
2.1 2007-05-20 Renamed getDrawBounds to getDrawingArea.
2.0 2006-01-14 Changed to support double precison coordinates.
1.0 2003-12-01 Derived from JHotDraw 5.4b1.
Author:
Werner Randelshofer

Method Summary
 void draw(java.awt.Graphics2D g, Figure f, java.awt.geom.Point2D.Double p1, java.awt.geom.Point2D.Double p2)
          Draws the decoration in the direction specified by the two Points.
 double getDecorationRadius(Figure f)
          Returns the radius of the decorator.
 java.awt.geom.Rectangle2D.Double getDrawingArea(Figure f, java.awt.geom.Point2D.Double p1, java.awt.geom.Point2D.Double p2)
          Returns the drawing bounds of the decorator.
 

Method Detail

draw

void draw(java.awt.Graphics2D g,
          Figure f,
          java.awt.geom.Point2D.Double p1,
          java.awt.geom.Point2D.Double p2)
Draws the decoration in the direction specified by the two Points.


getDecorationRadius

double getDecorationRadius(Figure f)
Returns the radius of the decorator. This is used to crop the end of the line, to prevent it from being drawn it over the decorator.


getDrawingArea

java.awt.geom.Rectangle2D.Double getDrawingArea(Figure f,
                                                java.awt.geom.Point2D.Double p1,
                                                java.awt.geom.Point2D.Double p2)
Returns the drawing bounds of the decorator.


Copyright 1996-2007 (c) JHotDraw.org.
Some rights reserved.