public abstract class AbstractFigure extends Object implements Figure
| Constructor and Description |
|---|
AbstractFigure() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(Point2D p)
Test whether this figure contains the point given.
|
Rectangle2D |
getBounds()
Get the bounding box of this figure.
|
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 figure in the enclosing transform
context, which in this base class is the center of the bounds
returned by getBounds().
|
CanvasComponent |
getParent()
Return the parent of this figure.
|
abstract Shape |
getShape()
Get the outline shape of this figure.
|
String |
getToolTipText()
Return the tooltip string for this figure, or null if the figure
does not have a tooltip.
|
TransformContext |
getTransformContext()
Return the transform context of the figure.
|
Object |
getUserObject()
Get the user object of this figure.
|
boolean |
hit(Rectangle2D r)
Test if this figure intersects the given rectangle, and the
interior of the figure is not transparent to hits.
|
boolean |
intersects(Rectangle2D r)
Test if this figure intersects the given rectangle.
|
boolean |
isVisible()
Test the visibility flag of this figure.
|
abstract void |
paint(Graphics2D g)
Paint the figure.
|
void |
paint(Graphics2D g,
Rectangle2D r)
Repaint the figure in the given rectangle.
|
void |
repaint()
Schedule a repaint of the figure.
|
void |
repaint(DamageRegion d)
Schedule a repaint of the figure within the given damage
region.
|
void |
setInteractor(Interactor interactor)
Set the interactor of this figure.
|
void |
setParent(CanvasComponent fc)
Set the parent of this figure.
|
void |
setToolTipText(String s)
Set the tooltip string for this figure.
|
void |
setUserObject(Object o)
Set the user object.
|
void |
setVisible(boolean flag)
Set the visibility flag of this figure.
|
abstract 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)
public Rectangle2D getBounds()
public Interactor getInteractor()
getInteractor in interface Figurepublic CanvasLayer getLayer()
public Point2D getOrigin()
getOrigin in interface FiguregetBounds()public CanvasComponent getParent()
getParent in interface CanvasComponentgetParent in interface Figurepublic abstract Shape getShape()
public TransformContext getTransformContext()
getTransformContext in interface CanvasComponentpublic String getToolTipText()
getToolTipText in interface Figurepublic Object getUserObject()
getUserObject in interface UserObjectContainerpublic boolean hit(Rectangle2D r)
public boolean intersects(Rectangle2D r)
intersects in interface Figurepublic boolean isVisible()
isVisible in interface VisibleComponentpublic abstract void paint(Graphics2D g)
paint in interface VisibleComponentpublic void paint(Graphics2D g, Rectangle2D r)
paint in interface VisibleComponentpublic void repaint()
repaint in interface CanvasComponentpublic void repaint(DamageRegion d)
repaint in interface CanvasComponentpublic void setInteractor(Interactor interactor)
setInteractor in interface Figurepublic void setParent(CanvasComponent fc)
public void setUserObject(Object o)
setUserObject in interface UserObjectContainerpublic void setToolTipText(String s)
setToolTipText in interface Figurepublic void setVisible(boolean flag)
setVisible in interface VisibleComponentpublic abstract void transform(AffineTransform at)
Copyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.