Example usage for com.google.gwt.event.shared HandlerManager HandlerManager

List of usage examples for com.google.gwt.event.shared HandlerManager HandlerManager

Introduction

In this page you can find the example usage for com.google.gwt.event.shared HandlerManager HandlerManager.

Prototype

public HandlerManager(Object source) 

Source Link

Document

Creates a handler manager with a source to be set on all events fired via #fireEvent(GwtEvent) .

Usage

From source file:com.google.gwt.sample.dynatablemvp.client.DynaTableMvp.java

License:Apache License

/**
 * This method sets up the top-level services used by the application.
 *//*from w  w w  .  jav a  2  s. c  om*/
public void onModuleLoad() {
    GWT.setUncaughtExceptionHandler(new UncaughtExceptionHandler() {
        public void onUncaughtException(Throwable e) {
            log.log(Level.SEVERE, e.getMessage(), e);
        }
    });

    final DynaTableRequestFactory requests = GWT.create(DynaTableRequestFactory.class);
    requests.initialize(eventBus);

    HandlerManager eventBusHandler = new HandlerManager(null);
    AppController appViewer = new AppController(requests, eventBusHandler);
    appViewer.go(RootLayoutPanel.get());

    // Fast test to see if the sample is not being run from devmode
    if (GWT.getHostPageBaseURL().startsWith("file:")) {
        log.log(Level.SEVERE,
                "The DynaTableMvp sample cannot be run without its"
                        + " server component.  If you are running the sample from a"
                        + " GWT distribution, use the 'ant devmode' target to launch" + " the DTRF server.");
    }
}

From source file:com.googlecode.gwtphonegap.client.inappbrowser.InAppBrowserReferenceBaseImpl.java

License:Apache License

protected HandlerManager createHandlerManager() {
    return new HandlerManager(this);
}

From source file:com.gwos.client.core.events.SystemEventManager.java

License:Apache License

private SystemEventManager() {
    handlerManager = new HandlerManager(this);
}

From source file:com.gwtpro.html5.fileapi.client.drop.DropHandler.java

License:Apache License

/**
 * constructs a drop handler for an HTML element
 * /*from  w w  w  . j  a va 2 s  .  c o  m*/
 * @param element
 *            the element which will be wired to detect file drops
 */
public DropHandler(Element element) {
    this.handlerManager = new HandlerManager(this);
    bindTo(element);
}

From source file:com.gwtpro.html5.fileapi.client.drop.DropHandler.java

License:Apache License

/**
 * constructs a drop handle for a GWT widget
 * /*from   www. j a va  2  s.co m*/
 * @param widget
 *            the widget which will be wired to detect file drops
 */
public DropHandler(Widget widget) {
    this.handlerManager = new HandlerManager(this);
    bindTo(widget.getElement());
}

From source file:com.kk_electronic.kkportal.core.WebPageInjectConfig.java

License:Open Source License

@Provides
@Singleton
HandlerManager provideHandlerManager() {
    return new HandlerManager(null);
}

From source file:com.objetdirect.gwt.gen.client.ui.MainController.java

License:Open Source License

public MainController() {
    eventBus = new HandlerManager(null);
    doGoToHomeScreen();
}

From source file:com.oracle.wci.user.registration.client.WCIGwtStartUpPortlet.java

License:Apache License

/**
 * This is the entry point method./*w  ww  .  j a va  2s .c  o  m*/
 */
public void onModuleLoad() {

    // get the service URL
    String slotID = getEmptySlotId(RootPanel.getBodyElement(), "sendButtonContainer-");
    RootPanel portletRootPanel = RootPanel.get(slotID);

    String portletID = slotID.substring(slotID.indexOf("-") + 1);
    registeringService = new AsyncCall(portletID).getService();

    VerticalPanel vrPanel = new VerticalPanel();
    vrPanel.setWidth("100%");

    HandlerManager eventBus = new HandlerManager(null);
    AppController appViewer = new AppController(registeringService, eventBus);
    appViewer.go(vrPanel);
    appViewer.load("grid");

    flexTable.setWidget(1, 0, vrPanel);
    flexTable.getFlexCellFormatter().setColSpan(1, 0, 4);
    flexTable.setWidth("100%");

    vPanel.add(flexTable);
    vPanel.setWidth("100%");

    portletRootPanel.add(vPanel);
}

From source file:com.puzzlebazar.client.ui.SquareGridManipulatorImpl.java

License:Apache License

/**
 * Ensures the existence of the handler manager.
 *
 * @return the handler manager//from   ww w .java2 s .c  o m
 * */
HandlerManager ensureHandlers() {
    return handlerManager == null ? handlerManager = new HandlerManager(this) : handlerManager;
}

From source file:com.seanchenxi.gwt.html.client.FNObject.java

License:Apache License

private HandlerManager ensureHandlers() {
    return handlerManager == null ? handlerManager = new HandlerManager(this) : handlerManager;
}