org.jhotdraw.draw
Class LineFigure
- java.lang.Object
-
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, Figure, DOMStorable
- Direct Known Subclasses:
- LineConnectionFigure
public class LineFigure extends BezierFigure
AFigurewhich draws a continuous bezier path between two points.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from interface org.jhotdraw.draw.Figure
CONNECTABLE_PROPERTY, REMOVABLE_PROPERTY, SELECTABLE_PROPERTY, TRANSFORMABLE_PROPERTY
-
-
Constructor Summary
Constructors Constructor and Description LineFigure()Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description java.util.Collection<Handle>createHandles(int detailLevel)Creates handles used to manipulate the figure.booleanhandleMouseClick(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, chop, clone, contains, findCompatibleConnector, findConnector, findNode, findSegment, getBezierPath, getBounds, getCenter, getDrawingArea, getEndPoint, getNode, getNodeCount, getOutermostPoint, getPoint, getPoint, getPointOnPath, getStartPoint, getTransformRestoreData, invalidate, isClosed, joinSegments, joinSegments, layout, read, removeNode, restoreTransformTo, set, setBezierPath, setBounds, setClosed, setEndPoint, setNode, setPoint, setPoint, setStartPoint, splitSegment, splitSegment, transform, write
-
Methods inherited from class org.jhotdraw.draw.AbstractAttributedFigure
draw, get, getAttributes, getAttributesRestoreData, getStroke, getStrokeMiterLimitFactor, hasAttribute, isAttributeEnabled, removeAttribute, restoreAttributesTo, setAttributeEnabled, setAttributes
-
Methods inherited from class org.jhotdraw.draw.AbstractFigure
addFigureListener, addNotify, changed, findFigureInside, fireAreaInvalidated, fireFigureChanged, getActions, getConnectors, getCursor, getDecomposition, getLayer, getPreferredSize, getTool, getToolTipText, handleDrop, includes, isConnectable, isRemovable, isSelectable, isTransformable, isVisible, remap, removeFigureListener, removeNotify, requestRemove, setBounds, setConnectable, setRemovable, setSelectable, setTransformable, setVisible, toString, willChange
-
Methods inherited from class org.jhotdraw.beans.AbstractBean
addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.jhotdraw.draw.Figure
addPropertyChangeListener, removePropertyChangeListener
-
-
-
-
Method Detail
-
createHandles
public java.util.Collection<Handle> createHandles(int detailLevel)
Description copied from interface:FigureCreates handles used to manipulate the figure.- Specified by:
createHandlesin interfaceFigure- Overrides:
createHandlesin classBezierFigure- Parameters:
detailLevel- The detail level of the handles. Usually this is 0 for bounding box handles and 1 for point handles. The value -1 is used by the SelectAreaTracker and the HandleTracker to highlight figures, over which the mouse pointer is hovering.- Returns:
- a Collection of handles
- See Also:
Handle
-
handleMouseClick
public boolean handleMouseClick(java.awt.geom.Point2D.Double p, java.awt.event.MouseEvent evt, DrawingView view)Handles a mouse click.- Specified by:
handleMouseClickin interfaceFigure- Overrides:
handleMouseClickin classBezierFigure- 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 event was consumed.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG