|
||||||||||
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
public class LineConnection
A LineConnection is a standard implementation of the ConnectionFigure interface. The interface is implemented with PolyLineFigure.
ConnectionFigure
,
Serialized FormField Summary |
---|
Fields inherited from class org.jhotdraw.figures.PolyLineFigure |
---|
ARROW_TIP_BOTH, ARROW_TIP_END, ARROW_TIP_NONE, ARROW_TIP_START |
Fields inherited from interface org.jhotdraw.framework.Figure |
---|
POPUP_MENU |
Constructor Summary | |
---|---|
LineConnection()
Constructs a LineConnection. |
Method Summary | |
---|---|
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. |
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 Figure from a StorableInput. |
void |
release()
A figure is released from the drawing. |
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. |
void |
setPointAt(java.awt.Point p,
int i)
Sets the point and updates the connection. |
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)
Stores the Figure to a StorableOutput. |
Methods inherited from class org.jhotdraw.figures.PolyLineFigure |
---|
addPoint, basicDisplayBox, connectorAt, containsPoint, displayBox, draw, findSegment, getAttribute, getAttribute, getEndDecoration, getStartDecoration, isEmpty, joinSegments, locator, pointAt, pointCount, points, setAttribute, setAttribute, setEndDecoration, 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, 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 |
Constructor Detail |
---|
public LineConnection()
Method Detail |
---|
public boolean canConnect()
canConnect
in interface Figure
canConnect
in class AbstractFigure
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
public Figure startFigure()
startFigure
in interface ConnectionFigure
public Figure endFigure()
endFigure
in interface ConnectionFigure
public Connector getStartConnector()
getStartConnector
in interface ConnectionFigure
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
Handle
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()
AbstractFigure
release
in interface Figure
release
in class AbstractFigure
Figure.release()
public void write(StorableOutput dw)
AbstractFigure
write
in interface Storable
write
in class PolyLineFigure
public void read(StorableInput dr) throws java.io.IOException
AbstractFigure
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)
AbstractFigure
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 |