NV
- Type of the NumberVector being visualized.public class ToolBox2DVisualization<NV extends NumberVector<NV,?>> extends P2DVisualization<NV>
Modifier and Type | Class and Description |
---|---|
static class |
ToolBox2DVisualization.Factory<NV extends NumberVector<NV,?>>
Factory for visualizers for a toolbox
|
Modifier and Type | Field and Description |
---|---|
private Element |
container
The container
|
static String |
CSS_TOOL_BUTTON
CSS class for a tool button
|
static String |
CSS_TOOL_BUTTON_SELECTED
CSS class for a tool button
|
static String |
CSS_TOOL_CAPTION
CSS class for the tool button caption
|
private static Logging |
logger
The logger for this class.
|
private static String |
NAME
A short name characterizing this Visualizer.
|
proj, rel
context, layer, pendingRedraw, svgp, task
Constructor and Description |
---|
ToolBox2DVisualization(VisualizationTask task)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
private void |
addCSSClasses(SVGPlot svgp)
Adds the required CSS-Classes
|
private void |
addEventListener(Element tag,
VisualizationTask tool)
Add an event listener to the Element
|
private void |
buildToolBox()
Build the toolbox
|
void |
contextChanged(ContextChangedEvent e)
Method called on context changes (e.g. projection changes).
|
private void |
deleteChildren(Element container)
Deletes the children of the container
|
protected void |
handleMouseClick(VisualizationTask tool)
Handle the mouseClick - change the selected tool in the context
|
protected void |
redraw()
Perform a full redraw.
|
void |
resultAdded(Result child,
Result parent)
A new derived result was added.
|
void |
resultChanged(Result current)
Notify that the current result has changed substantially.
|
void |
resultRemoved(Result child,
Result parent)
A result was removed.
|
setupCanvas
destroy, getHeight, getLayer, getWidth, incrementalRedraw, synchronizedRedraw, testRedraw
private static final String NAME
private static final Logging logger
public static final String CSS_TOOL_BUTTON
public static final String CSS_TOOL_CAPTION
public static final String CSS_TOOL_BUTTON_SELECTED
private Element container
public ToolBox2DVisualization(VisualizationTask task)
task
- Taskpublic void contextChanged(ContextChangedEvent e)
ContextChangeListener
contextChanged
in interface ContextChangeListener
contextChanged
in class AbstractVisualization
e
- Change eventprotected void redraw()
AbstractVisualization
redraw
in class AbstractVisualization
private void deleteChildren(Element container)
container
- Element to delete childrenprivate void buildToolBox()
private void addCSSClasses(SVGPlot svgp)
svgp
- SVG-Plotprivate void addEventListener(Element tag, VisualizationTask tool)
tag
- Element to add the listenertool
- Tool represented by the Elementprotected void handleMouseClick(VisualizationTask tool)
tool
- Selected Toolpublic void resultAdded(Result child, Result parent)
ResultListener
resultAdded
in interface ResultListener
resultAdded
in class AbstractVisualization
child
- New child result addedparent
- Parent result that was added topublic void resultRemoved(Result child, Result parent)
ResultListener
resultRemoved
in interface ResultListener
resultRemoved
in class AbstractVisualization
child
- result that was removedparent
- Parent result that was removed frompublic void resultChanged(Result current)
ResultListener
resultChanged
in interface ResultListener
resultChanged
in class AbstractVisualization
current
- Result that has changed.