Package org.onebusaway.webapp.gwt.oba_application.view

Examples of org.onebusaway.webapp.gwt.oba_application.view.MainPage


    ActiveResultPresenter activeResult = new ActiveResultPresenter();
    activeResult.setMapOverlayManager(mapOverlayManager);
    activeResult.setControl(control);

    MainPage mainPage = new MainPage();
    mainPage.setControl(control);
    mainPage.setMapWidget(mapWidget);
    mainPage.setSearchWidget(searchWidget);
    mainPage.addResultsPanelWidget(welcome.getWidget());
    mainPage.addResultsPanelWidget(addressLookup.getWidget());
    mainPage.addResultsPanelWidget(resultsTable.getWidget());
    mainPage.addResultsPanelWidget(activeResult.getWidget());
    mainPage.addResultsPanelWidget(plansWidget.getWidget());
   
    manager.addContextListener(mainPage);

    SearchOriginMapPresenter searchOriginMapMarker = new SearchOriginMapPresenter();
    searchOriginMapMarker.setMapOverlayManager(mapOverlayManager);
    searchOriginMapMarker.setLocationQueryModel(queryModel);

    /**
     * Wire up all the listeners
     */

    timedRegionModel.addModelListener(timedOverlayManager.getRegionModelListener());
    timedPolygonModel.addModelListener(timedOverlayManager.getPolygonModelListener());

    locationQueryModelEvents.addModelListener(control.getQueryModelHandler());
    queryModelEvents.addModelListener(searchWidget.getQueryModelHandler());

    resultsModelEvents.addModelListener(filteredResultsModel.getResultsModelHandler());
    resultsModelEvents.addModelListener(filter.getResultsModelHandler());

    filteredResultsModelEvents.addModelListener(pagedResultsModel.getModelListener());

    tripModel.addModelListener(plansWidget);

    stateEvents.addModelListener(welcome.getStateEventListener());
    stateEvents.addModelListener(resultsTable);
    stateEvents.addModelListener(activeResult);
    stateEvents.addModelListener(searchOriginMapMarker);
    stateEvents.addModelListener(plansWidget.getStateEventHandler());
    stateEvents.addModelListener(timedOverlayManager.getStateEventHandler());
    stateEvents.addModelListener(addressLookup.getStateEventListener());

    StyleInjector.inject(OneBusAwayStandardResources.INSTANCE.getCss().getText());
    StyleInjector.inject(TripPlannerResources.INSTANCE.getCss().getText());
    StyleInjector.inject(CommonResources.INSTANCE.getApplicationCss().getText());
   
    mainPage.initialize();
    StandardApplicationContainer.add(mainPage);
    mainPage.onContextChanged(manager.getContext());
  }
View Full Code Here

TOP

Related Classes of org.onebusaway.webapp.gwt.oba_application.view.MainPage

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.