Class ThumbnailVisualization
- java.lang.Object
-
- elki.visualization.visualizers.AbstractVisualization
-
- elki.visualization.visualizers.thumbs.ThumbnailVisualization
-
- All Implemented Interfaces:
DataStoreListener
,ResultListener
,VisualizationListener
,ThumbnailThread.Listener
,Visualization
,java.util.EventListener
public class ThumbnailVisualization extends AbstractVisualization implements ThumbnailThread.Listener, DataStoreListener, VisualizationListener
Thumbnail visualization.- Since:
- 0.4.0
- Author:
- Erich Schubert
-
-
Field Summary
Fields Modifier and Type Field Description protected ThumbnailThread.Task
pendingThumbnail
Pending redrawprivate SVGPlot
plot
Plot the thumbnail is in.private Projection
proj
Projection.private java.awt.image.BufferedImage
thumb
Our thumbnail (keep a reference to prevent garbage collection!)protected int
thumbid
The thumbnail id.protected int
tresolution
Thumbnail resolutionprotected VisFactory
visFactory
Visualizer factory-
Fields inherited from class elki.visualization.visualizers.AbstractVisualization
context, layer, svgp, task
-
-
Constructor Summary
Constructors Constructor Description ThumbnailVisualization(VisualizerContext context, VisFactory visFactory, VisualizationTask task, VisualizationPlot plot, double width, double height, Projection proj, int thumbsize)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
destroy()
Destroy the visualization.void
doThumbnail()
Callback when to (re-)compute the thumbnail.void
fullRedraw()
Perform a full redraw.org.w3c.dom.Element
getLayer()
Get the SVG layer of the given visualization.private void
refreshThumbnail()
void
resultChanged(java.lang.Object current)
Notify that the current result has changed substantially.void
visualizationChanged(VisualizationItem item)
Visualization has changed.-
Methods inherited from class elki.visualization.visualizers.AbstractVisualization
addListeners, contentChanged, getHeight, getWidth, incrementalRedraw
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface elki.database.datastore.DataStoreListener
contentChanged
-
Methods inherited from interface elki.result.ResultListener
resultAdded, resultRemoved
-
-
-
-
Field Detail
-
visFactory
protected final VisFactory visFactory
Visualizer factory
-
thumbid
protected int thumbid
The thumbnail id.
-
pendingThumbnail
protected ThumbnailThread.Task pendingThumbnail
Pending redraw
-
tresolution
protected int tresolution
Thumbnail resolution
-
thumb
private java.awt.image.BufferedImage thumb
Our thumbnail (keep a reference to prevent garbage collection!)
-
plot
private SVGPlot plot
Plot the thumbnail is in.
-
proj
private Projection proj
Projection.
-
-
Constructor Detail
-
ThumbnailVisualization
public ThumbnailVisualization(VisualizerContext context, VisFactory visFactory, VisualizationTask task, VisualizationPlot plot, double width, double height, Projection proj, int thumbsize)
Constructor.- Parameters:
context
- Visualizer contextvisFactory
- Visualizer Factory to usetask
- Task to useplot
- Plot to draw towidth
- Embedding widthheight
- Embedding heightproj
- Projectionthumbsize
- Thumbnail size
-
-
Method Detail
-
destroy
public void destroy()
Description copied from interface:Visualization
Destroy the visualization. Called after the elements have been removed from the document. Implementations should remove their listeners etc.- Specified by:
destroy
in interfaceVisualization
- Overrides:
destroy
in classAbstractVisualization
-
getLayer
public org.w3c.dom.Element getLayer()
Description copied from interface:Visualization
Get the SVG layer of the given visualization.- Specified by:
getLayer
in interfaceVisualization
- Overrides:
getLayer
in classAbstractVisualization
- Returns:
- layer
-
fullRedraw
public void fullRedraw()
Perform a full redraw.- Specified by:
fullRedraw
in interfaceVisualization
- Specified by:
fullRedraw
in classAbstractVisualization
-
doThumbnail
public void doThumbnail()
Description copied from interface:ThumbnailThread.Listener
Callback when to (re-)compute the thumbnail.- Specified by:
doThumbnail
in interfaceThumbnailThread.Listener
-
refreshThumbnail
private void refreshThumbnail()
-
resultChanged
public void resultChanged(java.lang.Object current)
Description copied from interface:ResultListener
Notify that the current result has changed substantially.- Specified by:
resultChanged
in interfaceResultListener
- Overrides:
resultChanged
in classAbstractVisualization
- Parameters:
current
- Result that has changed.
-
visualizationChanged
public void visualizationChanged(VisualizationItem item)
Description copied from interface:VisualizationListener
Visualization has changed.- Specified by:
visualizationChanged
in interfaceVisualizationListener
- Overrides:
visualizationChanged
in classAbstractVisualization
- Parameters:
item
- Changed visualization
-
-