public abstract class AbstractTooltipVisualization extends AbstractScatterplotVisualization implements DataStoreListener
Modifier and Type | Field and Description |
---|---|
(package private) EventListener |
hoverer
Our event listener.
|
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.
|
proj, rel, sample
context, layer, pendingRedraw, svgp, task
Constructor and Description |
---|
AbstractTooltipVisualization(VisualizationTask task)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
handleHoverEvent(Event evt)
Handle the hover events.
|
protected abstract Element |
makeTooltip(DBIDRef id,
double x,
double y,
double dotsize)
Make a tooltip Element for this id.
|
void |
redraw()
Perform a full redraw.
|
void |
resultChanged(Result current)
Notify that the current result has changed substantially.
|
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.
|
setupCanvas
contentChanged, destroy, getHeight, getLayer, getWidth, incrementalRedraw, resultAdded, resultRemoved, synchronizedRedraw
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
contentChanged
public static final String TOOLTIP_HIDDEN
public static final String TOOLTIP_VISIBLE
public static final String TOOLTIP_STICKY
public static final String TOOLTIP_AREA
EventListener hoverer
public AbstractTooltipVisualization(VisualizationTask task)
task
- Visualization taskpublic void redraw()
AbstractVisualization
redraw
in class AbstractVisualization
protected abstract Element makeTooltip(DBIDRef id, double x, double y, double dotsize)
id
- Id to make a tooltip forx
- X positiony
- Y positiondotsize
- Size of a dotprotected void handleHoverEvent(Event evt)
evt
- Event.protected void toggleTooltip(Element elem, String type)
elem
- Elementtype
- Event typeprotected abstract void setupCSS(SVGPlot svgp)
svgp
- the SVGPlot to register the Tooltip-CSS-Class.public void resultChanged(Result current)
ResultListener
resultChanged
in interface ResultListener
resultChanged
in class AbstractScatterplotVisualization
current
- Result that has changed.