|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdiva.canvas.AbstractFigure
diva.canvas.connector.AbstractConnector
diva.canvas.connector.ManhattanConnector
public class ManhattanConnector
A Connector that draws itself with perpendicular lines. To help it route itself, the connector contains an instance of ManhattanRouter, which can be changed to create other kinds of (or smarter) connectors. By default the connector routes itself with rounded corners, which tend to look a little nicer in complex views. To get standard right angles at the corners, set the bend radius to zero.
Constructor Summary | |
---|---|
ManhattanConnector(Site tail,
Site head)
Create a new manhattan connector between the given sites. |
Method Summary | |
---|---|
double |
getBendRadius()
Return the maximum bend radius of the manhattan-routed edge. |
Shape |
getCurvedRoute(Polyline2D route)
Apply a bend radius to the manhattan route. |
void |
headMoved(double dx,
double dy)
Inform the connector that the head site has moved. |
void |
repositionLabel()
Tell the connector to reposition the text label. |
void |
route()
Tell the connector to route itself between the current positions of the head and tail sites. |
void |
setBendRadius(double r)
Set the maximum bend radius of the manhattan-routed edge. |
void |
tailMoved(double dx,
double dy)
Inform the connector that the tail site has moved. |
void |
translate(double x,
double y)
Translate the connector. |
Methods inherited from class diva.canvas.connector.AbstractConnector |
---|
getBounds, getDashArray, getHeadEnd, getHeadSite, getLabelFigure, getLineWidth, getShape, getStroke, getStrokePaint, getTailEnd, getTailSite, hit, intersects, paint, reroute, setDashArray, setHeadEnd, setHeadSite, setLabelFigure, setLineWidth, setShape, setStroke, setStrokePaint, setTailEnd, setTailSite, transform |
Methods inherited from class diva.canvas.AbstractFigure |
---|
contains, getInteractor, getLayer, getOrigin, getParent, getToolTipText, getTransformContext, getUserObject, isVisible, paint, repaint, repaint, setInteractor, setParent, setToolTipText, setUserObject, setVisible |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface diva.canvas.Figure |
---|
contains, getInteractor, getLayer, getOrigin, getParent, getToolTipText, setInteractor, setParent, setToolTipText |
Methods inherited from interface diva.canvas.VisibleComponent |
---|
isVisible, paint, setVisible |
Methods inherited from interface diva.canvas.CanvasComponent |
---|
getTransformContext, repaint, repaint |
Methods inherited from interface diva.util.UserObjectContainer |
---|
getUserObject, setUserObject |
Constructor Detail |
---|
public ManhattanConnector(Site tail, Site head)
Method Detail |
---|
public Shape getCurvedRoute(Polyline2D route)
public double getBendRadius()
public void headMoved(double dx, double dy)
headMoved
in interface Connector
headMoved
in class AbstractConnector
public void repositionLabel()
repositionLabel
in class AbstractConnector
public void route()
route
in interface Connector
route
in class AbstractConnector
public void setBendRadius(double r)
getBendRadius()
public void tailMoved(double dx, double dy)
tailMoved
in interface Connector
tailMoved
in class AbstractConnector
public void translate(double x, double y)
translate
in interface Figure
translate
in class AbstractConnector
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |