|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectCH.ifa.draw.standard.AbstractFigure
CH.ifa.draw.figures.PolyLineFigure
CH.ifa.draw.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 | |
---|---|
protected Connector |
fEnd
|
protected Connector |
fStart
|
Fields inherited from class CH.ifa.draw.figures.PolyLineFigure |
---|
ARROW_TIP_BOTH, ARROW_TIP_END, ARROW_TIP_NONE, ARROW_TIP_START, fEndDecoration, fFrameColor, fPoints, fStartDecoration |
Fields inherited from interface CH.ifa.draw.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 end)
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 start)
Sets the start figure of the connection. |
void |
disconnectEnd()
Disconnects the end figure. |
void |
disconnectStart()
Disconnects the start figure. |
Connector |
end()
Gets the end figure of the connection. |
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. |
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. |
java.util.Vector |
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 |
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. |
Connector |
start()
Gets the start figure of 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 |
write(StorableOutput dw)
Stores the Figure to a StorableOutput. |
Methods inherited from class CH.ifa.draw.figures.PolyLineFigure |
---|
addPoint, basicDisplayBox, connectorAt, containsPoint, displayBox, draw, drawLine, findSegment, getAttribute, getEndDecoration, getFrameColor, getStartDecoration, isEmpty, joinSegments, locator, pointAt, pointCount, points, setAttribute, setEndDecoration, setFrameColor, setStartDecoration, splitSegment |
Methods inherited from class CH.ifa.draw.standard.AbstractFigure |
---|
addFigureChangeListener, addToContainer, center, changed, clone, connectedTextLocator, connectionInsets, connectorVisibility, decompose, displayBox, displayBox, figures, findFigureInside, includes, invalidate, listener, moveBy, removeFigureChangeListener, removeFromContainer, size, willChange |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface CH.ifa.draw.framework.ConnectionFigure |
---|
joinSegments, pointAt, pointCount, splitSegment |
Methods inherited from interface CH.ifa.draw.framework.Figure |
---|
addFigureChangeListener, addToContainer, basicDisplayBox, center, changed, clone, connectedTextLocator, connectionInsets, connectorAt, connectorVisibility, containsPoint, decompose, displayBox, displayBox, displayBox, draw, figures, findFigureInside, getAttribute, includes, invalidate, isEmpty, listener, moveBy, removeFigureChangeListener, removeFromContainer, setAttribute, size, willChange |
Field Detail |
---|
protected Connector fStart
protected Connector fEnd
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
AbstractFigure.moveBy(int, int)
public void connectStart(Connector start)
connectStart
in interface ConnectionFigure
public void connectEnd(Connector end)
connectEnd
in interface ConnectionFigure
public 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()
public Figure endFigure()
public Connector start()
start
in interface ConnectionFigure
public Connector end()
end
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 java.util.Vector 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
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |