|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdiva.canvas.interactor.BasicSelectionRenderer
public class BasicSelectionRenderer
A basic implementation of a selection renderer. This implementation wraps each selected figure in an instance of a FigureDecorator. The figure decorator is obtained by cloning a prototype decorator, accessible through the get/setFigureDecorator() methods. The default prototype is an instance of BasicHighlighter. Often, the prototype decorator will be set to instances of one of the Manipulator classes.
Field Summary | |
---|---|
private java.util.Hashtable |
_decorators
Mapping from figures to decorators |
private FigureDecorator |
_prototypeDecorator
The prototype decorator |
Constructor Summary | |
---|---|
BasicSelectionRenderer()
Create a new selection renderer with the default prototype decorator. |
|
BasicSelectionRenderer(FigureDecorator d)
Create a new renderer with the given prototype decorator. |
Method Summary | |
---|---|
FigureDecorator |
getDecorator()
Get the prototype decorator. |
boolean |
isRenderedSelected(Figure figure)
Test if the given figure is currently rendered selected. |
void |
renderDeselected(Figure figure)
Set the rendering of the figure as deselected. |
void |
renderSelected(Figure figure)
Set the rendering of the figure as selected. |
void |
setDecorator(FigureDecorator d)
Set the prototype decorator. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private java.util.Hashtable _decorators
private FigureDecorator _prototypeDecorator
Constructor Detail |
---|
public BasicSelectionRenderer()
public BasicSelectionRenderer(FigureDecorator d)
Method Detail |
---|
public FigureDecorator getDecorator()
public boolean isRenderedSelected(Figure figure)
isRenderedSelected
in interface SelectionRenderer
public void renderDeselected(Figure figure)
renderDeselected
in interface SelectionRenderer
public void renderSelected(Figure figure)
renderSelected
in interface SelectionRenderer
public void setDecorator(FigureDecorator d)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |