com.extjs.gxt.ui.client
Class GXT

java.lang.Object
  extended by com.extjs.gxt.ui.client.GXT

public class GXT
extends java.lang.Object

GXT core utilities and functions.


Field Summary
static java.lang.String BLANK_IMAGE_URL
          URL to a 1x1 transparent gif image used by GXT to create inline icons with CSS background images.
static XImages IMAGES
          GXT images.
static boolean isAir
          true if is air.
static boolean isBorderBox
          true if is borderbox.
static boolean isChrome
          true if the browser is chrome.
static boolean isGecko
          true if the browser is gecko.
static boolean isGecko2
          true if the browser is gecko2.
static boolean isGecko3
          true if the browser is gecko3.
static boolean isGecko35
          true if the browser is gecko3.5.
static boolean isHighContrastMode
          True if the OS high contrast mode is enabled.
static boolean isIE
          true if the browser is ie.
static boolean isIE6
          true if the browser is ie6.
static boolean isIE7
          true if the browser is ie7.
static boolean isIE8
          true if the browser is ie8.
static boolean isIE9
          true if the browser is ie8.
static boolean isLinux
          true if linux os.
static boolean isMac
          true if mac os.
static boolean isOpera
          true if the browser is opera.
static boolean isSafari
          true if the browser is safari.
static boolean isSafari2
          true if the browser is safari2.
static boolean isSafari3
          true if the browser is safari3.
static boolean isSafari4
          true if the browser is safari4.
static boolean isSecure
          true if using https.
static boolean isStrict
          true if the browser is in strict mode.
static boolean isWebKit
          true if the browser uses the webkit engine.
static boolean isWindows
          true if windows os.
static XMessages MESSAGES
          GXT messages.
static java.lang.String RESOURCES_URL
          Path to GXT resources (defaults to 'gxt').
static java.lang.String SSL_SECURE_URL
          URL to a blank file used by GXT when in secure mode for iframe src to prevent the IE insecure content.
static boolean useShims
          true if the browser uses shims.
 
Constructor Summary
GXT()
           
 
Method Summary
static java.lang.String getAutoIdPrefix()
          Returns the auto id prefix.
static java.lang.String getThemeId()
          Returns the current theme id.
static java.lang.String getUserAgent()
          Returns the browser's user agent.
static Version getVersion()
          Returns the version information.
static void hideLoadingPanel(java.lang.String id)
          Hides the loading panel.
static void init()
          Initializes GXT.
static boolean isAriaEnabled()
          Returns the ARIA enabled state.
static boolean isFocusManagerEnabled()
          Returns the focus managed enabled state.
static void setAriaEnabled(boolean enable)
          True to enable ARIA functionality.
static void setAutoIdPrefix(java.lang.String autoIdPrefix)
          Sets the auto id prefix which is prepended to the auto id counter when generating auto ids (defaults to 'x-auto').
static void setDefaultTheme(Theme theme, boolean force)
          Sets the default theme which will be used if the user does not have a theme selected with the state provider.
static void setFocusManagerEnabled(boolean enable)
          True to enable the focus manager.
static void switchTheme(Theme theme)
          Changes the theme.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

IMAGES

public static XImages IMAGES
GXT images.


MESSAGES

public static XMessages MESSAGES
GXT messages.


isWebKit

public static boolean isWebKit
true if the browser uses the webkit engine.


isSafari

public static boolean isSafari
true if the browser is safari.


isSafari2

public static boolean isSafari2
true if the browser is safari2.


isSafari3

public static boolean isSafari3
true if the browser is safari3.


isSafari4

public static boolean isSafari4
true if the browser is safari4.


isChrome

public static boolean isChrome
true if the browser is chrome.


isOpera

public static boolean isOpera
true if the browser is opera.


isIE

public static boolean isIE
true if the browser is ie.


isIE6

public static boolean isIE6
true if the browser is ie6.


isIE7

public static boolean isIE7
true if the browser is ie7.


isIE8

public static boolean isIE8
true if the browser is ie8.


isIE9

public static boolean isIE9
true if the browser is ie8.


isGecko

public static boolean isGecko
true if the browser is gecko.


isGecko2

public static boolean isGecko2
true if the browser is gecko2.


isGecko3

public static boolean isGecko3
true if the browser is gecko3.


isGecko35

public static boolean isGecko35
true if the browser is gecko3.5.


isStrict

public static boolean isStrict
true if the browser is in strict mode.


isSecure

public static boolean isSecure
true if using https.


isMac

public static boolean isMac
true if mac os.


isLinux

public static boolean isLinux
true if linux os.


isWindows

public static boolean isWindows
true if windows os.


isAir

public static boolean isAir
true if is air.


isBorderBox

public static boolean isBorderBox
true if is borderbox.


useShims

public static boolean useShims
true if the browser uses shims.


SSL_SECURE_URL

public static java.lang.String SSL_SECURE_URL
URL to a blank file used by GXT when in secure mode for iframe src to prevent the IE insecure content. Default value is 'blank.html'.


BLANK_IMAGE_URL

public static java.lang.String BLANK_IMAGE_URL
URL to a 1x1 transparent gif image used by GXT to create inline icons with CSS background images. Default value is '/images/default/shared/clear.gif';


RESOURCES_URL

public static java.lang.String RESOURCES_URL
Path to GXT resources (defaults to 'gxt').


isHighContrastMode

public static boolean isHighContrastMode
True if the OS high contrast mode is enabled.

Constructor Detail

GXT

public GXT()
Method Detail

getAutoIdPrefix

public static java.lang.String getAutoIdPrefix()
Returns the auto id prefix.

Returns:
the auto id prefix

getThemeId

public static java.lang.String getThemeId()
Returns the current theme id.

Returns:
the theme id

getUserAgent

public static java.lang.String getUserAgent()
Returns the browser's user agent.

Returns:
the user agent

getVersion

public static Version getVersion()
Returns the version information.

Returns:
the version information

hideLoadingPanel

public static void hideLoadingPanel(java.lang.String id)
Hides the loading panel.

Parameters:
id - the loading panel id

init

public static void init()
Initializes GXT.


isAriaEnabled

public static boolean isAriaEnabled()
Returns the ARIA enabled state.

Returns:
true if enabled, false otherwise

isFocusManagerEnabled

public static boolean isFocusManagerEnabled()
Returns the focus managed enabled state.

Returns:
true if enabled, false otherwise

setAriaEnabled

public static void setAriaEnabled(boolean enable)
True to enable ARIA functionality. Enabling ARIA will also cause the focus manager to enabled.

Parameters:
enable - true to enable

setFocusManagerEnabled

public static void setFocusManagerEnabled(boolean enable)
True to enable the focus manager.

Parameters:
enable - true to enable

setAutoIdPrefix

public static void setAutoIdPrefix(java.lang.String autoIdPrefix)
Sets the auto id prefix which is prepended to the auto id counter when generating auto ids (defaults to 'x-auto').

Parameters:
autoIdPrefix - the auto id prefix

setDefaultTheme

public static void setDefaultTheme(Theme theme,
                                   boolean force)
Sets the default theme which will be used if the user does not have a theme selected with the state provider.

Parameters:
theme - the default theme
force - true to force the theme, ignoring the the theme saved with the state manager

switchTheme

public static void switchTheme(Theme theme)
Changes the theme. A theme's stylehseets should be given a class = to the theme id. Any stylesheets that have a class that do not match the id be removed (stylesheets with no class specified are ignored). The method will reload the application after changing themes.

Parameters:
theme - the new theme name.