public class StraightTerminal extends AbstractFigure implements Terminal
| Constructor and Description |
|---|
StraightTerminal()
Create a new terminal which is not attached to anything.
|
StraightTerminal(Site attachSite)
Create a new terminal attached to the given site.
|
StraightTerminal(Site attachSite,
Stroke stroke,
Paint paint)
Create a new terminal attached to the given site,
with the given stroke and paint.
|
| Modifier and Type | Method and Description |
|---|---|
Site |
getAttachSite()
Get the site to which the terminal is attached
|
Rectangle2D |
getBounds()
Get the bounding box of this terminal.
|
Site |
getConnectSite()
Get the site to which a connector can attach
|
ConnectorEnd |
getEnd()
Get the object drawn at the end of the terminal, if there
is one.
|
Paint |
getPaint()
Get the paint of this terminal.
|
Shape |
getShape()
Get the outline shape of this terminal.
|
Stroke |
getStroke()
Get the stroke of this terminal.
|
boolean |
hit(Rectangle2D r)
Test if this terminal is hit by the given rectangle.
|
void |
paint(Graphics2D g)
Paint the terminal.
|
void |
relocate()
Tell the terminal to reposition itself over the attachment
site.
|
void |
setAttachSite(Site s)
Set the site to which the terminal is attached.
|
void |
setEnd(ConnectorEnd e)
Set the object drawn at the end of the terminal.
|
void |
setPaint(Paint p)
Set the stroke paint pattern of this terminal.
|
void |
setStroke(Stroke s)
Set the stroke of this terminal.
|
void |
transform(AffineTransform at)
Transform the terminal.
|
void |
translate(double x,
double y)
Translate the terminal.
|
contains, getInteractor, getLayer, getOrigin, getParent, getToolTipText, getTransformContext, getUserObject, intersects, isVisible, paint, repaint, repaint, setInteractor, setParent, setToolTipText, setUserObject, setVisibleclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcontains, getInteractor, getLayer, getOrigin, getParent, getToolTipText, intersects, setInteractor, setParent, setToolTipTextisVisible, paint, setVisiblegetTransformContext, repaint, repaintgetUserObject, setUserObjectpublic StraightTerminal()
public StraightTerminal(Site attachSite)
public Site getAttachSite()
getAttachSite in interface Terminalpublic Rectangle2D getBounds()
getBounds in interface FiguregetBounds in class AbstractFigurepublic Site getConnectSite()
getConnectSite in interface Terminalpublic ConnectorEnd getEnd()
public Paint getPaint()
public Shape getShape()
getShape in interface FiguregetShape in class AbstractFigurepublic Stroke getStroke()
public boolean hit(Rectangle2D r)
hit in interface Figurehit in class AbstractFigurepublic void paint(Graphics2D g)
paint in interface VisibleComponentpaint in class AbstractFigurepublic void relocate()
public void setAttachSite(Site s)
setAttachSite in interface Terminalpublic void setEnd(ConnectorEnd e)
public void setStroke(Stroke s)
public void setPaint(Paint p)
public void transform(AffineTransform at)
transform in interface Figuretransform in class AbstractFigurepublic void translate(double x,
double y)
translate in interface Figuretranslate in class AbstractFigureCopyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.