de.lmu.ifi.dbs.elki.visualization.visualizers.vis2d
Class AbstractTooltipVisualization<NV extends NumberVector<NV,?>>

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.visualization.visualizers.AbstractVisualization
      extended by de.lmu.ifi.dbs.elki.visualization.visualizers.vis2d.P2DVisualization<NV>
          extended by de.lmu.ifi.dbs.elki.visualization.visualizers.vis2d.AbstractTooltipVisualization<NV>
Type Parameters:
NV - Number Vector
All Implemented Interfaces:
DataStoreListener, ResultListener, ContextChangeListener, Visualization, EventListener
Direct Known Subclasses:
TooltipScoreVisualization, TooltipStringVisualization

public abstract class AbstractTooltipVisualization<NV extends NumberVector<NV,?>>
extends P2DVisualization<NV>
implements DataStoreListener

General base class for a tooltip visualizer.


Field Summary
static String TOOLTIP_AREA
          Generic tag to indicate the type of element.
static String TOOLTIP_HIDDEN
          Generic tag to indicate the type of element.
static String TOOLTIP_STICKY
          Generic tag to indicate the type of element.
static String TOOLTIP_VISIBLE
          Generic tag to indicate the type of element.
 
Fields inherited from class de.lmu.ifi.dbs.elki.visualization.visualizers.vis2d.P2DVisualization
proj, rel
 
Fields inherited from class de.lmu.ifi.dbs.elki.visualization.visualizers.AbstractVisualization
context, layer, pendingRedraw, svgp, task
 
Constructor Summary
AbstractTooltipVisualization(VisualizationTask task)
           
 
Method Summary
 void contentChanged(DataStoreEvent e)
          Invoked after objects of the datastore have been updated, inserted or removed in some way.
 void destroy()
          Destroy the visualization.
protected  void handleHoverEvent(Event evt)
          Handle the hover events.
protected abstract  Element makeTooltip(DBID id, double x, double y, double dotsize)
           
 void redraw()
          Perform a full redraw.
protected abstract  void setupCSS(SVGPlot svgp)
          Registers the Tooltip-CSS-Class at a SVGPlot.
protected  void toggleTooltip(Element elem, String type)
          Toggle the Tooltip of an element.
 
Methods inherited from class de.lmu.ifi.dbs.elki.visualization.visualizers.vis2d.P2DVisualization
setupCanvas
 
Methods inherited from class de.lmu.ifi.dbs.elki.visualization.visualizers.AbstractVisualization
contextChanged, getHeight, getLayer, getWidth, incrementalRedraw, resultAdded, resultChanged, resultRemoved, synchronizedRedraw, testRedraw
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TOOLTIP_HIDDEN

public static final String TOOLTIP_HIDDEN
Generic tag to indicate the type of element. Used in IDs, CSS-Classes etc.

See Also:
Constant Field Values

TOOLTIP_VISIBLE

public static final String TOOLTIP_VISIBLE
Generic tag to indicate the type of element. Used in IDs, CSS-Classes etc.

See Also:
Constant Field Values

TOOLTIP_STICKY

public static final String TOOLTIP_STICKY
Generic tag to indicate the type of element. Used in IDs, CSS-Classes etc.

See Also:
Constant Field Values

TOOLTIP_AREA

public static final String TOOLTIP_AREA
Generic tag to indicate the type of element. Used in IDs, CSS-Classes etc.

See Also:
Constant Field Values
Constructor Detail

AbstractTooltipVisualization

public AbstractTooltipVisualization(VisualizationTask task)
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 interface Visualization
Overrides:
destroy in class AbstractVisualization

redraw

public void redraw()
Description copied from class: AbstractVisualization
Perform a full redraw.

Specified by:
redraw in class AbstractVisualization

makeTooltip

protected abstract Element makeTooltip(DBID id,
                                       double x,
                                       double y,
                                       double dotsize)

handleHoverEvent

protected void handleHoverEvent(Event evt)
Handle the hover events.

Parameters:
evt - Event.

toggleTooltip

protected void toggleTooltip(Element elem,
                             String type)
Toggle the Tooltip of an element.

Parameters:
elem - Element
type - Event type

setupCSS

protected abstract void setupCSS(SVGPlot svgp)
Registers the Tooltip-CSS-Class at a SVGPlot.

Parameters:
svgp - the SVGPlot to register the Tooltip-CSS-Class.

contentChanged

public void contentChanged(DataStoreEvent e)
Description copied from interface: DataStoreListener
Invoked after objects of the datastore have been updated, inserted or removed in some way.

Specified by:
contentChanged in interface DataStoreListener
Parameters:
e - the update event

Release 0.4.0 (2011-09-20_1324)