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 |
|---|---|
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 display's this connector's label.
|
float |
getLineWidth()
Get the line width of this figure.
|
Shape |
getShape()
Get the outline shape of this connector.
|
Stroke |
getStroke()
Get the stroke of this connector.
|
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(double dx,
double dy)
Inform the connector that the head site has moved.
|
boolean |
hit(Rectangle2D r)
Test if this connector is hit by the given rectangle.
|
boolean |
intersects(Rectangle2D r)
Test if this connector intersects the given rectangle.
|
void |
paint(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(Shape s)
Set the shape, for subclasses only.
|
void |
setStroke(Stroke s)
Set the stroke of this connector.
|
void |
setStrokePaint(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(double dx,
double dy)
Inform the connector that the tail site has moved.
|
void |
transform(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 Rectangle2D getBounds()
getBounds in interface FiguregetBounds in class AbstractFigurepublic float[] getDashArray()
public ConnectorEnd getHeadEnd()
public Site getHeadSite()
getHeadSite in interface Connectorpublic LabelFigure getLabelFigure()
public float getLineWidth()
public ConnectorEnd getTailEnd()
public Shape getShape()
getShape in interface FiguregetShape in class AbstractFigurepublic Stroke getStroke()
public Paint getStrokePaint()
public Site getTailSite()
getTailSite in interface Connectorpublic void headMoved(double dx,
double dy)
public boolean hit(Rectangle2D r)
hit in interface Figurehit in class AbstractFigurepublic boolean intersects(Rectangle2D r)
intersects in interface Figureintersects in class AbstractFigurepublic void paint(Graphics2D g)
paint in interface VisibleComponentpaint in class AbstractFigurepublic abstract void repositionLabel()
public void reroute()
public abstract void route()
public void setDashArray(float[] dashArray)
public void setHeadEnd(ConnectorEnd e)
public void setHeadSite(Site s)
setHeadSite in interface Connectorpublic void setLabelFigure(LabelFigure label)
public void setLineWidth(float lineWidth)
protected void setShape(Shape s)
public void setStroke(Stroke s)
public void setStrokePaint(Paint p)
public void setTailEnd(ConnectorEnd e)
public void setTailSite(Site s)
setTailSite in interface Connectorpublic void tailMoved(double dx,
double dy)
public void transform(AffineTransform at)
transform in interface Figuretransform in class AbstractFigurepublic abstract void translate(double x,
double y)
translate in interface Figuretranslate in class AbstractFigureCopyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.