JHotDraw 7.0.6

org.jhotdraw.draw
Class LineFigure

java.lang.Object
  extended by org.jhotdraw.draw.AbstractFigure
      extended by org.jhotdraw.draw.AttributedFigure
          extended by org.jhotdraw.draw.BezierFigure
              extended by org.jhotdraw.draw.LineFigure
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, Figure, DOMStorable
Direct Known Subclasses:
LineConnectionFigure, SeparatorLineFigure, SVGLine

public class LineFigure
extends BezierFigure

LineFigure.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.jhotdraw.draw.BezierFigure
CLOSED, path
 
Fields inherited from class org.jhotdraw.draw.AbstractFigure
changingDepth, decorator, listenerList
 
Constructor Summary
LineFigure()
          Creates a new instance.
 
Method Summary
 boolean canConnect()
          Checks if this figure can be connected.
 java.util.Collection<Handle> createHandles(int detailLevel)
          Creates handles used to manipulate the figure.
 boolean handleMouseClick(java.awt.geom.Point2D.Double p, java.awt.event.MouseEvent evt, DrawingView view)
          Handles a mouse click.
 
Methods inherited from class org.jhotdraw.draw.BezierFigure
addNode, addNode, basicAddNode, basicAddNode, basicJoinSegments, basicJoinSegments, basicRemoveAllNodes, basicRemoveNode, basicSetAttribute, basicSetBezierPath, basicSetBounds, basicSetEndPoint, basicSetNode, basicSetPoint, basicSetPoint, basicSetStartPoint, basicSplitSegment, basicSplitSegment, basicTransform, chop, clone, contains, drawCaps, drawFill, drawStroke, findCompatibleConnector, findConnector, findNode, findSegment, getBezierPath, getBounds, getCappedPath, getCenter, getEndPoint, getFigureDrawBounds, getNode, getNodeCount, getOutermostPoint, getPoint, getPoint, getPointCount, getPointOnPath, getRestoreData, getStartPoint, invalidate, invalidateCappedPath, isClosed, layout, read, readPoints, removeAllNodes, removeNode, restoreTo, setClosed, setNode, setPoint, validate, write, writePoints
 
Methods inherited from class org.jhotdraw.draw.AttributedFigure
applyAttributesTo, drawConnectors, drawFigure, drawText, getAttribute, getAttributeKey, getAttributes, getStroke, getStrokeMiterLimitFactor, hasAttribute, isAttributeEnabled, readAttributes, removeAttribute, setAttribute, setAttributeEnabled, setAttributes, writeAttributes
 
Methods inherited from class org.jhotdraw.draw.AbstractFigure
addFigureListener, addNotify, addUndoableEditListener, basicClone, changed, draw, drawDecorator, findFigureInside, fireAreaInvalidated, fireAreaInvalidated, fireAttributeChanged, fireFigureAdded, fireFigureChanged, fireFigureChanged, fireFigureChanged, fireFigureRemoved, fireFigureRequestRemove, fireUndoableEditHappened, getActions, getChangingDepth, getCourtingConnection, getCursor, getDecomposition, getDecorator, getDrawBounds, getDrawing, getFontRenderContext, getLayer, getLock, getPreferredSize, getTool, getTooltip, handleDrop, includes, isChanging, isConnectorsVisible, isDrawDecoratorFirst, isInteractive, isVisible, remap, remap, removeFigureListener, removeNotify, removeUndoableEditListener, requestRemove, setBounds, setBounds, setConnectorsVisible, setDecorator, setDrawDecoratorFirst, setInteractive, setVisible, toString, transform, updateDecoratorBounds, willChange
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LineFigure

public LineFigure()
Creates a new instance.

Method Detail

createHandles

public java.util.Collection<Handle> createHandles(int detailLevel)
Description copied from interface: Figure
Creates handles used to manipulate the figure.

Specified by:
createHandles in interface Figure
Overrides:
createHandles in class BezierFigure
Parameters:
detailLevel - The detail level of the handles. Usually this is 0 for bounding box handles and 1 for point handles.
Returns:
a Collection of handles
See Also:
Handle

canConnect

public boolean canConnect()
Description copied from class: BezierFigure
Checks if this figure can be connected. By default filled BezierFigures can be connected.

Specified by:
canConnect in interface Figure
Overrides:
canConnect in class BezierFigure

handleMouseClick

public boolean handleMouseClick(java.awt.geom.Point2D.Double p,
                                java.awt.event.MouseEvent evt,
                                DrawingView view)
Handles a mouse click.

Specified by:
handleMouseClick in interface Figure
Overrides:
handleMouseClick in class BezierFigure
Parameters:
p - The location of the mouse event.
evt - The mouse event.
view - The drawing view which is the source of the mouse event.
Returns:
Returns true, if the figure consumed the mouse click.

Copyright 1996-2006 © JHotDraw.org