|
JHotDraw 7.6 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jhotdraw.draw.decoration.CompositeLineDecoration
public class CompositeLineDecoration
A LineDecoration
which can compose multiple individual line
decorations.
An composite implementation of a line decoration. It allows more than one line decoration shape to be rotated and moved to the end of the line. The shape is scaled by the stroke width.
Constructor Summary | |
---|---|
CompositeLineDecoration()
Constructs a composite line decoration with no decorations. |
|
CompositeLineDecoration(LineDecoration decoration1,
LineDecoration decoration2)
Constructs a composite line decoration with the two supplied decorations. |
Method Summary | |
---|---|
void |
addDecoration(LineDecoration decoration)
Add another line decoration into the composite line decoration. |
void |
draw(java.awt.Graphics2D g,
Figure f,
java.awt.geom.Point2D.Double p1,
java.awt.geom.Point2D.Double p2)
Draws the arrow tip in the direction specified by the given 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 area of the decorator. |
void |
read(DOMInput in)
|
void |
write(DOMOutput out)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CompositeLineDecoration()
public CompositeLineDecoration(LineDecoration decoration1, LineDecoration decoration2)
Method Detail |
---|
public void addDecoration(LineDecoration decoration)
public void draw(java.awt.Graphics2D g, Figure f, java.awt.geom.Point2D.Double p1, java.awt.geom.Point2D.Double p2)
draw
in interface LineDecoration
public java.awt.geom.Rectangle2D.Double getDrawingArea(Figure f, java.awt.geom.Point2D.Double p1, java.awt.geom.Point2D.Double p2)
getDrawingArea
in interface LineDecoration
public double getDecorationRadius(Figure f)
getDecorationRadius
in interface LineDecoration
public void read(DOMInput in) throws java.io.IOException
read
in interface DOMStorable
java.io.IOException
public void write(DOMOutput out) throws java.io.IOException
write
in interface DOMStorable
java.io.IOException
|
Copyright 1996-2010 (c) by the authors and contributors of the JHotDraw project. Some rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |