/** * Create a new PlaceController. * * @param eventBus the {@link EventBus} * @param delegate the {@link Delegate} in charge of Window-related events */ public PlaceController(EventBus eventBus, Delegate delegate) { this.eventBus = eventBus; this.delegate = delegate; delegate.addWindowClosingHandler(new ClosingHandler() { public void onWindowClosing(ClosingEvent event) { String warning = maybeGoTo(Place.NOWHERE); if (warning != null) { event.setMessage(warning); } } }); }
/** * Create a new PlaceController. * * @param eventBus the {@link EventBus} * @param delegate the {@link Delegate} in charge of Window-related events */ public PlaceController(EventBus eventBus, Delegate delegate) { this.eventBus = eventBus; this.delegate = delegate; delegate.addWindowClosingHandler(new ClosingHandler() { public void onWindowClosing(ClosingEvent event) { String warning = maybeGoTo(Place.NOWHERE); if (warning != null) { event.setMessage(warning); } } }); }
/** * Create a new PlaceController. * * @param eventBus the {@link EventBus} * @param delegate the {@link Delegate} in charge of Window-related events */ public PlaceController(EventBus eventBus, Delegate delegate) { this.eventBus = eventBus; this.delegate = delegate; delegate.addWindowClosingHandler(new ClosingHandler() { public void onWindowClosing(ClosingEvent event) { String warning = maybeGoTo(Place.NOWHERE); if (warning != null) { event.setMessage(warning); } } }); }