Class AbstractTooltipVisualization

    • Field Detail

      • TOOLTIP_HIDDEN

        public static final java.lang.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 java.lang.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 java.lang.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 java.lang.String TOOLTIP_AREA
        Generic tag to indicate the type of element. Used in IDs, CSS-Classes etc.
        See Also:
        Constant Field Values
      • hoverer

        org.w3c.dom.events.EventListener hoverer
        Our event listener.
    • Constructor Detail

      • AbstractTooltipVisualization

        public AbstractTooltipVisualization​(VisualizerContext context,
                                            VisualizationTask task,
                                            VisualizationPlot plot,
                                            double width,
                                            double height,
                                            Projection proj)
        Constructor.
        Parameters:
        context - Visualizer context
        task - Visualization task
        plot - Plot to draw to
        width - Embedding width
        height - Embedding height
        proj - Projection
    • Method Detail

      • makeTooltip

        protected abstract org.w3c.dom.Element makeTooltip​(DBIDRef id,
                                                           double x,
                                                           double y,
                                                           double dotsize)
        Make a tooltip Element for this id.
        Parameters:
        id - Id to make a tooltip for
        x - X position
        y - Y position
        dotsize - Size of a dot
        Returns:
        Element
      • handleHoverEvent

        protected void handleHoverEvent​(org.w3c.dom.events.Event evt)
        Handle the hover events.
        Parameters:
        evt - Event.
      • toggleTooltip

        protected void toggleTooltip​(org.w3c.dom.Element elem,
                                     java.lang.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.