JHotDraw 6.0b1

Class LineFigure

  extended by org.jhotdraw.standard.AbstractFigure
      extended by org.jhotdraw.figures.PolyLineFigure
          extended by org.jhotdraw.figures.LineFigure
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, Figure, Storable

public class LineFigure
extends PolyLineFigure

A line figure.

See Also:
Serialized Form

Field Summary
Fields inherited from class org.jhotdraw.figures.PolyLineFigure
ARROW_TIP_BOTH, ARROW_TIP_END, ARROW_TIP_NONE, ARROW_TIP_START, fEndDecoration, fFrameColor, fPoints, fStartDecoration
Constructor Summary
          Constructs a LineFigure with both start and end set to Point(0,0).
Method Summary
 void basicDisplayBox(java.awt.Point origin, java.awt.Point corner)
          Sets the display box of a figure.
 java.awt.Point endPoint()
          Gets a copy of the end point.
 void endPoint(int x, int y)
          Sets the end point.
 void setPoints(java.awt.Point start, java.awt.Point end)
          Sets the start and end point.
 java.awt.Point startPoint()
          Gets a copy of the start point.
 void startPoint(int x, int y)
          Sets the start point.
Methods inherited from class org.jhotdraw.figures.PolyLineFigure
addPoint, basicMoveBy, connectorAt, containsPoint, displayBox, draw, drawLine, findSegment, getAttribute, getAttribute, getEndDecoration, getFrameColor, getStartDecoration, handles, insertPointAt, invalidateRectangle, isEmpty, joinSegments, locator, pointAt, pointCount, points, read, removePointAt, setAttribute, setAttribute, setEndDecoration, setFrameColor, setPointAt, setStartDecoration, splitSegment, write
Methods inherited from class org.jhotdraw.standard.AbstractFigure
addDependendFigure, addFigureChangeListener, addToContainer, canConnect, center, changed, clone, connectedTextLocator, connectionInsets, connectorVisibility, decompose, displayBox, displayBox, figures, findFigureInside, getDecoratedFigure, getDependendFigures, getTextHolder, getZValue, includes, invalidate, listener, moveBy, release, removeDependendFigure, removeFigureChangeListener, removeFromContainer, setZValue, size, visit, willChange
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public LineFigure()
Constructs a LineFigure with both start and end set to Point(0,0).

Method Detail


public java.awt.Point startPoint()
Gets a copy of the start point.


public java.awt.Point endPoint()
Gets a copy of the end point.


public void startPoint(int x,
                       int y)
Sets the start point.


public void endPoint(int x,
                     int y)
Sets the end point.


public void setPoints(java.awt.Point start,
                      java.awt.Point end)
Sets the start and end point.


public void basicDisplayBox(java.awt.Point origin,
                            java.awt.Point corner)
Description copied from class: AbstractFigure
Sets the display box of a figure. This is the method that subclassers override. Clients usually call displayBox.

Specified by:
basicDisplayBox in interface Figure
basicDisplayBox in class PolyLineFigure
origin - the new origin
corner - the new corner
See Also:
AbstractFigure.displayBox(java.awt.Point, java.awt.Point)

JHotDraw 6.0b1