public class BasicHighlighter extends FigureDecorator
Constructor and Description |
---|
BasicHighlighter()
Create a new highlighter with a default paint and "halo"
|
BasicHighlighter(java.awt.Paint paint,
float halo)
Create a new highlighter with the given paint and "halo"
|
BasicHighlighter(java.awt.Paint paint,
float halo,
java.awt.Composite composite)
Create a new highlighter with the given paint, "halo,"
and compositing operation.
|
BasicHighlighter(java.awt.Paint paint,
float halo,
java.awt.Composite composite,
java.awt.Stroke stroke)
Create a new highlighter with the given paint, "halo,"
compositing operation, and stroke.
|
Modifier and Type | Method and Description |
---|---|
java.awt.geom.Rectangle2D |
getBounds()
Get the bounds.
|
java.awt.Composite |
getComposite()
Get the composite.
|
float |
getHalo()
Get the halo.
|
java.awt.Paint |
getPaint()
Get the paint.
|
java.awt.Stroke |
getStroke()
Get the stroke.
|
boolean |
hit(java.awt.geom.Rectangle2D region)
Return false.
|
FigureDecorator |
newInstance(Figure f)
Create a new instance of this highlighter.
|
void |
paint(java.awt.Graphics2D g)
Paint the figure.
|
void |
repaint()
Request a repaint of the figure and highlight.
|
void |
repaint(DamageRegion d)
Receive repaint notification.
|
add, contains, figures, figuresFromBack, figuresFromFront, getChild, getContainer, getDecoratedFigure, getFigureCount, getShape, remove, replaceChild, setChild, transform, translate
decorate, pick, pick, undecorate
contains, getInteractor, getLayer, getOrigin, getParent, getToolTipText, getTransformContext, getUserObject, intersects, isVisible, paint, setInteractor, setParent, setToolTipText, setUserObject, setVisible
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isVisible, paint, setVisible
getParent, getTransformContext
public BasicHighlighter()
public BasicHighlighter(java.awt.Paint paint, float halo)
public BasicHighlighter(java.awt.Paint paint, float halo, java.awt.Composite composite)
public BasicHighlighter(java.awt.Paint paint, float halo, java.awt.Composite composite, java.awt.Stroke stroke)
public java.awt.Composite getComposite()
public java.awt.geom.Rectangle2D getBounds()
getBounds
in interface Figure
getBounds
in class FigureDecorator
public float getHalo()
public java.awt.Paint getPaint()
public java.awt.Stroke getStroke()
public boolean hit(java.awt.geom.Rectangle2D region)
hit
in interface Figure
hit
in class FigureDecorator
region
- The rectangle to be checked.public FigureDecorator newInstance(Figure f)
newInstance
in class FigureDecorator
public void paint(java.awt.Graphics2D g)
paint
in interface VisibleComponent
paint
in class FigureDecorator
g
- The 2D graphics object that this object
it to be painted upon.public void repaint(DamageRegion d)
repaint
in interface CanvasComponent
repaint
in class AbstractFigureContainer
d
- The region where a repaint has occurred.public void repaint()
repaint
in interface CanvasComponent
repaint
in class AbstractFigure