public interface Figure extends VisibleComponent, UserObjectContainer
Yellow |
Modifier and Type | Method and Description |
---|---|
boolean |
contains(java.awt.geom.Point2D point)
Test whether this figure contains the point given.
|
java.awt.geom.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.
|
java.awt.geom.Point2D |
getOrigin()
Return the origin of the figure in the enclosing transform
context.
|
CanvasComponent |
getParent()
Return the parent of this figure.
|
java.awt.Shape |
getShape()
Get the outline shape of this figure.
|
java.lang.String |
getToolTipText()
Return the tooltip string for this figure, or null if the figure
does not have a tooltip.
|
boolean |
hit(java.awt.geom.Rectangle2D rectangle)
Test if this figure is "hit" by the given rectangle.
|
boolean |
intersects(java.awt.geom.Rectangle2D rectangle)
Test if this figure intersects the given rectangle.
|
void |
setInteractor(Interactor interactor)
Set the interactor of this figure.
|
void |
setParent(CanvasComponent canvasComponent)
Set the parent of this figure.
|
void |
setToolTipText(java.lang.String toolTipText)
Set the tooltip string for this figure.
|
void |
transform(java.awt.geom.AffineTransform affineTransform)
Transform the figure with the supplied transform.
|
void |
translate(double x,
double y)
Move the figure the indicated distance.
|
isVisible, paint, paint, setVisible
getTransformContext, repaint, repaint
getUserObject, setUserObject
boolean contains(java.awt.geom.Point2D point)
point
- The given pointjava.awt.geom.Rectangle2D getBounds()
Interactor getInteractor()
setInteractor(Interactor)
CanvasLayer getLayer()
java.awt.geom.Point2D getOrigin()
CanvasComponent getParent()
getParent
in interface CanvasComponent
setParent(CanvasComponent)
java.awt.Shape getShape()
java.lang.String getToolTipText()
setToolTipText(String)
boolean hit(java.awt.geom.Rectangle2D rectangle)
(This method would be better named hits, but the name hit is consistent with java.awt.Graphics2D.)
rectangle
- The rectangle to be checked.boolean intersects(java.awt.geom.Rectangle2D rectangle)
rectangle
- The rectangle to be checked.void setInteractor(Interactor interactor)
interactor
- The interactor.getInteractor()
void setParent(CanvasComponent canvasComponent)
canvasComponent
- The parent of the figure.getParent()
void setToolTipText(java.lang.String toolTipText)
toolTipText
- The tool tip text.getToolTipText()
void transform(java.awt.geom.AffineTransform affineTransform)
affineTransform
- The transform to be used.void translate(double x, double y)
x
- The x value to be moved.y
- The y value to be moved.