Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

de.lmu.ifi.dbs.elki.visualization.gui.overview
Class VisualizationInfo

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.visualization.gui.overview.VisualizationInfo
Direct Known Subclasses:
VisualizationLabel, VisualizationProjectedInfo, VisualizationUnprojectedInfo

abstract class VisualizationInfo
extends Object

Class representing a single visualization on the screen.

Author:
Erich Schubert

Field Summary
protected  double height
          Height
protected  File thumbnail
          Thumbnail reference.
protected  double width
          Width
 
Constructor Summary
VisualizationInfo(double width, double height)
          Constructor.
 
Method Summary
abstract  Element build(SVGPlot plot, double width, double height)
          Build (render) the visualization into an SVG tree.
(package private)  File generateThumbnail(Thumbnailer t, int uwidth)
          Generate a thumbnail for this visualization.
protected  double getHeight()
          Get the height
(package private)  File getThumbnailIfGenerated()
          Access the existing thumbnail, or null.
protected abstract  Visualizer getVisualization()
           
protected  double getWidth()
          Get the width
 boolean hasDetails()
          Test whether a detail view is available.
 boolean isVisible()
          Test whether the visualization is set to be visible.
 Element makeElement(SVGPlot plot)
          Make an element for this visualization.
 boolean thumbnailEnabled()
          Test whether a thumbnail is needed for this visualization.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

thumbnail

protected File thumbnail
Thumbnail reference.


width

protected double width
Width


height

protected double height
Height

Constructor Detail

VisualizationInfo

public VisualizationInfo(double width,
                         double height)
Constructor.

Parameters:
width - Width
height - Height
Method Detail

build

public abstract Element build(SVGPlot plot,
                              double width,
                              double height)
Build (render) the visualization into an SVG tree.

Parameters:
plot - SVG plot context (factory)
width - Canvas width
height - Canvas height
Returns:
SVG subtree

getThumbnailIfGenerated

File getThumbnailIfGenerated()
Access the existing thumbnail, or null.

Returns:
Thumbnail for this plot.

generateThumbnail

File generateThumbnail(Thumbnailer t,
                       int uwidth)
Generate a thumbnail for this visualization. This will also update the internal thumbnail reference, so the thumbnail can be accessed again via getThumbnailIfGenerated().

Parameters:
t - Thumbnailer to use
uwidth - Thumbnail width
Returns:
File reference of new thumbnail

getVisualization

protected abstract Visualizer getVisualization()

thumbnailEnabled

public boolean thumbnailEnabled()
Test whether a thumbnail is needed for this visualization.

Returns:
Whether or not to generate a thumbnail.

hasDetails

public boolean hasDetails()
Test whether a detail view is available.

Returns:
Whether or not a detail view is available.

isVisible

public boolean isVisible()
Test whether the visualization is set to be visible.

Returns:
Whether or not to show this visualization.

makeElement

public Element makeElement(SVGPlot plot)
Make an element for this visualization.

Parameters:
plot - Plot to insert into
Returns:
SVG Element

getWidth

protected double getWidth()
Get the width

Returns:
the width

getHeight

protected double getHeight()
Get the height

Returns:
the height

Release 0.3 (2010-03-31_1612)