public class AnimationRenderer extends java.lang.Object implements SelectionRenderer
This class is fashioned after BasicSelectionRenderer, but differs in that it ensures that selection and deselection occurs in the event thread. Also, it highlights objects in red rather than yellow.
Modifier and Type | Field and Description |
---|---|
protected FigureDecorator |
_prototypeDecorator
The prototype decorator.
|
Constructor and Description |
---|
AnimationRenderer()
Create a new selection renderer with the default prototype
decorator.
|
AnimationRenderer(java.awt.Color color)
Create a new selection renderer with the default prototype
decorator using the specified color.
|
AnimationRenderer(java.awt.Color color,
float halo)
Create a new selection renderer with the default prototype
decorator using the specified color and halo size.
|
AnimationRenderer(java.awt.Color color,
java.awt.Stroke stroke)
Create a new selection renderer with the default prototype
decorator using the specified color and stroke.
|
AnimationRenderer(FigureDecorator decorator)
Create a new renderer with the given prototype decorator.
|
Modifier and Type | Method and Description |
---|---|
FigureDecorator |
getDecorator()
Get the prototype decorator.
|
boolean |
isRenderedSelected(Figure figure)
Test whether the given figure is currently rendered highlighted.
|
void |
renderDeselected(Figure figure)
Set the rendering of the figure to not be highlighted.
|
void |
renderSelected(Figure figure)
Set the rendering of the figure as highlighted.
|
void |
setDecorator(FigureDecorator decorator)
Set the prototype decorator.
|
protected FigureDecorator _prototypeDecorator
public AnimationRenderer()
public AnimationRenderer(java.awt.Color color)
color
- The color for the highlight.public AnimationRenderer(java.awt.Color color, float halo)
color
- The color for the highlight.halo
- The halo size.public AnimationRenderer(java.awt.Color color, java.awt.Stroke stroke)
color
- The color for the highlight.stroke
- The stroke for the highlight.public AnimationRenderer(FigureDecorator decorator)
decorator
- The prototype decorator.public FigureDecorator getDecorator()
setDecorator(FigureDecorator)
public boolean isRenderedSelected(Figure figure)
isRenderedSelected
in interface SelectionRenderer
figure
- The figure that may be highlighted.public void renderDeselected(Figure figure)
renderDeselected
in interface SelectionRenderer
figure
- The figure to deselect.public void renderSelected(Figure figure)
renderSelected
in interface SelectionRenderer
figure
- The figure to highlight.public void setDecorator(FigureDecorator decorator)
decorator
- The prototype decorator.getDecorator()