|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openbp.cockpit.modeler.tools.ModelerTool
org.openbp.cockpit.modeler.tools.XConnectionTool
public abstract class XConnectionTool
The connection tool can be used to connect figures, to split connections, and to join two segments of a connection. The connection tool turns the visibility of the connectors on when it enters a figure. The connection object to be created is specified by a prototype.
| Nested Class Summary | |
|---|---|
class |
XConnectionTool.CanConnectDecorator
Decorator that paints figures we can connect to in green. |
| Constructor Summary | |
|---|---|
XConnectionTool(ModelerToolSupport toolSupport)
|
|
| Method Summary | |
|---|---|
void |
activate()
|
boolean |
appliesTo(java.lang.Object affectedObject)
Checks if the tool can be applied to the given figure. |
boolean |
canLinkFigures(CH.ifa.draw.framework.Figure start,
CH.ifa.draw.framework.Figure target)
Checks if two figures can be connected using a control link. |
protected abstract PolySplineConnection |
createConnection()
Creates the connection figure. |
void |
deactivate()
|
protected CH.ifa.draw.framework.Figure |
findConnectableFigure(int x,
int y,
CH.ifa.draw.framework.Drawing drawing)
Finds a figure we can connect to at the given position. |
protected CH.ifa.draw.framework.Figure |
findConnectionStart(int x,
int y,
CH.ifa.draw.framework.Drawing drawing)
Finds a connection start figure at the given position. |
protected CH.ifa.draw.framework.Connector |
findConnector(int x,
int y,
CH.ifa.draw.framework.Figure figure)
Finds a connector of the given figure at the given position. |
protected CH.ifa.draw.framework.Figure |
findSourceFigure(int x,
int y,
CH.ifa.draw.framework.Drawing drawing)
Finds a connectable figure as source at the given position. |
protected CH.ifa.draw.framework.Figure |
findTargetFigure(int x,
int y,
CH.ifa.draw.framework.Drawing drawing)
Finds a connectable figure as target at the given position. |
void |
mouseDown(java.awt.event.MouseEvent e,
int x,
int y)
|
void |
mouseDrag(java.awt.event.MouseEvent e,
int x,
int y)
|
void |
mouseMove(java.awt.event.MouseEvent e,
int x,
int y)
|
void |
mouseUp(java.awt.event.MouseEvent e,
int x,
int y)
|
protected void |
trackConnectors(java.awt.event.MouseEvent e,
int x,
int y)
Tracks connectors. |
| Methods inherited from class org.openbp.cockpit.modeler.tools.ModelerTool |
|---|
getAffectedFigure, getAffectedObject, getDrawing, getEditor, getLastPoint, getToolCursor, getToolHintMsg, getToolSupport, getView, keyDown, keyUp, setAffectedObject, setToolCursor, setToolHintMsg |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public XConnectionTool(ModelerToolSupport toolSupport)
| Method Detail |
|---|
public boolean appliesTo(java.lang.Object affectedObject)
appliesTo in class ModelerToolaffectedObject - Object the cursor is over
public void activate()
activate in class ModelerToolpublic void deactivate()
deactivate in class ModelerTool
public void mouseDown(java.awt.event.MouseEvent e,
int x,
int y)
mouseDown in class ModelerTool
public void mouseDrag(java.awt.event.MouseEvent e,
int x,
int y)
mouseDrag in class ModelerTool
public void mouseUp(java.awt.event.MouseEvent e,
int x,
int y)
mouseUp in class ModelerTool
public void mouseMove(java.awt.event.MouseEvent e,
int x,
int y)
mouseMove in class ModelerToolprotected abstract PolySplineConnection createConnection()
protected void trackConnectors(java.awt.event.MouseEvent e,
int x,
int y)
e - Mouse event which should be interpretedx - Document coordinatey - Document coordinate
protected CH.ifa.draw.framework.Figure findSourceFigure(int x,
int y,
CH.ifa.draw.framework.Drawing drawing)
x - Document coordinatey - Document coordinatedrawing - Drawing we operate on
protected CH.ifa.draw.framework.Figure findTargetFigure(int x,
int y,
CH.ifa.draw.framework.Drawing drawing)
x - Document coordinatey - Document coordinatedrawing - Drawing we operate on
protected CH.ifa.draw.framework.Figure findConnectionStart(int x,
int y,
CH.ifa.draw.framework.Drawing drawing)
x - Document coordinatey - Document coordinatedrawing - Drawing we operate on
protected CH.ifa.draw.framework.Figure findConnectableFigure(int x,
int y,
CH.ifa.draw.framework.Drawing drawing)
x - Document coordinatey - Document coordinatedrawing - Drawing we operate on
protected CH.ifa.draw.framework.Connector findConnector(int x,
int y,
CH.ifa.draw.framework.Figure figure)
x - Document coordinatey - Document coordinatefigure - Figure to search
public boolean canLinkFigures(CH.ifa.draw.framework.Figure start,
CH.ifa.draw.framework.Figure target)
start - Start figuretarget - Target figure
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||