org.jhotdraw.samples.svg.figures
Class SVGLine
java.lang.Object
org.jhotdraw.draw.AbstractFigure
org.jhotdraw.draw.AttributedFigure
org.jhotdraw.draw.BezierFigure
org.jhotdraw.draw.LineFigure
org.jhotdraw.samples.svg.figures.SVGLine
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, Figure, SVGFigure, DOMStorable
public class SVGLine
- extends LineFigure
- implements SVGFigure
SVGLine.
XXX - Get rid of this class and roll in the read() method into SVGPath.
- See Also:
- Serialized Form
|
Constructor Summary |
SVGLine()
Creates a new instance. |
| 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, readPoints, removeAllNodes, removeNode, restoreTo, setClosed, setNode, setPoint, validate, writePoints |
| Methods inherited from class org.jhotdraw.draw.AttributedFigure |
applyAttributesTo, drawConnectors, drawFigure, drawText, getAttribute, getAttributeKey, getAttributes, getStroke, getStrokeMiterLimitFactor, hasAttribute, isAttributeEnabled, removeAttribute, setAttribute, setAttributeEnabled, setAttributes |
| 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 |
| Methods inherited from interface org.jhotdraw.draw.Figure |
addFigureListener, addNotify, addUndoableEditListener, basicSetAttribute, basicSetBounds, basicTransform, canConnect, changed, clone, contains, createHandles, draw, findCompatibleConnector, findConnector, findFigureInside, getActions, getAttribute, getAttributes, getBounds, getCursor, getDecomposition, getDecorator, getDrawBounds, getEndPoint, getLayer, getPreferredSize, getRestoreData, getStartPoint, getTool, getTooltip, handleDrop, includes, invalidate, isConnectorsVisible, isInteractive, isVisible, remap, removeFigureListener, removeNotify, removeUndoableEditListener, requestRemove, restoreTo, setAttribute, setConnectorsVisible, setDecorator, setVisible, willChange |
SVGLine
public SVGLine()
- Creates a new instance.
write
public void write(DOMOutput out)
throws java.io.IOException
- Specified by:
write in interface DOMStorable- Overrides:
write in class BezierFigure
- Throws:
java.io.IOException
writeAttributes
protected void writeAttributes(DOMOutput out)
throws java.io.IOException
- Overrides:
writeAttributes in class AttributedFigure
- Throws:
java.io.IOException
read
public void read(DOMInput in)
throws java.io.IOException
- Specified by:
read in interface DOMStorable- Overrides:
read in class BezierFigure
- Throws:
java.io.IOException
readAttributes
protected void readAttributes(DOMInput in)
throws java.io.IOException
- Overrides:
readAttributes in class AttributedFigure
- Throws:
java.io.IOException
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 LineFigure
- 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.
isEmpty
public boolean isEmpty()
- Description copied from interface:
SVGFigure
- Returns true, if this figure is empty for one of the following
reasons:
- A group has no children
- A path has less than two points
- An ellipse or a rectangle has a width or a height of 0
- A text has no characters
- Specified by:
isEmpty in interface SVGFigure