Class AbstractParallelVisualization<NV>
- java.lang.Object
-
- elki.visualization.visualizers.AbstractVisualization
-
- elki.visualization.visualizers.parallel.AbstractParallelVisualization<NV>
-
- Type Parameters:
NV
- Data type in relation
- All Implemented Interfaces:
DataStoreListener
,ResultListener
,VisualizationListener
,Visualization
,java.util.EventListener
- Direct Known Subclasses:
AxisReorderVisualization.Instance
,AxisVisibilityVisualization.Instance
,BoundingBoxVisualization.Instance
,ClusterOutlineVisualization.Instance
,ClusterParallelMeanVisualization.Instance
,LineVisualization.Instance
,ParallelAxisVisualization.Instance
,RTreeParallelVisualization.Instance
,SelectionAxisRangeVisualization.Instance
,SelectionLineVisualization.Instance
,SelectionToolAxisRangeVisualization.Instance
,SelectionToolLineVisualization.Instance
public abstract class AbstractParallelVisualization<NV> extends AbstractVisualization
Abstract base class for parallel visualizations.- Since:
- 0.5.0
- Author:
- Robert Rödler, Erich Schubert
-
-
Field Summary
Fields Modifier and Type Field Description protected double
axsep
Space between two axes(package private) double[]
margins
marginprotected ProjectionParallel
proj
The current projectionprotected Relation<NV>
relation
The representation we visualize(package private) double[]
size
viewbox size-
Fields inherited from class elki.visualization.visualizers.AbstractVisualization
context, layer, svgp, task
-
-
Constructor Summary
Constructors Constructor Description AbstractParallelVisualization(VisualizerContext context, VisualizationTask task, VisualizationPlot plot, double width, double height, Projection proj)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
fullRedraw()
Request a full redrawing of the visualization.protected double
getAxisSep()
Distance between axes.protected double
getMarginLeft()
protected double
getMarginTop()
protected double
getSizeX()
Get width of main canvas.protected double
getSizeY()
protected double
getVisibleAxisX(double d)
Get the position of visible axis dprivate void
recalcAxisPositions()
Recalculate axis positions, in particular after projection changes.org.w3c.dom.Element
setupCanvas(SVGPlot svgp, ProjectionParallel proj, double width, double height)
Utility function to setup a canvas element for the visualization.void
visualizationChanged(VisualizationItem item)
Visualization has changed.-
Methods inherited from class elki.visualization.visualizers.AbstractVisualization
addListeners, contentChanged, destroy, getHeight, getLayer, getWidth, incrementalRedraw, resultChanged
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface elki.result.ResultListener
resultAdded, resultRemoved
-
-
-
-
Field Detail
-
proj
protected final ProjectionParallel proj
The current projection
-
margins
final double[] margins
margin
-
axsep
protected double axsep
Space between two axes
-
size
final double[] size
viewbox size
-
-
Constructor Detail
-
AbstractParallelVisualization
public AbstractParallelVisualization(VisualizerContext context, VisualizationTask task, VisualizationPlot plot, double width, double height, Projection proj)
Constructor.- Parameters:
context
- Visualizer contexttask
- Visualization taskplot
- Plot to draw towidth
- Embedding widthheight
- Embedding heightproj
- Projection
-
-
Method Detail
-
fullRedraw
public void fullRedraw()
Description copied from interface:Visualization
Request a full redrawing of the visualization.- Specified by:
fullRedraw
in interfaceVisualization
- Specified by:
fullRedraw
in classAbstractVisualization
-
setupCanvas
public org.w3c.dom.Element setupCanvas(SVGPlot svgp, ProjectionParallel proj, double width, double height)
Utility function to setup a canvas element for the visualization.- Parameters:
svgp
- Plot elementproj
- Projection to usewidth
- Widthheight
- Height- Returns:
- wrapper element with appropriate view box.
-
getSizeX
protected double getSizeX()
Get width of main canvas.- Returns:
- Width
-
getSizeY
protected double getSizeY()
-
getMarginLeft
protected double getMarginLeft()
-
getMarginTop
protected double getMarginTop()
-
getAxisSep
protected double getAxisSep()
Distance between axes.- Returns:
- Axis separation
-
recalcAxisPositions
private void recalcAxisPositions()
Recalculate axis positions, in particular after projection changes.
-
getVisibleAxisX
protected double getVisibleAxisX(double d)
Get the position of visible axis d- Parameters:
d
- Visible axis number- Returns:
- Position
-
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
-
-