Exemplo n.º 1
0
 @Inject
 public DataShieldPackageView(EventBus eventBus) {
   super(eventBus);
   widget = uiBinder.createAndBindUi(this);
   dialog.setMinHeight(DIALOG_WIDTH);
   dialog.setMinWidth(DIALOG_HEIGHT);
 }
Exemplo n.º 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);
 }
Exemplo n.º 3
0
 @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");
 }
Exemplo n.º 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);
    }
  }
Exemplo n.º 5
0
 @Override
 public void setMode(VocabularyEditModalPresenter.EDIT_MODE editionMode) {
   modal.setTitle(
       editionMode == VocabularyEditModalPresenter.EDIT_MODE.CREATE
           ? translations.addVocabulary()
           : translations.editVocabulary());
 }
Exemplo n.º 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);
  }
Exemplo n.º 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);
   }
 }
Exemplo n.º 8
0
 @UiHandler("closeButton")
 void onClose(ClickEvent event) {
   dialog.hide();
 }
Exemplo n.º 9
0
 @Override
 public void showError(@Nullable FormField formField, String message) {
   modal.addAlert(message, AlertType.ERROR);
 }
Exemplo n.º 10
0
 @UiHandler("cancelButton")
 public void onCancelButton(ClickEvent event) {
   dialog.hide();
 }
Exemplo n.º 11
0
 @Override
 public void setDialogMode(IndexConfigurationPresenter.Mode dialogMode) {
   dialog.setTitle(translations.esConfigurationLabel());
 }
Exemplo n.º 12
0
 @Override
 public void hideDialog() {
   dialog.hide();
 }
Exemplo n.º 13
0
 private void initWidgets() {
   dialog.hide();
 }
Exemplo n.º 14
0
 @Override
 public void show() {
   dialog.setTitle(translations.dataShieldPackageDescription());
   super.show();
 }
Exemplo n.º 15
0
 @Override
 public void clearErrors() {
   dialog.closeAlerts();
 }
Exemplo n.º 16
0
 @UiHandler("cancel")
 void onCancel(ClickEvent event) {
   modal.hide();
 }
Exemplo n.º 17
0
 @Inject
 public VocabularyEditModalView(EventBus eventBus) {
   super(eventBus);
   uiBinder.createAndBindUi(this);
   modal.setTitle(translations.addTaxonomy());
 }