Package com.google.gwt.place.shared

Examples of com.google.gwt.place.shared.Place


        });
    }

    private void displayCurrentPlace() {
        PlaceManager placeManager = Application.get().getPlaceManager();
        Place currentPlace = placeManager.getCurrentPlace();
        if (currentPlace instanceof ProjectListPlace) {
            setActiveTab(0);
        }
        else if(currentPlace instanceof ProjectViewPlace) {
            ProjectViewPlace projectViewPlace = (ProjectViewPlace) currentPlace;
View Full Code Here


        Animation animation = event.getAnimation();

        AnimationNames animationName = animation.getAnimationName();

        Place place = null;

        switch (animationName) {
        case SLIDE:
          place = new AnimationSlidePlace();

          break;
        case SLIDE_UP:
          place = new AnimationSlideUpPlace();

          break;
        case DISSOLVE:
          place = new AnimationDissolvePlace();

          break;
        case FADE:
          place = new AnimationFadePlace();

          break;
        case FLIP:
          place = new AnimationFlipPlace();

          break;
        case POP:
          place = new AnimationPopPlace();

          break;
        case SWAP:
          place = new AnimationSwapPlace();

          break;

        default:
          // TODO log
          place = new AnimationSlidePlace();
          break;
        }

        if (MGWT.getFormFactor().isTablet() || MGWT.getFormFactor().isDesktop()) {

          historyHandler.replaceCurrentPlace(place);
          historyHandler.goTo(place, true);
        } else {
          historyHandler.goTo(place);
        }

      }
    });
    HandlerRegistration register3 = UIEntrySelectedEvent.register(eventBus, new UIEntrySelectedEvent.Handler() {

      @Override
      public void onAnimationSelected(UIEntrySelectedEvent event) {

        UIEntry entry = event.getEntry();

        Place place = null;

        switch (entry) {
        case BUTTON_BAR:
          place = new ButtonBarPlace();
          break;
View Full Code Here

public class MultiActivityManagerChangePlaceTest extends MultiActivityManagerTestBase {

    @Test
    public void testChangePlace() throws Exception {
        Place oldPlace = mock(Place.class);
        Place newPlace = mock(Place.class);

        multiActivityManager.setTabbedPanel(tabbedPanel);

        verifyGoToNewPlace(oldPlace, "oldMockTabTitle");
        verifyGoToNewPlace(newPlace, "newMockTabTitle");
View Full Code Here

        verifyGoToNewPlace(newPlace, "newMockTabTitle");
    }

    @Test
    public void testPlaceGetsShownIfItAlreadyActive() throws Exception {
        Place oldPlace = mock(Place.class);
        Place newPlace = mock(Place.class);

        multiActivityManager.setTabbedPanel(tabbedPanel);

        verifyGoToNewPlace(oldPlace, "oldMockTabTitle");
        verifyGoToExistingPlace(newPlace);
View Full Code Here

        verify(handlerRegistration).removeHandler();
    }

    @Test
    public void testCloseAllTabs() throws Exception {
        Place place1 = mock(Place.class);
        Place place2 = mock(Place.class);
        Place place3 = mock(Place.class);
        Activity activity1 = setUpMayStop(goTo(place1), true);
        Activity activity2 = setUpMayStop(goTo(place2), true);
        Activity activity3 = setUpMayStop(goTo(place3), true);

        multiActivityManager.onCloseAllPlaces(new CloseAllPlacesEvent());
View Full Code Here

    public void close(Place key) {

        int widgetIndex = openedTabs.getIndex(key);

        Place nextPlace = getPlace(widgetIndex);

        tabLayoutPanel.remove(openedTabs.get(key));
        openedTabs.remove(key);

        if (nextPlace != null) {
View Full Code Here

TOP

Related Classes of com.google.gwt.place.shared.Place

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.