Enum PageEvent

java.lang.Object
java.lang.Enum<PageEvent>
com.smartgwt.client.types.PageEvent
All Implemented Interfaces:
ValueEnum, Serializable, Comparable<PageEvent>, Constable

public enum PageEvent extends Enum<PageEvent> implements ValueEnum
Events registerable via Page.setEvent()
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    Fires when the user clicks the mouse on the Page.
    Fires when the uesr double-clicks on the Page.
    Fires after a timeout if the FontLoader fails to load all custom fonts.
    Fires when the FontLoader completes loading custom fonts.
    Fires repeatedly (every 10 ms by default) when the system is idle (i.e., not busy running other scripts) after the page is loaded.
    Fires when a user presses a key on the keyboard.
    Fires when the page has finished loading.
    Fires when the left mouse button is pressed on the Page.
    Fires when the mouse moves on the Page.
    Fires when the left mouse button released on the Page.
    Fires when the Page.getOrientation() changes due to browser-window resize or rotation of a mobile device.
    Fires when the page is hidden — navigated away from, or frozen into the browser back/forward cache ("bfcache").
    Fires when the page is shown — freshly loaded, or restored from the browser back/forward cache.
    Fires when the browser window is resized by the user.
    Fires when the right mouse button is pressed on the Page.
    Fires when the right mouse button is clicked on the page.
    Fires when the page is exited or unloaded.
    Fires when the page's visibility changes, for example when its browser tab is backgrounded or re-shown.
  • Method Summary

    Modifier and Type
    Method
    Description
     
    static PageEvent
    Returns the enum constant of this type with the specified name.
    static PageEvent[]
    Returns an array containing the constants of this enum type, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • IDLE

      public static final PageEvent IDLE
      Fires repeatedly (every 10 ms by default) when the system is idle (i.e., not busy running other scripts) after the page is loaded.

      If this enumerated value is used in a Component XML file or server-side DataSource descriptor (.ds.xml file), use the value "idle".

    • LOAD

      public static final PageEvent LOAD
      Fires when the page has finished loading. It corresponds to the browser 'load' event normally handled by window.onload.

      If this enumerated value is used in a Component XML file or server-side DataSource descriptor (.ds.xml file), use the value "load".

    • UNLOAD

      public static final PageEvent UNLOAD
      Fires when the page is exited or unloaded. Deprecated in favor of "pageHide", which maps to the modern browser pagehide event; "unload" continues to fire for backwards compatibility.

      If this enumerated value is used in a Component XML file or server-side DataSource descriptor (.ds.xml file), use the value "unload".

    • PAGEHIDE

      public static final PageEvent PAGEHIDE
      Fires when the page is hidden — navigated away from, or frozen into the browser back/forward cache ("bfcache"). Maps to the browser pagehide event. The eventInfo passed to the handler carries a persisted boolean: true when the page is being frozen into the bfcache and may be restored later. See EventHandler.isPagePersisting().

      If this enumerated value is used in a Component XML file or server-side DataSource descriptor (.ds.xml file), use the value "pageHide".

    • PAGESHOW

      public static final PageEvent PAGESHOW
      Fires when the page is shown — freshly loaded, or restored from the browser back/forward cache. Maps to the browser pageshow event. The eventInfo carries a persisted boolean: true when the page was restored from the bfcache rather than freshly loaded.

      If this enumerated value is used in a Component XML file or server-side DataSource descriptor (.ds.xml file), use the value "pageShow".

    • VISIBILITYCHANGE

      public static final PageEvent VISIBILITYCHANGE
      Fires when the page's visibility changes, for example when its browser tab is backgrounded or re-shown. Maps to the browser visibilitychange event. The eventInfo carries visibilityState ("visible" or "hidden") and a hidden boolean.

      If this enumerated value is used in a Component XML file or server-side DataSource descriptor (.ds.xml file), use the value "visibilityChange".

    • RESIZE

      public static final PageEvent RESIZE
      Fires when the browser window is resized by the user. It corresponds to the browser 'resize' event normally handled by window.onresize.

      If this enumerated value is used in a Component XML file or server-side DataSource descriptor (.ds.xml file), use the value "resize".

    • MOUSEDOWN

      public static final PageEvent MOUSEDOWN
      Fires when the left mouse button is pressed on the Page.

      If this enumerated value is used in a Component XML file or server-side DataSource descriptor (.ds.xml file), use the value "mouseDown".

    • RIGHTMOUSEDOWN

      public static final PageEvent RIGHTMOUSEDOWN
      Fires when the right mouse button is pressed on the Page.

      If this enumerated value is used in a Component XML file or server-side DataSource descriptor (.ds.xml file), use the value "rightMouseDown".

    • MOUSEMOVE

      public static final PageEvent MOUSEMOVE
      Fires when the mouse moves on the Page.

      If this enumerated value is used in a Component XML file or server-side DataSource descriptor (.ds.xml file), use the value "mouseMove".

    • MOUSEUP

      public static final PageEvent MOUSEUP
      Fires when the left mouse button released on the Page.

      If this enumerated value is used in a Component XML file or server-side DataSource descriptor (.ds.xml file), use the value "mouseUp".

    • CLICK

      public static final PageEvent CLICK
      Fires when the user clicks the mouse on the Page.

      If this enumerated value is used in a Component XML file or server-side DataSource descriptor (.ds.xml file), use the value "click".

    • DOUBLECLICK

      public static final PageEvent DOUBLECLICK
      Fires when the uesr double-clicks on the Page.

      If this enumerated value is used in a Component XML file or server-side DataSource descriptor (.ds.xml file), use the value "doubleClick".

    • SHOWCONTEXTMENU

      public static final PageEvent SHOWCONTEXTMENU
      Fires when the right mouse button is clicked on the page. If your event handler for this event returns false, the native browser context menu will be suppressed.
      Note: On the Macintosh platform, Command+Click may be used instead of right-button click to trigger a context menu event.
      On the Opera browser, Ctrl+Shift+Click should be used instead of right-button click.

      If this enumerated value is used in a Component XML file or server-side DataSource descriptor (.ds.xml file), use the value "showContextMenu".

    • KEYPRESS

      public static final PageEvent KEYPRESS
      Fires when a user presses a key on the keyboard.

      If this enumerated value is used in a Component XML file or server-side DataSource descriptor (.ds.xml file), use the value "keyPress".

    • ORIENTATIONCHANGE

      public static final PageEvent ORIENTATIONCHANGE
      Fires when the Page.getOrientation() changes due to browser-window resize or rotation of a mobile device.

      If this enumerated value is used in a Component XML file or server-side DataSource descriptor (.ds.xml file), use the value "orientationChange".

    • FONTSLOADED

      public static final PageEvent FONTSLOADED
      Fires when the FontLoader completes loading custom fonts.

      If this enumerated value is used in a Component XML file or server-side DataSource descriptor (.ds.xml file), use the value "fontsLoaded".

    • FONTLOADINGFAILED

      public static final PageEvent FONTLOADINGFAILED
      Fires after a timeout if the FontLoader fails to load all custom fonts. see classMethod:Page.setEvent() see classMethod:Page.clearEvent()

      If this enumerated value is used in a Component XML file or server-side DataSource descriptor (.ds.xml file), use the value "fontLoadingFailed".

  • Method Details

    • values

      public static PageEvent[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static PageEvent valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • getValue

      public String getValue()
      Specified by:
      getValue in interface ValueEnum