コード例 #1
0
 @Inject
 public DataShieldPackageView(EventBus eventBus) {
   super(eventBus);
   widget = uiBinder.createAndBindUi(this);
   dialog.setMinHeight(DIALOG_WIDTH);
   dialog.setMinWidth(DIALOG_HEIGHT);
 }
コード例 #2
0
 @Inject
 public IdentifiersMappingModalView(
     Binder uiBinder, EventBus eventBus, Translations translations) {
   super(eventBus);
   this.translations = translations;
   initWidget(uiBinder.createAndBindUi(this));
   dialog.setTitle(translations.editIdentifiersMapping());
   dialog.setResizable(true);
 }
コード例 #3
0
ファイル: EntityModalView.java プロジェクト: obiba/opal
 @Inject
 public EntityModalView(EventBus eventBus) {
   super(eventBus);
   widget = uiBinder.createAndBindUi(this);
   valueSelectionHandler = new ValueSelectionHandlerImpl();
   initializeTable();
   initializeDisplayOptions();
   dialog.setTitle(translations.entityDetailsModalTitle());
   dialog.setMinWidth(MIN_WIDTH);
   dialog.setMinHeight(MIN_HEIGHT);
   tableChooser.addStyleName("table-chooser-large");
 }
コード例 #4
0
  @Override
  public void showError(String message, @Nullable FormField group) {
    if (Strings.isNullOrEmpty(message)) return;

    String msg = message;
    try {
      ClientErrorDto errorDto = JsonUtils.unsafeEval(message);
      msg = errorDto.getStatus();
    } catch (Exception ignored) {
    }
    if (group == null) {
      dialog.addAlert(msg, AlertType.ERROR);
    } else {
      dialog.addAlert(msg, AlertType.ERROR, variableGroup);
    }
  }
コード例 #5
0
 @Override
 public void setMode(VocabularyEditModalPresenter.EDIT_MODE editionMode) {
   modal.setTitle(
       editionMode == VocabularyEditModalPresenter.EDIT_MODE.CREATE
           ? translations.addVocabulary()
           : translations.editVocabulary());
 }
コード例 #6
0
  @Override
  public void renderProperties(VariableDto variable, boolean modifyName) {
    if (variable != null) {
      variableName.setText(variable.getName());
      description.setText(
          AttributeHelper.getAttributeValue(variable.getAttributesArray(), "description"));
    } else {
      dialog.setTitle(translations.addIdentifiersMapping());
    }

    variableName.setEnabled(modifyName);
  }
コード例 #7
0
 @Override
 public void showError(
     @Nullable IndexConfigurationPresenter.Display.FormField formField, String message) {
   ControlGroup group = null;
   if (formField != null) {
     switch (formField) {
       case CLUSTER_NAME:
         group = clusterGroup;
         break;
       case SHARDS:
         group = shardsGroup;
         break;
       case REPLICAS:
         group = replicasGroup;
         break;
     }
   }
   if (group == null) {
     dialog.addAlert(message, AlertType.ERROR);
   } else {
     dialog.addAlert(message, AlertType.ERROR, group);
   }
 }
コード例 #8
0
 @UiHandler("closeButton")
 void onClose(ClickEvent event) {
   dialog.hide();
 }
コード例 #9
0
 @Override
 public void showError(@Nullable FormField formField, String message) {
   modal.addAlert(message, AlertType.ERROR);
 }
コード例 #10
0
 @UiHandler("cancelButton")
 public void onCancelButton(ClickEvent event) {
   dialog.hide();
 }
コード例 #11
0
 @Override
 public void setDialogMode(IndexConfigurationPresenter.Mode dialogMode) {
   dialog.setTitle(translations.esConfigurationLabel());
 }
コード例 #12
0
 @Override
 public void hideDialog() {
   dialog.hide();
 }
コード例 #13
0
 private void initWidgets() {
   dialog.hide();
 }
コード例 #14
0
 @Override
 public void show() {
   dialog.setTitle(translations.dataShieldPackageDescription());
   super.show();
 }
コード例 #15
0
 @Override
 public void clearErrors() {
   dialog.closeAlerts();
 }
コード例 #16
0
 @UiHandler("cancel")
 void onCancel(ClickEvent event) {
   modal.hide();
 }
コード例 #17
0
 @Inject
 public VocabularyEditModalView(EventBus eventBus) {
   super(eventBus);
   uiBinder.createAndBindUi(this);
   modal.setTitle(translations.addTaxonomy());
 }