Package com.google.gwt.place.shared

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


  public void onModuleLoad() {
   
    ClientFactory clientFactory = GWT.create(ClientFactory.class);
   
    Shell appWidget = new Shell(clientFactory);
    Place defaultPlace = new InicioPlace();
   
    EventBus eventBus = clientFactory.getEventBus();
    PlaceController placeController = clientFactory.getPlaceController();

    ActivityMapper activityMapper = new AppActivityMapper(clientFactory);
View Full Code Here


    IClientFactory clientFactory = GWT.create(IClientFactory.class);
    SmbizActivityMapper activityMapper = new SmbizActivityMapper(clientFactory);
    ActivityManager activityManager = new ActivityManager(activityMapper, clientFactory.getEventBus());
    activityManager.setDisplay(shell.getPanel());

    Place defaultPlace = new HomeViewPlace();
    clientFactory.getPlaceHistoryHandler().register(clientFactory.getPlaceController(), clientFactory.getEventBus(), defaultPlace);

    root.add(shell);
    clientFactory.getPlaceHistoryHandler().handleCurrentHistory();
  }
View Full Code Here

    this.listener = listener;
  }

  @UiHandler("button")
  void onButtonClick(ClickEvent event) {
    Place newPlace = null;
    // TODO
    listener.goTo(newPlace);
  }
View Full Code Here

    String history6 = subject.getPrefixAndToken(place6).toString();
    assertEquals(place6.content, history6);
    assertTrue(subject.getTokenizer("") instanceof Place6.Tokenizer);
    assertTrue(subject.getPlace("noPrefix") instanceof Place6);

    Place place = new Place() {
    };
    assertNull(subject.getPrefixAndToken(place));
    assertNull(subject.getTokenizer("snot"));
  }
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

        // Does nothing
    }

    @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( tabbedPanel, never() ).addTab( anyString(), Matchers.<IsWidget>any(), any( Place.class ) );
    }

    @Test
    public void testCloseTabCallsOnStopAndRemovesWrappersHandlers() throws Exception {
        Place place = mock( Place.class );
        multiActivityManager.setTabbedPanel( tabbedPanel );
        ArgumentCaptor<ResettableEventBus> resettableEventBusArgumentCaptor = ArgumentCaptor.forClass( ResettableEventBus.class );

        HandlerRegistration handlerRegistration = mock( HandlerRegistration.class );
        ClosePlaceEvent.Handler handler = mock( ClosePlaceEvent.Handler.class );
View Full Code Here

        verify( handlerRegistration ).removeHandler();
    }

    @Test
    public void testClosingATabIsBlockedByTheActivity() throws Exception {
        Place place = mock( Place.class );
        multiActivityManager.setTabbedPanel( tabbedPanel );

        Activity activity = goTo( place );
        when( activity.mayStop() ).thenReturn( false );
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.