Class LoadingEvent

java.lang.Object
com.google.web.bindery.event.shared.Event<LoadingEvent.Handler>
com.google.gwt.event.shared.GwtEvent<LoadingEvent.Handler>
com.levigo.jadice.web.client.event.JadiceEvent<LoadingEvent.Handler>
com.levigo.jadice.web.client.event.LoadingEvent

public final class LoadingEvent extends JadiceEvent<LoadingEvent.Handler>
An Event fired to indicate that something (tiles/document) is currently loading or the loading has finished.
  • Constructor Details

  • Method Details

    • getType

      public static JadiceEvent.Type<LoadingEvent.Handler> getType()
    • fire

      public static <T> void fire(com.google.gwt.event.shared.HasHandlers source, LoadingEvent.LoadingState loadingState, Object loadingObject)
      Fires a new LoadingEvent
      Parameters:
      source - the source of the event
      loadingState - the LoadingEvent.LoadingState
      loadingObject - the object which is/was loading for example a Tile or a Document
    • fire

      public static <T> void fire(com.google.gwt.event.shared.HasHandlers source, LoadingEvent.LoadingState loadingState, Object loadingObject, String errorMessage)
      Fires a new LoadingEvent
      Parameters:
      source - the source of the event
      loadingState - the LoadingEvent.LoadingState
      loadingObject - the object which is/was loading for example a Tile or a Document
      errorMessage - the error message when the loading failed due to an error
    • getLoadingState

      public LoadingEvent.LoadingState getLoadingState()
    • getLoadingObject

      public Object getLoadingObject()
    • getErrorMessage

      public String getErrorMessage()
      If the loading failed due to an error this will return an error message or an HTTP status code.

      In some cases the message can differ from the reason why the loading failed. This happens when loading an image via an image tag. We don't get information about the failure form the error event of the onerror-function of the image tag so we return the most likely reason by returning the fetch response.

      Returns:
      an error message
    • getTag

      @Deprecated public String getTag()
      Deprecated.
      use getLoadingObject() instead
      Returns:
      the loading object as a string or "tile" in case of tiles
    • dispatch

      protected void dispatch(LoadingEvent.Handler handler)
      Specified by:
      dispatch in class com.google.gwt.event.shared.GwtEvent<LoadingEvent.Handler>
    • getAssociatedType

      public com.google.gwt.event.shared.GwtEvent.Type<LoadingEvent.Handler> getAssociatedType()
      Specified by:
      getAssociatedType in class com.google.gwt.event.shared.GwtEvent<LoadingEvent.Handler>