|
JHotDraw 7.0.6 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jhotdraw.draw.AbstractFigure
org.jhotdraw.draw.AttributedFigure
org.jhotdraw.draw.BezierFigure
org.jhotdraw.draw.LineFigure
org.jhotdraw.draw.LineConnectionFigure
public class LineConnectionFigure
A LineConnection is a standard implementation of the ConnectionFigure interface. The interface is implemented with BezierFigure.
| 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 | |
|---|---|
LineConnectionFigure()
Creates a new instance. |
|
| Method Summary | |
|---|---|
void |
addNotify(Drawing drawing)
Informs a figure, that it has been added to the specified drawing. |
protected void |
basicSetEndConnector(Connector newEnd)
|
void |
basicSetNode(int index,
BezierPath.Node p)
Sets a control point. |
void |
basicSetStartConnector(Connector newStart)
|
void |
basicTransform(java.awt.geom.AffineTransform tx)
Ensures that a connection is updated if the connection was moved. |
boolean |
canConnect()
Tests whether a figure can be a connection target. |
boolean |
canConnect(Figure start)
Checks if this ConnectionFigure can be attached to the provided start figure. |
boolean |
canConnect(Figure start,
Figure end)
Checks if two figures can be connected using this ConnectionFigure. |
LineConnectionFigure |
clone()
Returns a clone of the figure. |
boolean |
connectsSame(ConnectionFigure other)
Checks if the ConnectionFigure connects the same figures. |
java.util.Collection<Handle> |
createHandles(int detailLevel)
Gets the handles of the figure. |
BezierPath |
getBezierPath()
FIXME - Liner must work with API of LineConnection! |
Connector |
getEndConnector()
Gets the end Connector. |
Figure |
getEndFigure()
Gets the end figure of the connection. |
Liner |
getLiner()
Get a Liner object which encapsulated a lineout algorithm for this figure. |
Connector |
getStartConnector()
Gets the start Connector. |
Figure |
getStartFigure()
Gets the start figure of the connection. |
protected void |
handleConnect(Figure start,
Figure end)
Handles the connection of a connection. |
protected void |
handleDisconnect(Figure start,
Figure end)
Handles the disconnection of a connection. |
boolean |
handleMouseClick(java.awt.geom.Point2D.Double p,
java.awt.event.MouseEvent evt,
DrawingView view)
Handles a mouse click. |
void |
lineout()
A lineout algorithm is used to define how the child components should be laid out in relation to each other. |
void |
read(DOMInput in)
|
protected void |
readLiner(DOMInput in)
|
protected void |
readPoints(DOMInput in)
|
void |
remap(java.util.Map oldToNew)
After cloning a collection of figures, the ConnectionFigures contained in this collection still connect to the original figures instead of to the clones. |
void |
removeNotify(Drawing drawing)
Informs a figure, that it has been removed from the specified drawing. |
void |
reverseConnection()
|
void |
setEndConnector(Connector newEnd)
Note: this method is only final for testing purposes. |
void |
setEndPoint(java.awt.geom.Point2D.Double p)
Sets the end point. |
void |
setLiner(Liner newValue)
Set a Liner object which encapsulated a lineout algorithm for this figure. |
void |
setPoint(int index,
java.awt.geom.Point2D.Double p)
Sets the specified point. |
void |
setStartConnector(Connector newStart)
Note: this method is only final for testing purposes. |
void |
setStartPoint(java.awt.geom.Point2D.Double p)
Sets the start point. |
void |
updateConnection()
Updates the connection. |
void |
validate()
|
void |
write(DOMOutput out)
|
protected void |
writeLiner(DOMOutput out)
|
protected void |
writePoints(DOMOutput out)
|
| 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 java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.jhotdraw.draw.ConnectionFigure |
|---|
getEndPoint, getPoint, getPointCount, getStartPoint |
| Methods inherited from interface org.jhotdraw.draw.Figure |
|---|
addFigureListener, addUndoableEditListener, basicSetAttribute, basicSetBounds, changed, contains, draw, findCompatibleConnector, findConnector, findFigureInside, getActions, getAttribute, getAttributes, getBounds, getCursor, getDecomposition, getDecorator, getDrawBounds, getLayer, getPreferredSize, getRestoreData, getTool, getTooltip, handleDrop, includes, invalidate, isConnectorsVisible, isInteractive, isVisible, removeFigureListener, removeUndoableEditListener, requestRemove, restoreTo, setAttribute, setConnectorsVisible, setDecorator, setVisible, willChange |
| Constructor Detail |
|---|
public LineConnectionFigure()
| Method Detail |
|---|
public void basicTransform(java.awt.geom.AffineTransform tx)
basicTransform in interface FigurebasicTransform in class BezierFiguretx - The transformation.public java.util.Collection<Handle> createHandles(int detailLevel)
createHandles in interface FigurecreateHandles in class LineFiguredetailLevel - The detail level of the handles. Usually this is 0 for
bounding box handles and 1 for point handles.
Handlepublic boolean canConnect()
canConnect in interface FigurecanConnect in class LineFigurepublic void updateConnection()
ConnectionFigure
updateConnection in interface ConnectionFigurepublic void validate()
validate in class BezierFigure
public boolean canConnect(Figure start,
Figure end)
ConnectionFigure
canConnect in interface ConnectionFigurepublic boolean connectsSame(ConnectionFigure other)
ConnectionFigure
connectsSame in interface ConnectionFigurepublic Connector getEndConnector()
ConnectionFigure
getEndConnector in interface ConnectionFigurepublic Figure getEndFigure()
ConnectionFigure
getEndFigure in interface ConnectionFigurepublic Connector getStartConnector()
ConnectionFigure
getStartConnector in interface ConnectionFigurepublic Figure getStartFigure()
ConnectionFigure
getStartFigure in interface ConnectionFigurepublic final void setEndConnector(Connector newEnd)
setEndConnector in interface ConnectionFigurenewEnd - the end figure of the connectionprotected void basicSetEndConnector(Connector newEnd)
public final void setStartConnector(Connector newStart)
setStartConnector in interface ConnectionFigurenewStart - the start figure of the connectionpublic void basicSetStartConnector(Connector newStart)
public void addNotify(Drawing drawing)
Figure
addNotify in interface FigureaddNotify in class AbstractFigurepublic void removeNotify(Drawing drawing)
Figure
removeNotify in interface FigureremoveNotify in class AbstractFigure
protected void handleDisconnect(Figure start,
Figure end)
protected void handleConnect(Figure start,
Figure end)
public LineConnectionFigure clone()
Figure
clone in interface Figureclone in class BezierFigurepublic void remap(java.util.Map oldToNew)
Figure
remap in interface Figureremap in class AbstractFigurepublic boolean canConnect(Figure start)
ConnectionFigure
canConnect in interface ConnectionFigure
public boolean handleMouseClick(java.awt.geom.Point2D.Double p,
java.awt.event.MouseEvent evt,
DrawingView view)
handleMouseClick in interface FigurehandleMouseClick in class LineFigurep - The location of the mouse event.evt - The mouse event.view - The drawing view which is the source of the mouse event.
protected void readPoints(DOMInput in)
throws java.io.IOException
readPoints in class BezierFigurejava.io.IOException
public void read(DOMInput in)
throws java.io.IOException
read in interface DOMStorableread in class BezierFigurejava.io.IOException
protected void readLiner(DOMInput in)
throws java.io.IOException
java.io.IOException
public void write(DOMOutput out)
throws java.io.IOException
write in interface DOMStorablewrite in class BezierFigurejava.io.IOException
protected void writeLiner(DOMOutput out)
throws java.io.IOException
java.io.IOException
protected void writePoints(DOMOutput out)
throws java.io.IOException
writePoints in class BezierFigurejava.io.IOExceptionpublic void setLiner(Liner newValue)
ConnectionFigure
setLiner in interface ConnectionFigurenewValue - encapsulation of a lineout algorithm.
public void basicSetNode(int index,
BezierPath.Node p)
BezierFigure
basicSetNode in class BezierFigurepublic void lineout()
ConnectionFigure
lineout in interface ConnectionFigurepublic BezierPath getBezierPath()
getBezierPath in class BezierFigurepublic Liner getLiner()
ConnectionFigure
getLiner in interface ConnectionFigurepublic void setStartPoint(java.awt.geom.Point2D.Double p)
ConnectionFigure
setStartPoint in interface ConnectionFigure
public void setPoint(int index,
java.awt.geom.Point2D.Double p)
ConnectionFigure
setPoint in interface ConnectionFigurepublic void setEndPoint(java.awt.geom.Point2D.Double p)
ConnectionFigure
setEndPoint in interface ConnectionFigurepublic void reverseConnection()
|
Copyright 1996-2006 © JHotDraw.org | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||