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 Figure
public CanvasLayer getLayer()
public Point2D getOrigin()
getOrigin
in interface Figure
getBounds()
public CanvasComponent getParent()
getParent
in interface CanvasComponent
getParent
in interface Figure
public abstract Shape getShape()
public TransformContext getTransformContext()
getTransformContext
in interface CanvasComponent
public String getToolTipText()
getToolTipText
in interface Figure
public Object getUserObject()
getUserObject
in interface UserObjectContainer
public boolean hit(Rectangle2D r)
public boolean intersects(Rectangle2D r)
intersects
in interface Figure
public boolean isVisible()
isVisible
in interface VisibleComponent
public abstract void paint(Graphics2D g)
paint
in interface VisibleComponent
public void paint(Graphics2D g, Rectangle2D r)
paint
in interface VisibleComponent
public void repaint()
repaint
in interface CanvasComponent
public void repaint(DamageRegion d)
repaint
in interface CanvasComponent
public void setInteractor(Interactor interactor)
setInteractor
in interface Figure
public void setParent(CanvasComponent fc)
public void setUserObject(Object o)
setUserObject
in interface UserObjectContainer
public void setToolTipText(String s)
setToolTipText
in interface Figure
public void setVisible(boolean flag)
setVisible
in interface VisibleComponent
public abstract void transform(AffineTransform at)
Copyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.