public abstract class AbstractConnector extends AbstractFigure implements Connector
| Constructor and Description |
|---|
AbstractConnector(Site tail,
Site head)
Create a new connector between the given sites.
|
| Modifier and Type | Method and Description |
|---|---|
java.awt.geom.Rectangle2D |
getBounds()
Get the bounding box of this connector.
|
float[] |
getDashArray()
Get the dash array.
|
ConnectorEnd |
getHeadEnd()
Get the object drawn at the head end of the connector, if there
is one.
|
Site |
getHeadSite()
Get the site that marks the "head" of the connector.
|
LabelFigure |
getLabelFigure()
Get the figure that displays this connector's label.
|
float |
getLineWidth()
Get the line width of this figure.
|
java.awt.Shape |
getShape()
Get the outline shape of this connector.
|
java.awt.Stroke |
getStroke()
Get the stroke of this connector.
|
java.awt.Paint |
getStrokePaint()
Get the stroke paint pattern of this connector.
|
ConnectorEnd |
getTailEnd()
Get the object drawn at the tail end of the connector, if there
is one.
|
Site |
getTailSite()
Get the site that marks the "tail" of the connector.
|
void |
headMoved()
Inform the connector that the head site has moved.
|
boolean |
hit(java.awt.geom.Rectangle2D r)
Test if this connector is hit by the given rectangle.
|
boolean |
intersects(java.awt.geom.Rectangle2D r)
Test if this connector intersects the given rectangle.
|
void |
paint(java.awt.Graphics2D g)
Paint the connector.
|
abstract void |
repositionLabel()
Tell the connector to reposition its label if it has one.
|
void |
reroute()
Tell the connector to re-route itself.
|
abstract void |
route()
Tell the connector to route itself completely,
using all available information.
|
void |
setDashArray(float[] dashArray)
Set the dash array of the stroke.
|
void |
setHeadEnd(ConnectorEnd e)
Set the object drawn at the head end of the connector.
|
void |
setHeadSite(Site s)
Set the site that marks the "head" of the connector,
and call headMoved();
|
void |
setLabelFigure(LabelFigure label)
Set the LabelFigure of this connector.
|
void |
setLineWidth(float lineWidth)
Set the line width.
|
protected void |
setShape(java.awt.Shape s)
Set the shape, for subclasses only.
|
void |
setStroke(java.awt.Stroke s)
Set the stroke of this connector.
|
void |
setStrokePaint(java.awt.Paint p)
Set the stroke paint pattern of this connector.
|
void |
setTailEnd(ConnectorEnd e)
Set the object drawn at the tail end of the connector.
|
void |
setTailSite(Site s)
Set the site that marks the "tail" of the connector.
|
void |
tailMoved()
Inform the connector that the tail site has moved.
|
void |
transform(java.awt.geom.AffineTransform at)
Transform the connector.
|
abstract void |
translate(double x,
double y)
Translate the connector.
|
contains, getInteractor, getLayer, getOrigin, getParent, getToolTipText, getTransformContext, getUserObject, isVisible, paint, repaint, repaint, setInteractor, setParent, setToolTipText, setUserObject, setVisibleclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcontains, getInteractor, getLayer, getOrigin, getParent, getToolTipText, setInteractor, setParent, setToolTipTextisVisible, paint, setVisiblegetTransformContext, repaint, repaintgetUserObject, setUserObjectpublic java.awt.geom.Rectangle2D getBounds()
getBounds in interface FiguregetBounds in class AbstractFigurepublic float[] getDashArray()
setDashArray(float[])public ConnectorEnd getHeadEnd()
setHeadEnd(ConnectorEnd)public Site getHeadSite()
getHeadSite in interface ConnectorsetHeadSite(Site)public LabelFigure getLabelFigure()
setLabelFigure(LabelFigure)public float getLineWidth()
setLineWidth(float)public java.awt.Shape getShape()
getShape in interface FiguregetShape in class AbstractFiguresetShape(Shape)public java.awt.Stroke getStroke()
setStroke(Stroke)public java.awt.Paint getStrokePaint()
setStrokePaint(Paint)public ConnectorEnd getTailEnd()
setTailEnd(ConnectorEnd)public Site getTailSite()
getTailSite in interface ConnectorsetTailSite(Site)public void headMoved()
public boolean hit(java.awt.geom.Rectangle2D r)
hit in interface Figurehit in class AbstractFigurer - The rectanglepublic boolean intersects(java.awt.geom.Rectangle2D r)
intersects in interface Figureintersects in class AbstractFigurer - The rectanglepublic void paint(java.awt.Graphics2D g)
paint in interface VisibleComponentpaint in class AbstractFigureg - The Graphics contextspublic abstract void repositionLabel()
public void reroute()
public abstract void route()
public void setDashArray(float[] dashArray)
dashArray - The dashArraygetDashArray()public void setHeadEnd(ConnectorEnd e)
e - The connector end.getHeadEnd()public void setHeadSite(Site s)
setHeadSite in interface Connectors - The sitegetHeadSite()public void setLabelFigure(LabelFigure label)
label - The label of the figuregetLabelFigure()public void setLineWidth(float lineWidth)
lineWidth - The line width.getLineWidth()protected void setShape(java.awt.Shape s)
s - The shapegetShape()public void setStroke(java.awt.Stroke s)
s - The strokegetStroke()public void setStrokePaint(java.awt.Paint p)
p - The stroke paintgetStrokePaint()public void setTailEnd(ConnectorEnd e)
e - The connector endgetTailEnd()public void setTailSite(Site s)
setTailSite in interface Connectors - The "tail" sitepublic void tailMoved()
public void transform(java.awt.geom.AffineTransform at)
transform in interface Figuretransform in class AbstractFigureat - The transform to be used.public abstract void translate(double x,
double y)
translate in interface Figuretranslate in class AbstractFigurex - The x value to be moved.y - The y value to be moved.