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.core
Class Ext

    java.lang.Object
      com.gwtext.client.core.Ext

    public class Ext

extends java.lang.Object

Ext core utilities and functions.

Constructor Summary
`Ext()`

Method Summary
`static void` | `debugger()` Utility method to kick up Javascript debugger.
`static void` | `destroy(Component component)` Attempts to destroy the component passed to it by removing all event listeners, removing them from the DOM (if applicable) and calling their destroy functions (if available).
`static void` | `destroy(ExtElement element)` Attempts to destroy the objects by removing all event listeners, removing them from the DOM (if applicable) and calling their destroy functions (if available).
`static void` | `disableFirebug()` Disable firebug.
`static java.lang.String` | `escapeRe(java.lang.String str)` Escapes the passed string for use in a regular expression.
`static ExtElement` | `fly(com.google.gwt.user.client.Element element)` Gets the globally shared flyweight ExtElement, with the passed node as the active element.
`static ExtElement` | `fly(com.google.gwt.user.client.Element element, java.lang.String named)` Gets the globally shared flyweight ExtElement, with the passed node as the active element.
`static ExtElement` | `fly(java.lang.String id)` Gets the globally shared flyweight ExtElement, with the passed node as the active element.
`static ExtElement` | `fly(java.lang.String id, java.lang.String named)` Gets the globally shared flyweight ExtElement, with the passed node as the active element.
`static java.lang.String` | `generateId()` Generates unique ids.
`static java.lang.String` | `generateId(java.lang.String prefix)` Generates unique ids.
`static ExtElement` | `get(com.google.gwt.user.client.Element element)` Method to retrieve Element objects.
`static ExtElement` | `get(java.lang.String id)` Method to retrieve Element objects.
`static ExtElement` | `getBody()` Returns the current document body as an`ExtElement`.
`static Component` | `getCmp(com.google.gwt.user.client.Element element)` Returns a component that the passed element represents.
`static Component` | `getCmp(ExtElement element)` Returns a component that the passed element represents.
`static Component` | `getCmp(java.lang.String id)` Returns a component by id.
`static ExtElement` | `getDoc()` Returns the current HTML document object as an `ExtElement`.
`static boolean` | `isAir()`
`static boolean` | `isBorderBox()`
`static boolean` | `isEnableGarbageCollector()` Returns is Garbage Collector is enabled.
`static boolean` | `isEnableListenerCollection()` Retruns true if listener collection is true.
`static boolean` | `isFirebug()` Return true if Firebug is enabled.
`static boolean` | `isGecko()`
`static boolean` | `isIE()`
`static boolean` | `isIE6()`
`static boolean` | `isIE7()`
`static boolean` | `isLinux()`
`static boolean` | `isMac()`
`static boolean` | `isOpera()`
`static boolean` | `isReady()`
`static boolean` | `isSafari()`
`static boolean` | `isSafari2()`
`static boolean` | `isSafari3()`
`static boolean` | `isSecure()`
`static boolean` | `isStrict()`
`static boolean` | `isUseShims()`
`static boolean` | `isWindows()`
`static void` | `onReady(Function cb)` Fires when the document is ready (before onload and before images are loaded).
`static void` | `setEnableGarbageCollector(boolean enableGarbageCollector)` True to automatically uncache orphaned Ext.Elements periodically (defaults to true).
`static void` | `setEnableListenerCollection(boolean enableListenerCollection)` True to automatically purge event listeners after uncaching an element (defaults to false).
`static void` | `setSslSecureUrl(java.lang.String url)` URL to a blank file used by Ext when in secure mode for iframe src and onReady src to prevent the IE insecure content warning (defaults to javascript:false).
`static void` | `setUseShims(boolean useShims)` By default, Ext intelligently decides whether floating elements should be shimmed.

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

Constructor Detail

### Ext

    public Ext()

Method Detail

### setSslSecureUrl

    public static void setSslSecureUrl(java.lang.String url)

  URL to a blank file used by Ext when in secure mode for iframe src and onReady src to prevent the IE insecure content warning (defaults to javascript:false).

  Parameters:
    `url` - the url

### setEnableGarbageCollector

    public static void setEnableGarbageCollector(boolean enableGarbageCollector)

  True to automatically uncache orphaned Ext.Elements periodically (defaults to true).

  Parameters:
    `enableGarbageCollector` - true to enable GC

### isEnableGarbageCollector

    public static boolean isEnableGarbageCollector()

  Returns is Garbage Collector is enabled.

  Returns:
    true if GC enabled

### setEnableListenerCollection

    public static void setEnableListenerCollection(boolean enableListenerCollection)

  True to automatically purge event listeners after uncaching an element (defaults to false). Note: this only happens if enableGarbageCollector is true.

  Parameters:
    `enableListenerCollection` - true to enable listener collection

### isEnableListenerCollection

    public static boolean isEnableListenerCollection()

  Retruns true if listener collection is true.

  Returns:
    true if listener collection is enabled

### isBorderBox

    public static boolean isBorderBox()

  Returns:
    true if bodex box

### isGecko

    public static boolean isGecko()

  Returns:
    true if Gecko broswer

### isIE

    public static boolean isIE()

  Returns:
    true if IE

### isIE6

    public static boolean isIE6()

  Returns:
    true if IE6

### isIE7

    public static boolean isIE7()

  Returns:
    true if IE7

### isLinux

    public static boolean isLinux()

  Returns:
    true if Linux OS

### isMac

    public static boolean isMac()

  Returns:
    true if Mac

### isAir

    public static boolean isAir()

  Returns:
    true if running under Adobe AIR

### isOpera

    public static boolean isOpera()

  Returns:
    true if Opera

### isReady

    public static boolean isReady()

  Returns:
    true when the document is fully initialized and ready for action

### isSafari

    public static boolean isSafari()

  Returns:
    true if Safari

### isSafari2

    public static boolean isSafari2()

  Returns:
    true if Safari 2

### isSafari3

    public static boolean isSafari3()

  Returns:
    true if Safari 2

### isSecure

    public static boolean isSecure()

  Returns:
    true if the page is running over SSL

### isStrict

    public static boolean isStrict()

  Returns:
    true if the browser is in strict mode

### isWindows

    public static boolean isWindows()

  Returns:
    true if Windows OS

### setUseShims

    public static void setUseShims(boolean useShims)

  By default, Ext intelligently decides whether floating elements should be shimmed. If you are using flash, you may want to set this to true.

  Parameters:
    `useShims` - true to use shims

### isUseShims

    public static boolean isUseShims()

  Returns:
    true if use shims.

### escapeRe

    public static java.lang.String escapeRe(java.lang.String str)

  Escapes the passed string for use in a regular expression.

  Parameters:
    `str` - the String to escape
  Returns:
    escaped String

### get

    public static ExtElement get(java.lang.String id)

  Method to retrieve Element objects. Uses simple caching to consistently return the same object. Automatically fixes if an object was recreated with the same id via AJAX or DOM.

  Parameters:
    `id` - element ID
  Returns:
    the element

### get

    public static ExtElement get(com.google.gwt.user.client.Element element)

  Method to retrieve Element objects. Uses simple caching to consistently return the same object. Automatically fixes if an object was recreated with the same id via AJAX or DOM.

  Parameters:
    `element` - the element
  Returns:
    the element

### destroy

    public static void destroy(ExtElement element)

  Attempts to destroy the objects by removing all event listeners, removing them from the DOM (if applicable) and calling their destroy functions (if available).

  Parameters:
    `element` - the element to destroy

### destroy

    public static void destroy(Component component)

  Attempts to destroy the component passed to it by removing all event listeners, removing them from the DOM (if applicable) and calling their destroy functions (if available).

  Parameters:
    `component` - the component to destroy

### getDoc

    public static ExtElement getDoc()

  Returns the current HTML document object as an `ExtElement`.

  Returns:
    the document

### getBody

    public static ExtElement getBody()

  Returns the current document body as an`ExtElement`.

  Returns:
    the document body

### getCmp

    public static Component getCmp(java.lang.String id)

  Returns a component by id. Shorthand for `ComponentMgr.getComponent(String)`.

  Parameters:
    `id` - the component ID
  Returns:
    the Component

### getCmp

    public static Component getCmp(com.google.gwt.user.client.Element element)

  Returns a component that the passed element represents. Shorthand for `ComponentMgr.getComponent(Element)`.

  Parameters:
    `element` - the component's element
  Returns:
    the Component

### getCmp

    public static Component getCmp(ExtElement element)

  Returns a component that the passed element represents. Shorthand for `ComponentMgr.getComponent(ExtElement)`.

  Parameters:
    `element` - the component's element
  Returns:
    the Component

### fly

    public static ExtElement fly(java.lang.String id)

  Gets the globally shared flyweight ExtElement, with the passed node as the active element. Do not store a reference to this element - the dom node can be overwritten by other code.

  Parameters:
    `id` - the element ID
  Returns:
    the ExtElement

### fly

    public static ExtElement fly(java.lang.String id,
                                 java.lang.String named)

  Gets the globally shared flyweight ExtElement, with the passed node as the active element. Do not store a reference to this element - the dom node can be overwritten by other code.

  Parameters:
    `id` - the element ID
    `named` - allows for creation of named reusable flyweights to prevent conflicts (e.g. internally Ext uses "_internal")
  Returns:
    the ExtElement

### fly

    public static ExtElement fly(com.google.gwt.user.client.Element element)

  Gets the globally shared flyweight ExtElement, with the passed node as the active element. Do not store a reference to this element - the dom node can be overwritten by other code.

  Parameters:
    `element` - the element
  Returns:
    the ExtElement

### fly

    public static ExtElement fly(com.google.gwt.user.client.Element element,
                                 java.lang.String named)

  Gets the globally shared flyweight ExtElement, with the passed node as the active element. Do not store a reference to this element - the dom node can be overwritten by other code.

  Parameters:
    `element` - the element
    `named` - allows for creation of named reusable flyweights to prevent conflicts (e.g. internally Ext uses "_internal")
  Returns:
    the ExtElement

### generateId

    public static java.lang.String generateId()

  Generates unique ids.

  Returns:
    a unique ID

### generateId

    public static java.lang.String generateId(java.lang.String prefix)

  Generates unique ids.

  Parameters:
    `prefix` - Id prefix (defaults "ext-gen")
  Returns:
    a unique ID

### onReady

    public static void onReady(Function cb)

  Fires when the document is ready (before onload and before images are loaded). Can alternatively use the GWT entry point mechanism.

  Parameters:
    `cb` - callback to execute

### debugger

    public static void debugger()

  Utility method to kick up Javascript debugger. Userful during development / troubleshooting where it is desired to step through Javascript code.

### isFirebug

    public static boolean isFirebug()

  Return true if Firebug is enabled.

  Returns:
    true if firebug is enabled

### disableFirebug

    public static void disableFirebug()

  Disable firebug.

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