Class Tooltip

    • Field Detail

      • DEFAULT_DELAY

        public static final long DEFAULT_DELAY
        Default tooltip delay is 1000Lms
        See Also:
        Constant Field Values
    • Method Detail

      • stop

        public final boolean stop​(boolean clearForced)
        Stops the timer if not enforced via now() or clearForced is true.
        Parameters:
        clearForced - if true, also clears enforced flag set by now()
        Returns:
        true if timer has been stopped, otherwise false
      • start

        public final void start()
        Starts the timer.
      • now

        public final void now()
        Enforce tooltip display with next tick().
      • forced

        public final boolean forced()
        Returns true if display is enforced via now().
      • tick

        public final boolean tick()
        Send tick to this tooltip
        Returns:
        true if started timer has been reached or is enforced via now() to #createTip(PMVMatrix4f), otherwise false
      • getToolMvBounds

        public com.jogamp.math.geom.AABBox getToolMvBounds​(com.jogamp.math.util.PMVMatrix4f pmv)
        Little helper for createTip(Scene, AABBox) returning the Mv AABBox of the tool within Scene Mv space.

        Method uses getTool()

           return getTool().getBounds().transform(pmv.getMv(), new AABBox());
         

      • getTipMvPosition

        public com.jogamp.math.Vec2f getTipMvPosition​(Scene scene,
                                                      com.jogamp.math.util.PMVMatrix4f pmv,
                                                      float tipWidth,
                                                      float tipHeight)
        Little helper for createTip(Scene, AABBox) returning the Mv position of the tip within Scene Mv space.
      • getTipMvPosition

        public com.jogamp.math.Vec2f getTipMvPosition​(Scene scene,
                                                      com.jogamp.math.geom.AABBox toolMvBounds,
                                                      float tipWidth,
                                                      float tipHeight)
        Little helper for createTip(Scene, AABBox) returning the Mv position of the tip @ center within Scene Mv space.
      • getTipMvPosition

        public com.jogamp.math.Vec2f getTipMvPosition​(Scene scene,
                                                      com.jogamp.math.Vec3f toolMvPos,
                                                      float tipWidth,
                                                      float tipHeight)
        Little helper for createTip(Scene, AABBox) returning the Mv position of the tip @ center within Scene Mv space.
      • createTip

        public abstract Shape createTip​(Scene scene,
                                        com.jogamp.math.geom.AABBox toolMvBounds)
        Create a new HUD tip shape, usually called by Scene
        Parameters:
        scene - the Scene caller for which this HUD tip shape is created
        toolMvBounds - AABBox of the getTool() in model-view (Mv) space of the given Scene
        Returns:
        newly created HUD tip shape
        See Also:
        destroyTip(GL2ES2, RegionRenderer, Shape)