Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.gwtext.client.widgets
Class QuickTips

    java.lang.Object
      com.gwtext.client.widgets.QuickTips

    public class QuickTips

extends java.lang.Object

Provides attractive and customizable tooltips for any element. The QuickTips singleton is used to configure and manage tooltips globally for multiple elements in a generic manner. To create individual tooltips with maximum customizability, you should consider either `Tip` or `ToolTip`.

Quicktips can be configured via tag attributes directly in markup, or by registering quick tips programmatically via the register method.

The singleton's instance of `QuickTip` is available via `getQuickTip()`, and supports all the methods, and all the all the configuration properties of `QuickTip`. These settings will apply to all tooltips shown by the singleton.

To register a quick tip in markup, you simply add one or more of the valid QuickTip attributes prefixed with the ext: namespace. The HTML element itself is automatically set as the quick tip target. Here is the summary of supported attributes (optional unless otherwise noted):

- hide: Specifying "user" is equivalent to setting autoHide = false. Any other value will be the same as autoHide = true.
- qclass: A CSS class to be applied to the quick tip (equivalent to the 'cls' target element config).
- qtip (required): The quick tip text (equivalent to the 'text' target element config).
- qtitle: The quick tip title (equivalent to the 'title' target element config).
- qwidth: The quick tip width (equivalent to the 'width' target element config).

Here is an example of configuring an HTML element to display a tooltip from markup:

     // Add a quick tip to an HTML button
     <input type="button" value="OK" ext:qtitle="OK Button" ext:qwidth="100" ext:qtip="This is a quick tip from markup!"></input>

Constructor Summary
`QuickTips()`

Method Summary
`static void` | `disable()` Disable this quick tip.
`static void` | `enable()` Enable this quick tip.
`static QuickTip` | `getQuickTip()` Gets the global QuickTips instance.
`static void` | `init()` Initialize and enable QuickTips for first use.
`static boolean` | `isEnabled()` Returns true if the quick tip is enabled, else false.
`void` | `register(com.google.gwt.user.client.Element element, QuickTipsConfig config)` Configures a new quick tip instance and assigns it to a target element.
`void` | `register(java.lang.String id, QuickTipsConfig config)` Configures a new quick tip instance and assigns it to a target element.
`void` | `unregister(com.google.gwt.user.client.Element element)` Removes any registered quick tip from the target element and destroys it.
`void` | `unregister(java.lang.String elementID)` Removes any registered quick tip from the target element and destroys it.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### QuickTips

    public QuickTips()

Method Detail

### disable

    public static void disable()

  Disable this quick tip.

### enable

    public static void enable()

  Enable this quick tip.

### getQuickTip

    public static QuickTip getQuickTip()

  Gets the global QuickTips instance.

  Returns:
    the global QuickTips instance.

### init

    public static void init()

  Initialize and enable QuickTips for first use. This should be called once before the first attempt to access or display QuickTips in a page.

### isEnabled

    public static boolean isEnabled()

  Returns true if the quick tip is enabled, else false.

  Returns:
    true if enabled

### register

    public void register(java.lang.String id,
                         QuickTipsConfig config)

  Configures a new quick tip instance and assigns it to a target element.

  Parameters:
    `id` - target element id
    `config` - the config

### register

    public void register(com.google.gwt.user.client.Element element,
                         QuickTipsConfig config)

  Configures a new quick tip instance and assigns it to a target element.

  Parameters:
    `element` - the target element
    `config` - the quick tip config

### unregister

    public void unregister(java.lang.String elementID)

  Removes any registered quick tip from the target element and destroys it.

  Parameters:
    `elementID` - the element ID

### unregister

    public void unregister(com.google.gwt.user.client.Element element)

  Removes any registered quick tip from the target element and destroys it.

  Parameters:
    `element` - the element

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD