public class TerminalFigure extends AbstractFigure implements Terminal
| Constructor and Description |
|---|
TerminalFigure(Figure figure,
Site connectSite)
Create a new TerminalFigure for the given figure, with the given
site for connections.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(Point2D p)
Test whether this figure contains the point given.
|
Site |
getAttachSite()
Get the site that the terminal is attached to.
|
Rectangle2D |
getBounds()
Get the bounding box of this figure.
|
Site |
getConnectSite()
Get the site that a connector can connect to.
|
Interactor |
getInteractor()
Return the interactor of this figure.
|
CanvasLayer |
getLayer()
Get the most immediate layer containing this figure.
|
Point2D |
getOrigin()
Return the origin of the wrapped figure in the enclosing
transform context.
|
CanvasComponent |
getParent()
Return the parent of this component.
|
Shape |
getShape()
Get the outline shape of this figure.
|
String |
getToolTipText()
Return the tooltip for this figure.
|
TransformContext |
getTransformContext()
Return the transform context of the component.
|
Object |
getUserObject()
Return the user object.
|
boolean |
hit(Rectangle2D r)
Test if this figure is "hit" by the given rectangle.
|
boolean |
intersects(Rectangle2D r)
Test if this figure intersects the given rectangle.
|
boolean |
isVisible()
Test the visibility flag of this object.
|
void |
paint(Graphics2D g)
Paint the figure.
|
void |
paint(Graphics2D g,
Rectangle2D region)
Paint this object onto a 2D graphics object, within the given
region.
|
void |
relocate()
Tell the terminal to relocate itself because the
attachment site (or the figure that owns it) has moved.
|
void |
repaint()
Schedule a repaint of the component.
|
void |
repaint(DamageRegion d)
Accept notification that a repaint has occurred somewhere
in the tree below this component.
|
void |
setAttachSite(Site s)
Set the site that the terminal is attached to.
|
void |
setInteractor(Interactor interactor)
Set the interactor of this figure.
|
void |
setParent(CanvasComponent fc)
Set the parent of this figure.
|
void |
setToolTipText(String tip)
Set the tool tip for this figure.
|
void |
setUserObject(Object o)
Set the user object.
|
void |
setVisible(boolean flag)
Set the visibility flag of this object.
|
void |
transform(AffineTransform at)
Transform the figure with the supplied transform.
|
void |
translate(double x,
double y)
Move the figure the indicated distance.
|
public boolean contains(Point2D p)
contains in interface Figurecontains in class AbstractFigurepublic Rectangle2D getBounds()
getBounds in interface FiguregetBounds in class AbstractFigurepublic Site getAttachSite()
getAttachSite in interface Terminalpublic Site getConnectSite()
getConnectSite in interface Terminalpublic Interactor getInteractor()
getInteractor in interface FiguregetInteractor in class AbstractFigurepublic CanvasLayer getLayer()
getLayer in interface FiguregetLayer in class AbstractFigurepublic Point2D getOrigin()
getOrigin in interface FiguregetOrigin in class AbstractFigureAbstractFigure.getBounds()public CanvasComponent getParent()
getParent in interface CanvasComponentgetParent in interface FiguregetParent in class AbstractFigurepublic TransformContext getTransformContext()
getTransformContext in interface CanvasComponentgetTransformContext in class AbstractFigurepublic Shape getShape()
getShape in interface FiguregetShape in class AbstractFigurepublic String getToolTipText()
getToolTipText in interface FiguregetToolTipText in class AbstractFigurepublic Object getUserObject()
getUserObject in interface UserObjectContainergetUserObject in class AbstractFigurepublic boolean hit(Rectangle2D r)
(This method would be better named hits, but the name hit is consistent with java.awt.Graphics2D.)
hit in interface Figurehit in class AbstractFigurepublic boolean intersects(Rectangle2D r)
intersects in interface Figureintersects in class AbstractFigurepublic boolean isVisible()
isVisible in interface VisibleComponentisVisible in class AbstractFigurepublic void paint(Graphics2D g)
paint in interface VisibleComponentpaint in class AbstractFigurepublic void paint(Graphics2D g, Rectangle2D region)
paint in interface VisibleComponentpaint in class AbstractFigurepublic void relocate()
public void repaint()
repaint in interface CanvasComponentrepaint in class AbstractFigurepublic void repaint(DamageRegion d)
repaint in interface CanvasComponentrepaint in class AbstractFigurepublic void setAttachSite(Site s)
setAttachSite in interface Terminalpublic void setInteractor(Interactor interactor)
setInteractor in interface FiguresetInteractor in class AbstractFigurepublic void setParent(CanvasComponent fc)
setParent in interface FiguresetParent in class AbstractFigurepublic void setToolTipText(String tip)
setToolTipText in interface FiguresetToolTipText in class AbstractFigurepublic void transform(AffineTransform at)
transform in interface Figuretransform in class AbstractFigurepublic void translate(double x,
double y)
translate in interface Figuretranslate in class AbstractFigurepublic void setUserObject(Object o)
setUserObject in interface UserObjectContainersetUserObject in class AbstractFigurepublic void setVisible(boolean flag)
setVisible in interface VisibleComponentsetVisible in class AbstractFigureCopyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.