コード例 #1
0
  @UiHandler("increaseThreePrime")
  public void increaseThreePrime(ClickEvent e) {
    try {
      fivePrimeValue = Integer.parseInt(fivePrimeField.getText());
      threePrimeValue = Integer.parseInt(threePrimeField.getText()) + 1; // intended action
    } catch (Exception error) {
      coordinatesToPrime(
          this.internalAnnotationInfo.getMin(), this.internalAnnotationInfo.getMax());
      return;
    }

    if (verifyOperation()) {
      triggerUpdate(fivePrimeValue, threePrimeValue);
    }
  }
コード例 #2
0
ファイル: OrganismPanel.java プロジェクト: minw2828/Apollo
  @UiHandler("createButton")
  public void handleSaveNewOrganism(ClickEvent clickEvent) {
    OrganismInfo organismInfo = new OrganismInfo();
    organismInfo.setName(organismName.getText());
    organismInfo.setDirectory(sequenceFile.getText());
    organismInfo.setGenus(genus.getText());
    organismInfo.setSpecies(species.getText());
    organismInfo.setBlatDb(blatdb.getText());

    createButton.setEnabled(false);
    createButton.setText("Processing");
    savingNewOrganism = true;

    OrganismRestService.createOrganism(new UpdateInfoListCallback(), organismInfo);
    loadingDialog.show();
  }
コード例 #3
0
ファイル: OrganismPanel.java プロジェクト: minw2828/Apollo
 @UiHandler("organismName")
 public void handleOrganismNameChange(ChangeEvent changeEvent) {
   if (singleSelectionModel.getSelectedObject() != null) {
     singleSelectionModel.getSelectedObject().setName(organismName.getText());
     updateOrganismInfo();
   }
 }
コード例 #4
0
ファイル: OrganismPanel.java プロジェクト: minw2828/Apollo
 @UiHandler("blatdb")
 public void handleBlatDbChange(ChangeEvent changeEvent) {
   if (singleSelectionModel.getSelectedObject() != null) {
     singleSelectionModel.getSelectedObject().setBlatDb(blatdb.getText());
     updateOrganismInfo();
   }
 }
コード例 #5
0
ファイル: OrganismPanel.java プロジェクト: minw2828/Apollo
 @UiHandler("species")
 public void handleSpeciesChange(ChangeEvent changeEvent) {
   if (singleSelectionModel.getSelectedObject() != null) {
     singleSelectionModel.getSelectedObject().setSpecies(species.getText());
     updateOrganismInfo();
   }
 }
コード例 #6
0
ファイル: OrganismPanel.java プロジェクト: minw2828/Apollo
 @UiHandler("genus")
 public void handleGenusChange(ChangeEvent changeEvent) {
   if (singleSelectionModel.getSelectedObject() != null) {
     singleSelectionModel.getSelectedObject().setGenus(genus.getText());
     updateOrganismInfo();
   }
 }
コード例 #7
0
ファイル: OrganismPanel.java プロジェクト: minw2828/Apollo
 @UiHandler("sequenceFile")
 public void handleOrganismDirectory(ChangeEvent changeEvent) {
   if (singleSelectionModel.getSelectedObject() != null) {
     singleSelectionModel.getSelectedObject().setDirectory(sequenceFile.getText());
     updateOrganismInfo();
   }
 }
コード例 #8
0
  @UiHandler("threePrimeField")
  public void threePrimeTextFocus(BlurEvent b) {
    try {
      fivePrimeValue = Integer.parseInt(fivePrimeField.getText());
      threePrimeValue = Integer.parseInt(threePrimeField.getText());
    } catch (Exception error) {
      coordinatesToPrime(
          this.internalAnnotationInfo.getMin(), this.internalAnnotationInfo.getMax());
      return;
    }

    if (verifyOperation()) {
      triggerUpdate(fivePrimeValue, threePrimeValue);
    } else {
      coordinatesToPrime(
          this.internalAnnotationInfo.getMin(), this.internalAnnotationInfo.getMax());
    }
  }
コード例 #9
0
ファイル: LoginDialog.java プロジェクト: childers/Apollo
 @Override
 public void onPreviewNativeEvent(NativePreviewEvent e) {
   NativeEvent nativeEvent = e.getNativeEvent();
   if ("keydown".equals(nativeEvent.getType())) {
     if (nativeEvent.getKeyCode() == KeyCodes.KEY_ENTER) {
       doLogin(userBox.getText().trim(), passBox.getText(), rememberBox.getValue());
     }
   }
 }
コード例 #10
0
  @UiHandler("threePrimeField")
  public void threePrimeTextEntry(KeyDownEvent k) {
    if (k.getNativeKeyCode() == KeyCodes.KEY_ENTER) {
      try {
        fivePrimeValue = Integer.parseInt(fivePrimeField.getText());
        threePrimeValue = Integer.parseInt(threePrimeField.getText());
      } catch (Exception error) {
        coordinatesToPrime(
            this.internalAnnotationInfo.getMin(), this.internalAnnotationInfo.getMax());
        return;
      }

      if (verifyOperation()) {
        triggerUpdate(fivePrimeValue, threePrimeValue);
      } else {
        coordinatesToPrime(
            this.internalAnnotationInfo.getMin(), this.internalAnnotationInfo.getMax());
      }
    }
  }
コード例 #11
0
 @Override
 public String getMaxIntervalsValue() {
   return maxIntervalsTextBox.getText();
 }
コード例 #12
0
 @Override
 public String getPersistenceUnitName() {
   return persistenceUnitTextBox.getText();
 }
コード例 #13
0
 @Override
 public String getPersistenceProvider() {
   return persistenceProviderTextBox.getText();
 }
コード例 #14
0
 @Override
 public String getJTADataSource() {
   return datasourceTextBox.getText();
 }
コード例 #15
0
 @Override
 public String getValue() {
   return textBox.getText();
 }
コード例 #16
0
ファイル: LoginDialog.java プロジェクト: childers/Apollo
 @UiHandler("loginButton")
 public void submitAction(ClickEvent e) {
   doLogin(userBox.getText().trim(), passBox.getText(), rememberBox.getValue());
 }
コード例 #17
0
 @Override
 public String getPattern() {
   return searchPatternTextBox.getText();
 }
コード例 #18
0
 @Override
 public String getNewPropertyValue() {
   return newPropertyValueTextBox.getText();
 }
コード例 #19
0
  @UiHandler("search")
  public void onSearchClick(final ClickEvent e) {
    errorPanel.clear();
    formGroup.setValidationState(ValidationState.NONE);
    final Map<String, Object> metadata = new HashMap<String, Object>();
    if (!sourceTextBox.getText().trim().isEmpty()) {
      metadata.put("dcore.source[0]", sourceTextBox.getText().trim());
    }

    if (!createdByTextBox.getText().trim().isEmpty()) {
      metadata.put("createdBy", createdByTextBox.getText().trim());
    }

    if (!descriptionByTextBox.getText().trim().isEmpty()) {
      metadata.put("dcore.description[0]", descriptionByTextBox.getText().trim());
    }

    if (!formatTypeahead.getText().trim().isEmpty()) {
      final String pattern =
          clientTypeRegistry.resolveWildcardPattern(formatTypeahead.getText().trim());
      metadata.put("filename", pattern);
    }

    if (!subjectTextBox.getText().trim().isEmpty()) {
      metadata.put("dcore.subject[0]", subjectTextBox.getText().trim());
    }

    if (!typeTextBox.getText().trim().isEmpty()) {
      metadata.put("dcore.type[0]", typeTextBox.getText().trim());
    }

    if (!lastModifiedByTextBox.getText().trim().isEmpty()) {
      metadata.put("lastModifiedBy", lastModifiedByTextBox.getText().trim());
    }

    if (!externalLinkTextBox.getText().trim().isEmpty()) {
      metadata.put("dcore.relation[0]", externalLinkTextBox.getText().trim());
    }

    if (!checkinCommentTextBox.getText().trim().isEmpty()) {
      metadata.put("checkinComment", checkinCommentTextBox.getText().trim());
    }

    boolean hasSomeDateValue = false;

    if (createdAfter.getValue() != null) {
      hasSomeDateValue = true;
    }

    if (createdBefore.getValue() != null) {
      hasSomeDateValue = true;
    }

    if (lastModifiedAfter.getValue() != null) {
      hasSomeDateValue = true;
    }

    if (lastModifiedBefore.getValue() != null) {
      hasSomeDateValue = true;
    }

    if (metadata.size() == 0 && !hasSomeDateValue) {
      formGroup.setValidationState(ValidationState.ERROR);
      Alert alert = new Alert(Constants.INSTANCE.AtLeastOneFieldMustBeSet(), AlertType.DANGER);
      alert.setVisible(true);
      alert.setDismissable(true);
      errorPanel.add(alert);
      return;
    }

    final SearchResultTable queryTable =
        new SearchResultTable(
            new QueryMetadataPageRequest(
                metadata,
                createdAfter.getValue(),
                createdBefore.getValue(),
                lastModifiedAfter.getValue(),
                lastModifiedBefore.getValue(),
                0,
                null));
    simplePanel.clear();

    simplePanel.add(queryTable);

    formAccordionCollapse.setIn(false);
    resultAccordionCollapse.setIn(true);
  }