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 Figure
contains
in class AbstractFigure
public Rectangle2D getBounds()
getBounds
in interface Figure
getBounds
in class AbstractFigure
public Site getAttachSite()
getAttachSite
in interface Terminal
public Site getConnectSite()
getConnectSite
in interface Terminal
public Interactor getInteractor()
getInteractor
in interface Figure
getInteractor
in class AbstractFigure
public CanvasLayer getLayer()
getLayer
in interface Figure
getLayer
in class AbstractFigure
public Point2D getOrigin()
getOrigin
in interface Figure
getOrigin
in class AbstractFigure
AbstractFigure.getBounds()
public CanvasComponent getParent()
getParent
in interface CanvasComponent
getParent
in interface Figure
getParent
in class AbstractFigure
public TransformContext getTransformContext()
getTransformContext
in interface CanvasComponent
getTransformContext
in class AbstractFigure
public Shape getShape()
getShape
in interface Figure
getShape
in class AbstractFigure
public String getToolTipText()
getToolTipText
in interface Figure
getToolTipText
in class AbstractFigure
public Object getUserObject()
getUserObject
in interface UserObjectContainer
getUserObject
in class AbstractFigure
public boolean hit(Rectangle2D r)
(This method would be better named hits, but the name hit is consistent with java.awt.Graphics2D.)
hit
in interface Figure
hit
in class AbstractFigure
public boolean intersects(Rectangle2D r)
intersects
in interface Figure
intersects
in class AbstractFigure
public boolean isVisible()
isVisible
in interface VisibleComponent
isVisible
in class AbstractFigure
public void paint(Graphics2D g)
paint
in interface VisibleComponent
paint
in class AbstractFigure
public void paint(Graphics2D g, Rectangle2D region)
paint
in interface VisibleComponent
paint
in class AbstractFigure
public void relocate()
public void repaint()
repaint
in interface CanvasComponent
repaint
in class AbstractFigure
public void repaint(DamageRegion d)
repaint
in interface CanvasComponent
repaint
in class AbstractFigure
public void setAttachSite(Site s)
setAttachSite
in interface Terminal
public void setInteractor(Interactor interactor)
setInteractor
in interface Figure
setInteractor
in class AbstractFigure
public void setParent(CanvasComponent fc)
setParent
in interface Figure
setParent
in class AbstractFigure
public void setToolTipText(String tip)
setToolTipText
in interface Figure
setToolTipText
in class AbstractFigure
public void transform(AffineTransform at)
transform
in interface Figure
transform
in class AbstractFigure
public void translate(double x, double y)
translate
in interface Figure
translate
in class AbstractFigure
public void setUserObject(Object o)
setUserObject
in interface UserObjectContainer
setUserObject
in class AbstractFigure
public void setVisible(boolean flag)
setVisible
in interface VisibleComponent
setVisible
in class AbstractFigure
Copyright © 2024 Central Laboratory of the Research Councils. All Rights Reserved.