public abstract class AbstractVisualization extends Object implements Visualization, ResultListener
Modifier and Type | Field and Description |
---|---|
protected VisualizerContext |
context
Our context
|
protected Element |
layer
Layer storage
|
protected Runnable |
pendingRedraw
Pending redraw
|
protected SVGPlot |
svgp
The plot we are attached to
|
protected VisualizationTask |
task
The visualization task we do.
|
Constructor and Description |
---|
AbstractVisualization(VisualizationTask task)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
contentChanged(DataStoreEvent e)
Default implementation for
DataStoreListener.contentChanged(de.lmu.ifi.dbs.elki.database.datastore.DataStoreEvent)
Not enabled or used by default, but saves redundant code. |
void |
destroy()
Destroy the visualization.
|
protected double |
getHeight()
Get the height
|
Element |
getLayer()
Get the SVG layer of the given visualization.
|
protected double |
getWidth()
Get the width
|
protected void |
incrementalRedraw()
Redraw the visualization (maybe incremental).
|
protected abstract 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.
|
protected void |
synchronizedRedraw()
Trigger a redraw, but avoid excessive redraws.
|
protected final VisualizationTask task
protected final VisualizerContext context
protected final SVGPlot svgp
protected Runnable pendingRedraw
protected Element layer
public AbstractVisualization(VisualizationTask task)
task
- Visualization taskpublic void destroy()
Visualization
destroy
in interface Visualization
public Element getLayer()
Visualization
getLayer
in interface Visualization
protected double getWidth()
protected double getHeight()
protected final void synchronizedRedraw()
protected void incrementalRedraw()
protected abstract void redraw()
public void resultAdded(Result child, Result parent)
ResultListener
resultAdded
in interface ResultListener
child
- New child result addedparent
- Parent result that was added topublic void resultChanged(Result current)
ResultListener
resultChanged
in interface ResultListener
current
- Result that has changed.public void resultRemoved(Result child, Result parent)
ResultListener
resultRemoved
in interface ResultListener
child
- result that was removedparent
- Parent result that was removed frompublic void contentChanged(DataStoreEvent e)
DataStoreListener.contentChanged(de.lmu.ifi.dbs.elki.database.datastore.DataStoreEvent)
Not enabled or used by default, but saves redundant code.e
- Data store event