|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jhotdraw.standard.AbstractFigure
org.jhotdraw.figures.PolyLineFigure
org.jhotdraw.figures.LineConnection
A LineConnection is a standard implementation of the ConnectionFigure interface. The interface is implemented with PolyLineFigure.
ConnectionFigure
,
Serialized FormField Summary | |
protected Connector |
myEndConnector
|
protected Connector |
myStartConnector
|
Fields inherited from class org.jhotdraw.figures.PolyLineFigure |
ARROW_TIP_BOTH, ARROW_TIP_END, ARROW_TIP_NONE, ARROW_TIP_START, fEndDecoration, fFrameColor, fPoints, fStartDecoration |
Fields inherited from interface org.jhotdraw.framework.Figure |
POPUP_MENU |
Constructor Summary | |
LineConnection()
Constructs a LineConnection. |
Method Summary | |
protected void |
basicMoveBy(int dx,
int dy)
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,
Figure end)
Tests whether two figures can be connected. |
void |
connectEnd(Connector newEndConnector)
Sets the end figure of the connection. |
boolean |
connectsSame(ConnectionFigure other)
Tests whether a connection connects the same figures as another ConnectionFigure. |
void |
connectStart(Connector newStartConnector)
Sets the start figure of the connection. |
void |
disconnectEnd()
Disconnects the end figure. |
void |
disconnectStart()
Disconnects the start figure. |
Figure |
endFigure()
Gets the end figure of the connection. |
java.awt.Point |
endPoint()
Gets the end point. |
void |
endPoint(int x,
int y)
Sets the end point. |
void |
figureChanged(FigureChangeEvent e)
Sent when a figure changed |
void |
figureInvalidated(FigureChangeEvent e)
Sent when an area is invalid |
void |
figureRemoved(FigureChangeEvent e)
Sent when a figure was removed |
void |
figureRequestRemove(FigureChangeEvent e)
Sent when requesting to remove a figure. |
void |
figureRequestUpdate(FigureChangeEvent e)
Sent when an update should happen. |
Connector |
getEndConnector()
Gets the end figure of the connection. |
Connector |
getStartConnector()
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. |
HandleEnumeration |
handles()
Gets the handles of the figure. |
void |
insertPointAt(java.awt.Point p,
int i)
Inserts the point and updates the connection. |
void |
layoutConnection()
Lays out the connection. |
void |
read(StorableInput dr)
Reads the object from the StorableInput. |
void |
release()
Releases a figure's resources. |
void |
removeFromContainer(FigureChangeListener c)
Removes a figure from the given container and unregisters it as a change listener. |
void |
removePointAt(int i)
Removes the point and updates the connection. |
protected void |
setEndConnector(Connector newEndConnector)
|
void |
setPointAt(java.awt.Point p,
int i)
Sets the point and updates the connection. |
protected void |
setStartConnector(Connector newStartConnector)
|
Figure |
startFigure()
Gets the start figure of the connection. |
java.awt.Point |
startPoint()
Gets the start point. |
void |
startPoint(int x,
int y)
Sets the start point. |
void |
updateConnection()
Updates the connection. |
void |
visit(FigureVisitor visitor)
|
void |
write(StorableOutput dw)
Writes the object to the StorableOutput. |
Methods inherited from class org.jhotdraw.figures.PolyLineFigure |
addPoint, basicDisplayBox, connectorAt, containsPoint, displayBox, draw, drawLine, findSegment, getAttribute, getAttribute, getEndDecoration, getFrameColor, getStartDecoration, invalidateRectangle, isEmpty, joinSegments, locator, pointAt, pointCount, points, setAttribute, setAttribute, setEndDecoration, setFrameColor, setStartDecoration, splitSegment |
Methods inherited from class org.jhotdraw.standard.AbstractFigure |
addDependendFigure, addFigureChangeListener, addToContainer, center, changed, clone, connectedTextLocator, connectionInsets, connectorVisibility, decompose, displayBox, displayBox, figures, findFigureInside, getDecoratedFigure, getDependendFigures, getTextHolder, getZValue, includes, invalidate, listener, moveBy, removeDependendFigure, removeFigureChangeListener, setZValue, size, willChange |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.jhotdraw.framework.ConnectionFigure |
joinSegments, pointAt, pointCount, splitSegment |
Methods inherited from interface org.jhotdraw.framework.Figure |
addDependendFigure, addFigureChangeListener, addToContainer, basicDisplayBox, center, changed, clone, connectedTextLocator, connectionInsets, connectorAt, connectorVisibility, containsPoint, decompose, displayBox, displayBox, displayBox, draw, figures, findFigureInside, getAttribute, getAttribute, getDecoratedFigure, getDependendFigures, getTextHolder, getZValue, includes, invalidate, isEmpty, listener, moveBy, removeDependendFigure, removeFigureChangeListener, setAttribute, setAttribute, setZValue, size, willChange |
Field Detail |
protected Connector myStartConnector
protected Connector myEndConnector
Constructor Detail |
public LineConnection()
Method Detail |
public boolean canConnect()
canConnect
in interface Figure
canConnect
in class AbstractFigure
protected void basicMoveBy(int dx, int dy)
basicMoveBy
in class PolyLineFigure
public void connectStart(Connector newStartConnector)
connectStart
in interface ConnectionFigure
newStartConnector
- the start connector of the connectionpublic void connectEnd(Connector newEndConnector)
connectEnd
in interface ConnectionFigure
newEndConnector
- the end connector of the connectionpublic void disconnectStart()
disconnectStart
in interface ConnectionFigure
public void disconnectEnd()
disconnectEnd
in interface ConnectionFigure
public boolean connectsSame(ConnectionFigure other)
connectsSame
in interface ConnectionFigure
protected void handleDisconnect(Figure start, Figure end)
protected void handleConnect(Figure start, Figure end)
public Figure startFigure()
startFigure
in interface ConnectionFigure
public Figure endFigure()
endFigure
in interface ConnectionFigure
protected void setStartConnector(Connector newStartConnector)
public Connector getStartConnector()
getStartConnector
in interface ConnectionFigure
protected void setEndConnector(Connector newEndConnector)
public Connector getEndConnector()
getEndConnector
in interface ConnectionFigure
public boolean canConnect(Figure start, Figure end)
canConnect
in interface ConnectionFigure
public void startPoint(int x, int y)
startPoint
in interface ConnectionFigure
public void endPoint(int x, int y)
endPoint
in interface ConnectionFigure
public java.awt.Point startPoint()
startPoint
in interface ConnectionFigure
public java.awt.Point endPoint()
endPoint
in interface ConnectionFigure
public HandleEnumeration handles()
handles
in interface Figure
handles
in class PolyLineFigure
public void setPointAt(java.awt.Point p, int i)
setPointAt
in interface ConnectionFigure
setPointAt
in class PolyLineFigure
public void insertPointAt(java.awt.Point p, int i)
insertPointAt
in class PolyLineFigure
public void removePointAt(int i)
removePointAt
in class PolyLineFigure
public void updateConnection()
updateConnection
in interface ConnectionFigure
public void layoutConnection()
public void figureChanged(FigureChangeEvent e)
FigureChangeListener
figureChanged
in interface FigureChangeListener
public void figureRemoved(FigureChangeEvent e)
FigureChangeListener
figureRemoved
in interface FigureChangeListener
public void figureRequestRemove(FigureChangeEvent e)
FigureChangeListener
figureRequestRemove
in interface FigureChangeListener
public void figureInvalidated(FigureChangeEvent e)
FigureChangeListener
figureInvalidated
in interface FigureChangeListener
public void figureRequestUpdate(FigureChangeEvent e)
FigureChangeListener
figureRequestUpdate
in interface FigureChangeListener
public void release()
Figure
release
in interface Figure
release
in class AbstractFigure
Figure.release()
public void write(StorableOutput dw)
Storable
write
in interface Storable
write
in class PolyLineFigure
public void read(StorableInput dr) throws java.io.IOException
Storable
read
in interface Storable
read
in class PolyLineFigure
java.io.IOException
public void visit(FigureVisitor visitor)
visit
in interface Figure
visit
in class AbstractFigure
public void removeFromContainer(FigureChangeListener c)
Figure
removeFromContainer
in interface Figure
removeFromContainer
in class AbstractFigure
Figure.removeFromContainer(org.jhotdraw.framework.FigureChangeListener)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |