@Override public void start(AcceptsOneWidget panel, EventBus eventBus) { view = clientFactory.getSeattleExpressLanesView(); this.eventBus = eventBus; this.phoneGap = this.clientFactory.getPhoneGap(); accessibility = clientFactory.getAccessibility(); view.setPresenter(this); view.getPullHeader().setHTML("pull down"); inAppBrowser = this.phoneGap.getInAppBrowser(); PullArrowStandardHandler headerHandler = new PullArrowStandardHandler(view.getPullHeader(), view.getPullPanel()); headerHandler.setErrorText("Error"); headerHandler.setLoadingText("Loading"); headerHandler.setNormalText("pull down"); headerHandler.setPulledText("release to load"); headerHandler.setPullActionHandler( new PullActionHandler() { @Override public void onPullAction(final AsyncCallback<Void> callback) { new Timer() { @Override public void run() { createPostList(); view.refresh(); callback.onSuccess(null); } }.schedule(1); } }); view.setHeaderPullHandler(headerHandler); createPostList(); createSchedulesLink(); panel.setWidget(view); accessibility.postScreenChangeNotification(); }
@Override public void start(AcceptsOneWidget panel, EventBus eventBus) { this.eventBus = eventBus; dbService = clientFactory.getDbService(); phoneGap = clientFactory.getPhoneGap(); view.setPresenter(this); view.getNorthboundPullHeader().setHTML("pull down"); view.getSouthboundPullHeader().setHTML("pull down"); PullArrowStandardHandler headerHandler = new PullArrowStandardHandler(view.getNorthboundPullHeader(), view.getNorthboundPullPanel()); headerHandler.setErrorText("Error"); headerHandler.setLoadingText("Loading"); headerHandler.setNormalText("pull down"); headerHandler.setPulledText("release to load"); headerHandler.setPullActionHandler( new PullActionHandler() { @Override public void onPullAction(final AsyncCallback<Void> callback) { new Timer() { @Override public void run() { createBorderWaitList(view); view.refresh(); callback.onSuccess(null); } }.schedule(1); } }); PullArrowStandardHandler headerHandler2 = new PullArrowStandardHandler(view.getSouthboundPullHeader(), view.getSouthboundPullPanel()); headerHandler2.setErrorText("Error"); headerHandler2.setLoadingText("Loading"); headerHandler2.setNormalText("pull down"); headerHandler2.setPulledText("release to load"); headerHandler2.setPullActionHandler( new PullActionHandler() { @Override public void onPullAction(final AsyncCallback<Void> callback) { new Timer() { @Override public void run() { createBorderWaitList(view); view.refresh(); callback.onSuccess(null); } }.schedule(1); } }); view.setNorthboundHeaderPullHandler(headerHandler); view.setSouthboundHeaderPullHandler(headerHandler2); buildRouteIcons(); createBorderWaitList(view); panel.setWidget(view); }