Package com.google.gwt.place.shared

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


                            setProgress(100);
                            showShell();

                            /* Register home place and parse url for current place token */
                            final Place defaultPlace = new HomePlace();
                            placeHistoryHandler.register(placeController, eventBus, defaultPlace);
                            placeHistoryHandler.handleCurrentHistory();
                            shell.onLoginEvent(new LoginEvent());
                        } else {
                            showShell();

                            /* Register home place and parse url for current place token */
                            final Place defaultPlace = new LoginPlace(History.getToken());
                            placeHistoryHandler.register(placeController, eventBus, defaultPlace);
                            placeController.goTo(defaultPlace);
                        }
                    }
                });
View Full Code Here


                        @Override
                        public void onSuccess(final LookupConstantsProxy lookupConstants) {
                            setLookupConstants(lookupConstants);
                            shell.onLoginEvent(loginEvent);

                            final Place currentPlace = placeController.getWhere();
                            if(currentPlace instanceof LoginPlace) {// explicit login
                                final LoginPlace loginPlace = (LoginPlace) currentPlace;
                                if(loginPlace.getHistoryToken() != null && !"".equals(loginPlace.getHistoryToken())) {
                                    History.newItem(loginPlace.getHistoryToken());
                                } else {
View Full Code Here

   
    wikiPageBox.addNewWikiPageHandler(new WikiPageBox.WikiPageBoxHandler() {
     
      @Override
      public void onWikiPage(String wikiPageName) {
        Place place = new WikiPagePlace(wikiPageName);
        placeController.goTo(place);
      }
    });
    wikiPageBox.addSelectWikiPageHandler(new WikiPageBox.WikiPageBoxHandler() {
     
      @Override
      public void onWikiPage(String wikiPageName) {
        Place place = new WikiPagePlace(wikiPageName);
        placeController.goTo(place);
      }
    });
    wikiPageBox.addDeleteWikiPageHandler(new WikiPageBox.WikiPageBoxHandler() {
     
      @Override
      public void onWikiPage(String wikiPageName) {
        eventBus.fireEvent(new DeleteWikiPageEvent(wikiPageName));
        storage.delete(wikiPageName);
        wikiPageBox.removeWikiPage(wikiPageName);
      }
    });

    for (String wikiPageName: storage.findAll()) {
      wikiPageBox.addWikiPage(wikiPageName);
    }
   
    if (eventBus != null) {
      eventBus.addHandler(AddWikiPageEvent.TYPE, new AddWikiPageEventHandler() {
       
        @Override
        public void onAddWikiPage(AddWikiPageEvent event) {
          wikiPageBox.addWikiPage(event.getWikiPageName());
        }
      });
     
      eventBus.addHandler(PlaceChangeEvent.TYPE, new PlaceChangeEvent.Handler() {
       
        @Override
        public void onPlaceChange(PlaceChangeEvent event) {
          if (event != null) {
            Place place = event.getNewPlace();
            if (place instanceof WikiPagePlace) {
              WikiPagePlace p = (WikiPagePlace) place;
                wikiPageBox.focusOnWikiPage(p.getWikiPageName());
            }
          }
View Full Code Here

    if (ignore) {
      ignore = false;
      return;
    }

    Place newPlace = event.getNewPlace();

    historyObserver.onPlaceChange(newPlace, defaultHistoryHandler);

    pushToken(tokenForPlace(newPlace));
  }
View Full Code Here

    pushToken(tokenForPlace(newPlace));
  }

  protected void onPopStateEventOccured(String token) {

    Place place = getPlaceForToken(token);

    historyObserver.onHistoryChanged(place, defaultHistoryHandler);
    // TODO maybe handle differently?
    ignore = true;
    placeController.goTo(place);
View Full Code Here

  protected void pushToken(String token) {
    historian.pushState(token, Window.getTitle(), "#" + History.encodeHistoryToken(token));
  }

  public void handleCurrentHistory() {
    Place place = getPlaceForToken(GWT_historian.getToken());

    historyObserver.onAppStarted(place, defaultHistoryHandler);
    if (defaultPlace.equals(place)) {
      ignore = true;
    }
View Full Code Here

  private Place defaultPlace = Place.NOWHERE;

  protected Place getPlaceForToken(String token) {

    Place newPlace = null;

    if ("".equals(token)) {
      newPlace = defaultPlace;
    }
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

    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

      }
    });
  }

  private Animation getAnimation(PlaceChangeEvent event) {
    Place newPlace = event.getNewPlace();
    return animationMapper.getAnimation(currentPlace, newPlace);
  }
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.