All Packages Class Hierarchy This Package Previous Next Index
Class CH.ifa.draw.figures.LineConnection
java.lang.Object
|
+----CH.ifa.draw.standard.AbstractFigure
|
+----CH.ifa.draw.figures.PolyLineFigure
|
+----CH.ifa.draw.figures.LineConnection
- public class LineConnection
- extends PolyLineFigure
- implements ConnectionFigure
A LineConnection is a standard implementation of the
ConnectionFigure interface. The interface is implemented with PolyLineFigure.
- See Also:
- ConnectionFigure
-
fEnd
-
-
fStart
-
-
LineConnection()
- Constructs a LineConnection.
-
basicMoveBy(int, int)
- Ensures that a connection is updated if the connection
was moved.
-
canConnect()
- Tests whether a figure can be a connection target.
-
canConnect(Figure, Figure)
- Tests whether two figures can be connected.
-
connectEnd(Connector)
- Sets the end figure of the connection.
-
connectsSame(ConnectionFigure)
- Tests whether a connection connects the same figures
as another ConnectionFigure.
-
connectStart(Connector)
- Sets the start figure of the connection.
-
disconnectEnd()
- Disconnects the end figure.
-
disconnectStart()
- Disconnects the start figure.
-
end()
- Gets the end figure of the connection.
-
endFigure()
- Gets the end figure of the connection.
-
endPoint()
- Gets the end point.
-
endPoint(int, int)
- Sets the end point.
-
figureChanged(FigureChangeEvent)
-
-
figureInvalidated(FigureChangeEvent)
-
-
figureRemoved(FigureChangeEvent)
-
-
figureRequestRemove(FigureChangeEvent)
-
-
figureRequestUpdate(FigureChangeEvent)
-
-
handleConnect(Figure, Figure)
- Handles the connection of a connection.
-
handleDisconnect(Figure, Figure)
- Handles the disconnection of a connection.
-
handles()
- Gets the handles of the figure.
-
insertPointAt(Point, int)
- Inserts the point and updates the connection.
-
layoutConnection()
- Lays out the connection.
-
read(StorableInput)
- Reads the Figure from a StorableInput.
-
release()
- A figure is released from the drawing.
-
removePointAt(int)
- Removes the point and updates the connection.
-
setPointAt(Point, int)
- Sets the point and updates the connection.
-
start()
- Gets the start figure of the connection.
-
startFigure()
- Gets the start figure of the connection.
-
startPoint()
- Gets the start point.
-
startPoint(int, int)
- Sets the start point.
-
updateConnection()
- Updates the connection.
-
write(StorableOutput)
- Stores the Figure to a StorableOutput.
fStart
protected Connector fStart
fEnd
protected Connector fEnd
LineConnection
public LineConnection()
- Constructs a LineConnection. A connection figure has
an arrow decoration at the start and end.
canConnect
public boolean canConnect()
- Tests whether a figure can be a connection target.
ConnectionFigures cannot be connected and return false.
- Overrides:
- canConnect in class AbstractFigure
basicMoveBy
protected void basicMoveBy(int dx,
int dy)
- Ensures that a connection is updated if the connection
was moved.
- Overrides:
- basicMoveBy in class PolyLineFigure
connectStart
public void connectStart(Connector start)
- Sets the start figure of the connection.
connectEnd
public void connectEnd(Connector end)
- Sets the end figure of the connection.
disconnectStart
public void disconnectStart()
- Disconnects the start figure.
disconnectEnd
public void disconnectEnd()
- Disconnects the end figure.
connectsSame
public boolean connectsSame(ConnectionFigure other)
- Tests whether a connection connects the same figures
as another ConnectionFigure.
handleDisconnect
protected void handleDisconnect(Figure start,
Figure end)
- Handles the disconnection of a connection.
Override this method to handle this event.
handleConnect
protected void handleConnect(Figure start,
Figure end)
- Handles the connection of a connection.
Override this method to handle this event.
startFigure
public Figure startFigure()
- Gets the start figure of the connection.
endFigure
public Figure endFigure()
- Gets the end figure of the connection.
start
public Connector start()
- Gets the start figure of the connection.
end
public Connector end()
- Gets the end figure of the connection.
canConnect
public boolean canConnect(Figure start,
Figure end)
- Tests whether two figures can be connected.
startPoint
public void startPoint(int x,
int y)
- Sets the start point.
endPoint
public void endPoint(int x,
int y)
- Sets the end point.
startPoint
public Point startPoint()
- Gets the start point.
endPoint
public Point endPoint()
- Gets the end point.
handles
public Vector handles()
- Gets the handles of the figure. It returns the normal
PolyLineHandles but adds ChangeConnectionHandles at the
start and end.
- Overrides:
- handles in class PolyLineFigure
setPointAt
public void setPointAt(Point p,
int i)
- Sets the point and updates the connection.
- Overrides:
- setPointAt in class PolyLineFigure
insertPointAt
public void insertPointAt(Point p,
int i)
- Inserts the point and updates the connection.
- Overrides:
- insertPointAt in class PolyLineFigure
removePointAt
public void removePointAt(int i)
- Removes the point and updates the connection.
- Overrides:
- removePointAt in class PolyLineFigure
updateConnection
public void updateConnection()
- Updates the connection.
layoutConnection
public void layoutConnection()
- Lays out the connection. This is called when the connection
itself changes. By default the connection is recalculated
figureChanged
public void figureChanged(FigureChangeEvent e)
figureRemoved
public void figureRemoved(FigureChangeEvent e)
figureRequestRemove
public void figureRequestRemove(FigureChangeEvent e)
figureInvalidated
public void figureInvalidated(FigureChangeEvent e)
figureRequestUpdate
public void figureRequestUpdate(FigureChangeEvent e)
release
public void release()
- A figure is released from the drawing.
- Overrides:
- release in class AbstractFigure
write
public void write(StorableOutput dw)
- Stores the Figure to a StorableOutput.
- Overrides:
- write in class PolyLineFigure
read
public void read(StorableInput dr) throws IOException
- Reads the Figure from a StorableInput.
- Overrides:
- read in class PolyLineFigure
All Packages Class Hierarchy This Package Previous Next Index