Class TooltipManager

java.lang.Object
com.codename1.ui.TooltipManager

public class TooltipManager extends Object
Central management for tooltips, this class can be derived/customized to override the default tooltip behavior.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    Default tooltip manager
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    Invoked to dispose the current tooltip when the pointer moves
    static void
    Enables the tooltip manager and default tooltip behavior
    static void
    Enables the tooltip manager with a custom subclass
    UIID of the tooltip dialog
    UIID of the tooltip text body
    int
    The time in milliseconds between the pointer stopping and the showing of the tooltip
    protected void
    Gets ready to show the tooltip, this method implements the delay before the actual showing of the tooltip.
    void
    setDialogUIID(String dialogUIID)
    UIID of the tooltip dialog
    void
    setTextUIID(String textUIID)
    UIID of the tooltip text body
    void
    setTooltipShowDelay(int tooltipShowDelay)
    The time in milliseconds between the pointer stopping and the showing of the tooltip
    protected void
    Shows the actual tooltip, this is invoked when the time for the tooltip elapses.

    Methods inherited from class Object

    clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    Modifier and Type
    Method
    Description
    protected Object
     
    boolean
    Indicates whether some other object is "equal to" this one.
    final Class
    Returns the runtime class of an object.
    int
    Returns a hash code value for the object.
    final void
    Wakes up a single thread that is waiting on this object's monitor.
    final void
    Wakes up all threads that are waiting on this object's monitor.
    Returns a string representation of the object.
    final void
    Causes current thread to wait until another thread invokes the method or the method for this object.
    final void
    wait(long timeout)
    Causes current thread to wait until either another thread invokes the method or the method for this object, or a specified amount of time has elapsed.
    final void
    wait(long timeout, int nanos)
    Causes current thread to wait until another thread invokes the method or the method for this object, or some other thread interrupts the current thread, or a certain amount of real time has elapsed.
  • Constructor Details

    • TooltipManager

      protected TooltipManager()
      Default tooltip manager
  • Method Details

    • enableTooltips

      public static void enableTooltips()
      Enables the tooltip manager and default tooltip behavior
    • enableTooltips

      public static void enableTooltips(TooltipManager custom)

      Enables the tooltip manager with a custom subclass

      Parameters
      • custom: customized subclass of this class
    • clearTooltip

      protected void clearTooltip()
      Invoked to dispose the current tooltip when the pointer moves
    • prepareTooltip

      protected void prepareTooltip(String tip, Component cmp)

      Gets ready to show the tooltip, this method implements the delay before the actual showing of the tooltip. It's invoked internally by the framework

      Parameters
      • tip: the tooltip text

      • cmp: the component

    • showTooltip

      protected void showTooltip(String tip, Component cmp)

      Shows the actual tooltip, this is invoked when the time for the tooltip elapses. It shows the tooltip UI immediately

      Parameters
      • tip: the tooltip text

      • cmp: the component

    • getTooltipShowDelay

      public int getTooltipShowDelay()

      The time in milliseconds between the pointer stopping and the showing of the tooltip

      Returns

      the tooltipShowDelay

    • setTooltipShowDelay

      public void setTooltipShowDelay(int tooltipShowDelay)

      The time in milliseconds between the pointer stopping and the showing of the tooltip

      Parameters
      • tooltipShowDelay: the tooltipShowDelay to set
    • getDialogUIID

      public String getDialogUIID()

      UIID of the tooltip dialog

      Returns

      the dialogUIID

    • setDialogUIID

      public void setDialogUIID(String dialogUIID)

      UIID of the tooltip dialog

      Parameters
      • dialogUIID: the dialogUIID to set
    • getTextUIID

      public String getTextUIID()

      UIID of the tooltip text body

      Returns

      the textUIID

    • setTextUIID

      public void setTextUIID(String textUIID)

      UIID of the tooltip text body

      Parameters
      • textUIID: the textUIID to set