Java 类com.google.gwt.user.client.ui.AcceptsOneWidget 实例源码

项目:che    文件:IdeGeneralPreferencesPresenter.java   
@Override
public void go(AcceptsOneWidget container) {
  container.setWidget(view);

  String currentThemeId = preferencesManager.getValue(PREF_IDE_GENERAL_THEME);
  if (currentThemeId == null || currentThemeId.isEmpty()) {
    currentThemeId = themeAgent.getCurrentThemeId();
  }
  view.setThemes(themeAgent.getThemes(), currentThemeId);

  view.setAskBeforeClosingTab(
      Boolean.parseBoolean(preferencesManager.getValue(PREF_IDE_GENERAL_TAB_CLOSING)));
}
项目:che    文件:GdbConfigurationPagePresenterTest.java   
@Test
public void testGo() throws Exception {
  AcceptsOneWidget container = Mockito.mock(AcceptsOneWidget.class);

  pagePresenter.go(container);

  verify(appContext).getWorkspace();
  verify(container).setWidget(eq(pageView));
  verify(configuration, atLeastOnce()).getHost();
  verify(configuration, atLeastOnce()).getPort();
  verify(configuration, atLeastOnce()).getConnectionProperties();
  verify(pageView).setHost(eq(HOST));
  verify(pageView).setPort(eq(PORT));
  verify(pageView).setBinaryPath(nullable(String.class));
  verify(pageView).setDevHost(eq(false));
  verify(pageView).setPortEnableState(eq(true));
  verify(pageView).setHostEnableState(eq(true));
}
项目:mgwt-traffic-flow    文件:SeattleActivity.java   
@Override
public void start(AcceptsOneWidget panel, EventBus eventBus) {
    view = clientFactory.getSeattleView();
    dbService = clientFactory.getDbService();
    analytics = clientFactory.getAnalytics();
    view.setPresenter(this);

    localStorage = Storage.getLocalStorageIfSupported();

    buildStationList();
       getCameras();

       timer = new Timer() {

           @Override
           public void run() {
               getFlowData();
               timer = null;
           }
       };

       timer.schedule(250);

    if (Consts.ANALYTICS_ENABLED) {
           analytics.trackView("/Seattle");
       }

       panel.setWidget(view);

}
项目:mgwt-traffic-flow    文件:CameraActivity.java   
@Override
public void start(AcceptsOneWidget panel, final EventBus eventBus) {
    view = clientFactory.getCameraView();
    this.eventBus = eventBus;
    analytics = clientFactory.getAnalytics();
    view.setPresenter(this);

    Place place = clientFactory.getPlaceController().getWhere();

    if (place instanceof CameraPlace) {
        CameraPlace cameraPlace = (CameraPlace) place;
        cameraId = cameraPlace.getId();
        cameraItem = cameraPlace.getCameraItem();

        view.showProgressIndicator();
        view.renderCameraImage(cameraItem.getUrl());
    }

       if (Consts.ANALYTICS_ENABLED) {
           analytics.trackView("/Camera/" + cameraId);
       }

    panel.setWidget(view);

}
项目:mgwt-traffic-flow    文件:TacomaActivity.java   
@Override
public void start(AcceptsOneWidget panel, EventBus eventBus) {
    view = clientFactory.getTacomaView();
    dbService = clientFactory.getDbService();
    analytics = clientFactory.getAnalytics();
    view.setPresenter(this);

    localStorage = Storage.getLocalStorageIfSupported();

    buildStationList();
       getCameras();
       getFlowData();

       if (Consts.ANALYTICS_ENABLED) {
           analytics.trackView("/Tacoma");
       }

       panel.setWidget(view);

}
项目:che    文件:GwtPagePresenterTest.java   
@Test
public void testGo() throws Exception {
  AcceptsOneWidget container = Mockito.mock(AcceptsOneWidget.class);

  presenter.go(container);

  verify(container).setWidget(eq(view));
  verify(view).setWorkingDirectory(eq(WORK_DIR));
  verify(view).setGwtModule(eq(GWT_MODULE));
  verify(view).setCodeServerAddress(eq(CODE_SERVER_ADDRESS));
}
项目:proarc    文件:Importing.java   
@Override
public void start(AcceptsOneWidget panel, EventBus eventBus) {
    ImportPresenter importPresenter = presenterFactory.getImportPresenter();
    importPresenter.bind();
    switch (importPlace.getType()) {
        case CONTENT:
            importPresenter.importFolder();
            break;
        case EDIT_ITEMS:
            importPresenter.updateImportedObjects(importPlace.getBatchId());
            break;
        case EDIT_PARENT:
            importPresenter.selectParent(importPlace.getBatchId());
            break;
        default: // HISTORY
            importPresenter.selectBatchFromHistory();
            break;
    }
    panel.setWidget(importPresenter.getUI());
}
项目:LAS    文件:ActionsMenuBarActivity.java   
@Override
public void start(AcceptsOneWidget containerWidget, EventBus eventBus) {
    this.eventBus = eventBus;
    ActionsMenuBar view = init(name);

    containerWidget.setWidget(view.asWidget());
}
项目:LAS    文件:InteractiveDownloadDataViewActivity.java   
@Override
public void start(AcceptsOneWidget containerWidget, EventBus eventBus) {
    this.eventBus = eventBus;
    view = clientFactory.getInteractiveDownloadDataView();
    view.setName(name);
    view.setPresenter(this);
    containerWidget.setWidget(view.asWidget());
    init();

    // Get the grid and generate dependent widgets
    AsyncCallback gridCallback = onGotGrid;
    Util.getRPCService().getGrid(dsID, varID, gridCallback);
}
项目:LAS    文件:OutputControlPanelActivity.java   
@Override
public void start(AcceptsOneWidget containerWidget, EventBus eventBus) {
    this.eventBus = eventBus;
    OutputControlPanel view = init(name);

    containerWidget.setWidget(view.asWidget());
}
项目:mentor    文件:LectureActivity.java   
@Override
public void start(final AcceptsOneWidget containerWidget, EventBus eventBus) {

    if (place.getLectureId() == null || place.getCourseId() == null) {
        Places.goHome();
        return;
    }

    LectureView.get().init(place);
    LectureView.get().show(containerWidget);

}
项目:mentor    文件:CourseActivity.java   
@Override
public void start(final AcceptsOneWidget containerWidget, EventBus eventBus) {

    if (place.getCourseId() == null) {
        Places.goHome();
        return;
    }

    CourseView.get().init(place);
    CourseView.get().show(containerWidget);

}
项目:social-analytics    文件:AnalyticsActivity.java   
@Override
public void start(AcceptsOneWidget panel, EventBus eventBus) {
    view = clientFactory.getAnalyticsView();
    view.setPresenter(this);
    panel.setWidget(view.asWidget());

}
项目:listmaker    文件:NavActivity.java   
@Override
public void start(AcceptsOneWidget acceptsOneWidget, EventBus eventBus) {
    setView(App.getClientFactory().getNavView());
    super.start(acceptsOneWidget, eventBus);

    listenForListChanges();
    App.getNoteListService().refreshNoteLists(new AppCallback<ListResponse<NoteList>>() {
        @Override
        public void handleSuccess(ListResponse<NoteList> result) {
            getView().populateLists(result.list);
        }
    });
}
项目:che    文件:JavaCommandPagePresenterTest.java   
@Test
public void pageShouldBeInitialized() throws Exception {
  AcceptsOneWidget container = mock(AcceptsOneWidget.class);

  presenter.resetFrom(command);
  presenter.setFieldStateActionDelegate(fieldStateDelegate);
  presenter.go(container);

  verify(container).setWidget(view);
  verify(view).setMainClass(MAIN_CLASS_PATH);
  verify(view).setCommandLine(COMMAND_LINE);
  verify(fieldStateDelegate).updatePreviewURLState(false);
}
项目:listmaker    文件:AddNoteActivity.java   
@Override
public void start(AcceptsOneWidget acceptsOneWidget, EventBus eventBus) {
    setView(App.getClientFactory().getAddNoteView());
    super.start(acceptsOneWidget, eventBus);
    App.getEventBus().addHandler(NoteListsModifiedEvent.TYPE,
            new NoteListsModifiedEventHandler() {
                @Override
                public void onNoteListsModified(Map<Long, NoteList> noteLists) {
                    getView().stopProcessing();
                    populateLists(noteLists.values(), null);
                }
            });
    App.getEventBus().addHandler(NoteListAddedEvent.TYPE, new NoteListAddedHandler() {
        @Override
        public void onNoteListAdded(ArrayList<NoteList> allLists, NoteList noteList) {
            populateLists(allLists, noteList);
            getView().focusOnSaveButton();
        }
    });
    // Fetch lists
    App.getNoteListService().refreshNoteLists(new AppCallback<ListResponse<NoteList>>(
            getView()) {
        @Override
        public void handleSuccess(ListResponse<NoteList> result) {
            getView().stopProcessing();
            populateLists(result.list, getSelectedList());
        }
    });
}
项目:listmaker    文件:ProfileActivity.java   
@Override
public void start(AcceptsOneWidget acceptsOneWidget, EventBus eventBus) {
    setView(getView());
    super.start(acceptsOneWidget, eventBus);

    user = App.getAppModel().getMe();
    viewProfile();
  }
项目:listmaker    文件:UserActivity.java   
@Override
public void start(AcceptsOneWidget acceptsOneWidget, EventBus eventBus) {
    setView(App.getClientFactory().getUserView());
    super.start(acceptsOneWidget, eventBus);
    this.showingUser = App.getAppModel().getMe();
    getView().showUser(showingUser);
}
项目:proarc    文件:DigitalObjectEditing.java   
@Override
public void start(AcceptsOneWidget panel, EventBus eventBus) {
    panel.setWidget(editor.getUI());
    Record[] digitalObjects = place.getDigitalObjects();
    if (digitalObjects != null) {
        editor.edit(place.getEditorId(), digitalObjects);
    } else {
        editor.edit(place.getEditorId(), place.getPids());
    }
}
项目:mgwt-traffic-flow    文件:AboutActivity.java   
@Override
public void start(AcceptsOneWidget panel, final EventBus eventBus) {
    view = clientFactory.getAboutView();
    this.eventBus = eventBus;
    analytics = clientFactory.getAnalytics();
    view.setPresenter(this);

    if (Consts.ANALYTICS_ENABLED) {
        analytics.trackView("/About");
    }

    panel.setWidget(view);

}
项目:mgwt-traffic-flow    文件:MenuActivity.java   
@Override
public void start(AcceptsOneWidget panel, final EventBus eventBus) {
    view = clientFactory.getMenuView();
    this.eventBus = eventBus;
    view.setPresenter(this);
    view.render(createTopicsList());

    panel.setWidget(view);
}
项目:mgwt-traffic-flow    文件:SettingsActivity.java   
@Override
public void start(AcceptsOneWidget panel, final EventBus eventBus) {
    view = clientFactory.getSettingsView();
    this.eventBus = eventBus;
    analytics = clientFactory.getAnalytics();
    view.setPresenter(this);

       if (Consts.ANALYTICS_ENABLED) {
           analytics.trackView("/Settings");
       }

    panel.setWidget(view);

}
项目:che    文件:GitImporterPagePresenterTest.java   
@Test
public void testGo() {
  AcceptsOneWidget container = mock(AcceptsOneWidget.class);

  presenter.go(container);

  verify(container).setWidget(eq(view));
  verify(view).setProjectName(anyString());
  verify(view).setProjectDescription(anyString());
  verify(view).setProjectUrl(anyString());
  verify(view).setInputsEnableState(eq(true));
  verify(view).focusInUrlInput();
}
项目:che    文件:PlainJavaPagePresenter.java   
@Override
public void go(AcceptsOneWidget container) {
  container.setWidget(view);

  final ProjectWizardMode wizardMode = ProjectWizardMode.parse(context.get(WIZARD_MODE_KEY));
  final String projectName = dataObject.getName();

  if (CREATE == wizardMode && projectName != null) {
    updateDelegate.updateControls();
  }

  updateView();
  validateCoordinates();
}
项目:che    文件:YamlExtensionManagerPresenter.java   
/** {@inheritDoc} */
@Override
public void go(AcceptsOneWidget container) {
  container.setWidget(view);
  refreshTable();
  setSchemas();
}
项目:che    文件:PartStackViewImpl.java   
@Inject
public PartStackViewImpl(
    PartStackUIResources resources, CoreLocalizationConstant localizationConstant) {
  this.resources = resources;
  this.localizationConstant = localizationConstant;
  initWidget(UI_BINDER.createAndBindUi(this));

  partStackContent.getElement().getStyle().setPosition(Style.Position.ABSOLUTE);

  tabs = new HashMap<>();

  partViewContainer =
      new AcceptsOneWidget() {
        @Override
        public void setWidget(IsWidget widget) {
          partStackContent.add(widget);
        }
      };

  addDomHandler(this, MouseDownEvent.getType());
  addDomHandler(this, ContextMenuEvent.getType());

  setMaximized(false);

  addMaximizeButton();
  addHideButton();
  addMenuButton();
}
项目:che    文件:SourceEntryPresenter.java   
@Override
public void go(AcceptsOneWidget container) {

  final Resource resource = appContext.getResource();

  Preconditions.checkState(resource != null);

  final Optional<Project> project = resource.getRelatedProject();

  isPlainJava = JAVAC.equals(project.get().getType());

  setReadOnlyMod();

  container.setWidget(view);

  if (!categories.isEmpty()) {
    view.renderNodes();
    return;
  }

  classpathContainer
      .getClasspathEntries(project.get().getLocation().toString())
      .then(
          new Operation<List<ClasspathEntryDto>>() {
            @Override
            public void apply(List<ClasspathEntryDto> entries) throws OperationException {
              categories.clear();
              for (ClasspathEntryDto entry : entries) {
                if (SOURCE == entry.getEntryKind()) {
                  categories.put(entry.getPath(), entry);
                }
              }
              view.setData(categories);
              view.renderNodes();
            }
          });
}
项目:che    文件:ZendDbgConfigurationPagePresenterTest.java   
@Test
public void testGo() throws Exception {
  AcceptsOneWidget container = Mockito.mock(AcceptsOneWidget.class);
  pagePresenter.go(container);
  verify(container).setWidget(eq(pageView));
  verify(configuration, times(3)).getConnectionProperties();
}
项目:che    文件:ZipImporterPagePresenter.java   
@Override
public void go(AcceptsOneWidget container) {
  container.setWidget(view);
  updateView();

  view.setInputsEnableState(true);
  view.focusInUrlInput();
}
项目:che    文件:MainPagePresenter.java   
@Override
public void go(final AcceptsOneWidget container) {
  selectedProjectImporter = null;

  view.reset();
  container.setWidget(view);

  loadImporters();
}
项目:che    文件:ExecuteCommandPresenterTest.java   
@Test
public void testGo() throws Exception {
  AcceptsOneWidget container = mock(AcceptsOneWidget.class);

  presenter.go(container);

  verify(view).setGoals(anySetOf(CommandGoal.class));
  verify(container).setWidget(view);
}
项目:che    文件:MavenCommandPagePresenter.java   
@Override
public void go(AcceptsOneWidget container) {
  container.setWidget(view);

  view.setWorkingDirectory(editedCommandModel.getWorkingDirectory());
  view.setArguments(editedCommandModel.getArguments());
}
项目:che    文件:FormatterPreferencePagePresenterTest.java   
@Test
public void pageSouldBeShown() throws Exception {
  AcceptsOneWidget acceptsOneWidget = mock(AcceptsOneWidget.class);

  presenter.go(acceptsOneWidget);

  verify(view).showDialog();
  verify(acceptsOneWidget).setWidget(view);
}
项目:che    文件:WorkspacePresenter.java   
/** {@inheritDoc} */
@Override
public void go(AcceptsOneWidget container) {
  mainMenu.go(view.getMenuPanel());
  toolbarPresenter.go(view.getToolbarPanel());
  bottomMenu.go(view.getStatusPanel());

  container.setWidget(view);
}
项目:che    文件:ExtensionManagerPresenter.java   
/** {@inheritDoc} */
@Override
public void go(AcceptsOneWidget container) {
  container.setWidget(view);
  List<ExtensionDescription> extensions = new ArrayList<>();
  for (ExtensionDescription ed : extensionRegistry.getExtensionDescriptions().values()) {
    extensions.add(ed);
  }
  view.setExtensions(extensions);
}
项目:che    文件:NodeJsDebuggerConfigurationPagePresenterTest.java   
@Test
public void testGo() throws Exception {
  AcceptsOneWidget container = Mockito.mock(AcceptsOneWidget.class);

  pagePresenter.go(container);

  verify(container).setWidget(eq(pageView));
  verify(configuration, atLeastOnce()).getConnectionProperties();
  verify(pageView).setScriptPath(nullable(String.class));
}
项目:che    文件:NotificationManagerImplTest.java   
@Test
public void testGo() throws Exception {
  AcceptsOneWidget container = mock(AcceptsOneWidget.class);

  manager.go(container);

  verify(container).setWidget(eq(view));
}
项目:che    文件:FindResultPresenterTest.java   
@Test
public void methodGoShouldBePerformed() {
  AcceptsOneWidget container = mock(AcceptsOneWidget.class);
  findResultPresenter.go(container);

  verify(container).setWidget(view);
}
项目:che    文件:GitImporterPagePresenter.java   
@Override
public void go(@NotNull AcceptsOneWidget container) {
  container.setWidget(view);

  if (Strings.isNullOrEmpty(dataObject.getName())
      && Strings.isNullOrEmpty(dataObject.getSource().getLocation())) {
    ignoreChanges = true;

    view.unmarkURL();
    view.unmarkName();
    view.setURLErrorMessage(null);
  }

  view.setProjectName(dataObject.getName());
  view.setProjectDescription(dataObject.getDescription());
  view.setProjectUrl(dataObject.getSource().getLocation());

  view.setKeepDirectoryChecked(false);
  view.setBranchChecked(false);
  view.setDirectoryName("");
  view.setBranchName("");
  view.enableDirectoryNameField(false);
  view.enableBranchNameField(false);
  view.highlightDirectoryNameField(false);

  view.setInputsEnableState(true);
  view.focusInUrlInput();

  ignoreChanges = false;
}
项目:che    文件:ComposerPagePresenter.java   
@Override
public void go(AcceptsOneWidget container) {
  container.setWidget(view);

  final ProjectWizardMode wizardMode = ProjectWizardMode.parse(context.get(WIZARD_MODE_KEY));
  final String projectName = dataObject.getName();

  if (CREATE == wizardMode && projectName != null) {
    updateDelegate.updateControls();
  }

  updateView();
  validateAttributes();
}