public void onPlaceChange(PlaceChangeEvent event) { Place newPlace = event.getNewPlace(); historian.newItem(tokenForPlace(newPlace), false); } });
/** * Request a change to a new place. It is not a given that we'll actually get * there. First a {@link PlaceChangeRequestEvent} will be posted to the event * bus. If any receivers post a warning message to that event, it will be * presented to the user via {@link Delegate#confirm(String)} (which is * typically a call to {@link Window#confirm(String)}). If she cancels, the * current location will not change. Otherwise, the location changes and a * {@link PlaceChangeEvent} is posted announcing the new place. * * @param newPlace a {@link Place} instance */ public void goTo(Place newPlace) { log().fine("goTo: " + newPlace); if (getWhere().equals(newPlace)) { log().fine("Asked to return to the same place: " + newPlace); return; } String warning = maybeGoTo(newPlace); if (warning == null || delegate.confirm(warning)) { where = newPlace; eventBus.fireEvent(new PlaceChangeEvent(newPlace)); } }
private Activity getNextActivity(PlaceChangeEvent event) { if (display == null) { /* * Display may have been nulled during PlaceChangeEvent dispatch. Don't * bother the mapper, just return a null to ensure we shut down the * current activity */ return null; } return mapper.getActivity(event.getNewPlace()); }
private void doGo(Place newPlace) { this.currentPlace = newPlace; EventBus.get().fireEvent(new PlaceChangeEvent(newPlace)); }
private Place previousPlace; private Place currentPlace; eventBus.addHandler(PlaceChangeEvent.TYPE, new PlaceChangeEvent.Handler() { public void onPlaceChange(PlaceChangeEvent event) { previousPlace = currentPlace; currentPlace = event.getNewPlace(); } });
private void doGo(Place newPlace) { this.currentPlace = newPlace; EventBus.get().fireEvent(new PlaceChangeEvent(newPlace)); }
public void onPlaceChange(PlaceChangeEvent event) { Place newPlace = event.getNewPlace(); historian.newItem(tokenForPlace(newPlace), false); } });
/** * Request a change to a new place. It is not a given that we'll actually get * there. First a {@link PlaceChangeRequestEvent} will be posted to the event * bus. If any receivers post a warning message to that event, it will be * presented to the user via {@link Delegate#confirm(String)} (which is * typically a call to {@link Window#confirm(String)}). If she cancels, the * current location will not change. Otherwise, the location changes and a * {@link PlaceChangeEvent} is posted announcing the new place. * * @param newPlace a {@link Place} instance */ public void goTo(Place newPlace) { log().fine("goTo: " + newPlace); if (getWhere().equals(newPlace)) { log().fine("Asked to return to the same place: " + newPlace); return; } String warning = maybeGoTo(newPlace); if (warning == null || delegate.confirm(warning)) { where = newPlace; eventBus.fireEvent(new PlaceChangeEvent(newPlace)); } }
private Activity getNextActivity(PlaceChangeEvent event) { if (display == null) { /* * Display may have been nulled during PlaceChangeEvent dispatch. Don't * bother the mapper, just return a null to ensure we shut down the * current activity */ return null; } return mapper.getActivity(event.getNewPlace()); }
/** * Request a change to a new place. It is not a given that we'll actually get * there. First a {@link PlaceChangeRequestEvent} will be posted to the event * bus. If any receivers post a warning message to that event, it will be * presented to the user via {@link Delegate#confirm(String)} (which is * typically a call to {@link Window#confirm(String)}). If she cancels, the * current location will not change. Otherwise, the location changes and a * {@link PlaceChangeEvent} is posted announcing the new place. * * @param newPlace a {@link Place} instance */ public void goTo(Place newPlace) { log().fine("goTo: " + newPlace); if (getWhere().equals(newPlace)) { log().fine("Asked to return to the same place: " + newPlace); return; } String warning = maybeGoTo(newPlace); if (warning == null || delegate.confirm(warning)) { where = newPlace; eventBus.fireEvent(new PlaceChangeEvent(newPlace)); } }
private Activity getNextActivity(PlaceChangeEvent event) { if (display == null) { /* * Display may have been nulled during PlaceChangeEvent dispatch. * Don't bother the mapper, just return a null to ensure we shut * down the current activity */ return null; } return mapper.getActivity(event.getNewPlace()); }
private Activity getNextActivity(PlaceChangeEvent event) { if (display == null) { /* * Display may have been nulled during PlaceChangeEvent dispatch. Don't * bother the mapper, just return a null to ensure we shut down the * current activity */ return null; } return mapper.getActivity(event.getNewPlace()); }
private Activity getNextActivity(PlaceChangeEvent event) { if (display == null) { /* * Display may have been nulled during PlaceChangeEvent dispatch. * Don't bother the mapper, just return a null to ensure we shut * down the current activity */ return null; } return mapper.getActivity(event.getNewPlace()); }
public void onPlaceChange(PlaceChangeEvent event) { Place newPlace = event.getNewPlace(); historian.newItem(tokenForPlace(newPlace), false); } });
private Animation getAnimation(PlaceChangeEvent event) { Place newPlace = event.getNewPlace(); return animationMapper.getAnimation(currentPlace, newPlace); }
private Animation getAnimation(PlaceChangeEvent event) { Place newPlace = event.getNewPlace(); return animationMapper.getAnimation(currentPlace, newPlace); }
protected PlaceChangeEvent setUpPlaceChangeEvent(Place newPlace) { PlaceChangeEvent placeChangeEvent = mock(PlaceChangeEvent.class); when( placeChangeEvent.getNewPlace() ).thenReturn( newPlace ); return placeChangeEvent; } }
protected void onPlaceChangeEvent(PlaceChangeEvent event) { if (ignore) { ignore = false; return; } Place newPlace = event.getNewPlace(); historyObserver.onPlaceChange(newPlace, defaultHistoryHandler); pushToken(tokenForPlace(newPlace)); }
protected void onPlaceChangeEvent(PlaceChangeEvent event) { if (ignore) { ignore = false; return; } Place newPlace = event.getNewPlace(); historyObserver.onPlaceChange(newPlace, defaultHistoryHandler); pushToken(tokenForPlace(newPlace)); }
@Override public void onPlaceChange(PlaceChangeEvent event) { this.redraw(MvpController.get().getToken(event.getNewPlace())); }