@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); } }
@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(); }
@UiHandler("organismName") public void handleOrganismNameChange(ChangeEvent changeEvent) { if (singleSelectionModel.getSelectedObject() != null) { singleSelectionModel.getSelectedObject().setName(organismName.getText()); updateOrganismInfo(); } }
@UiHandler("blatdb") public void handleBlatDbChange(ChangeEvent changeEvent) { if (singleSelectionModel.getSelectedObject() != null) { singleSelectionModel.getSelectedObject().setBlatDb(blatdb.getText()); updateOrganismInfo(); } }
@UiHandler("species") public void handleSpeciesChange(ChangeEvent changeEvent) { if (singleSelectionModel.getSelectedObject() != null) { singleSelectionModel.getSelectedObject().setSpecies(species.getText()); updateOrganismInfo(); } }
@UiHandler("genus") public void handleGenusChange(ChangeEvent changeEvent) { if (singleSelectionModel.getSelectedObject() != null) { singleSelectionModel.getSelectedObject().setGenus(genus.getText()); updateOrganismInfo(); } }
@UiHandler("sequenceFile") public void handleOrganismDirectory(ChangeEvent changeEvent) { if (singleSelectionModel.getSelectedObject() != null) { singleSelectionModel.getSelectedObject().setDirectory(sequenceFile.getText()); updateOrganismInfo(); } }
@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()); } }
@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()); } } }
@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()); } } }
@Override public String getMaxIntervalsValue() { return maxIntervalsTextBox.getText(); }
@Override public String getPersistenceUnitName() { return persistenceUnitTextBox.getText(); }
@Override public String getPersistenceProvider() { return persistenceProviderTextBox.getText(); }
@Override public String getJTADataSource() { return datasourceTextBox.getText(); }
@Override public String getValue() { return textBox.getText(); }
@UiHandler("loginButton") public void submitAction(ClickEvent e) { doLogin(userBox.getText().trim(), passBox.getText(), rememberBox.getValue()); }
@Override public String getPattern() { return searchPatternTextBox.getText(); }
@Override public String getNewPropertyValue() { return newPropertyValueTextBox.getText(); }
@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); }