com.extjs.gxt.ui.client.widget.button.Button.getItemId()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(5.4k)|赞(0)|评价(0)|浏览(230)

本文整理了Java中com.extjs.gxt.ui.client.widget.button.Button.getItemId()方法的一些代码示例,展示了Button.getItemId()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Button.getItemId()方法的具体详情如下:
包路径:com.extjs.gxt.ui.client.widget.button.Button
类名称:Button
方法名:getItemId

Button.getItemId介绍

暂无

代码示例

代码示例来源:origin: bedatadriven/activityinfo

@Override
  public void handleEvent(MessageBoxEvent be) {
    if (be.getButtonClicked().getItemId().equals(Dialog.YES)) {
      deleteSelection();
    }
  }
});

代码示例来源:origin: bedatadriven/activityinfo

@Override
  public void handleEvent(MessageBoxEvent be) {
    if (be.getButtonClicked().getItemId().equals(Dialog.YES)) {
      cancelTransfer();
    }
  }
});

代码示例来源:origin: bedatadriven/activityinfo

@Override
  public void handleEvent(final MessageBoxEvent be) {
    Button btn = be.getButtonClicked();
    if (Dialog.YES.equalsIgnoreCase(btn.getItemId())) {
      performCreate(true);
    }
  }
});

代码示例来源:origin: bedatadriven/activityinfo

@Override
protected void onButtonPressed(Button button) {
  if (button.getItemId().equals(Dialog.OK)) {
    save();
  } else {
    hide();
  }
}

代码示例来源:origin: bedatadriven/activityinfo

@Override
  public void handleEvent(MessageBoxEvent be) {
    if (be.getButtonClicked().getItemId().equals(Dialog.YES)) {
      callback.confirmed();
    }
  }
});

代码示例来源:origin: bedatadriven/activityinfo

@Override
  public void handleEvent(MessageBoxEvent be) {
    if (be.getButtonClicked().getItemId().equals(Dialog.YES)) {
      onDelete();
    }
  }
});

代码示例来源:origin: bedatadriven/activityinfo

@Override
public void handleEvent(ButtonEvent be) {
  if (listener != null) {
    listener.onUIAction(be.getButton().getItemId());
  }
}

代码示例来源:origin: bedatadriven/activityinfo

@Override
  protected void onButtonPressed(Button button) {
    if (button.getItemId().equals("ok")) {
      callback.onSelected(getSelectedIds());
    }
    callback = null;
    hide();
  }
}

代码示例来源:origin: bedatadriven/activityinfo

@Override
protected void onButtonPressed(Button button) {
  hide();
  editor.disconnect();
  if (button.getItemId().equals(Dialog.OK)) {
    callback.onOK(dirty);
  }
}

代码示例来源:origin: bedatadriven/activityinfo

@Override
  protected void onButtonPressed(Button button) {
    if (button.getItemId().equals("ok")) {
      callback.onSelected(getSelectedIds());
    }
    callback = null;
    hide();
  }
}

代码示例来源:origin: pl.touk.top/file-upload-gwtclient-lib

public void handleEvent(MessageBoxEvent messageBoxEvent) {
    Button b = messageBoxEvent.getButtonClicked();
    String buttonType = b.getItemId();
    if (Dialog.YES.equals(buttonType)) {
      //TODO where to get selected row from
      AppEvent event = new AppEvent(EventName.LOCAL_FILE_DELETE.toType());
      fireEvent(event.getType(),event);
    } else if (Dialog.NO.equals(buttonType)) {
      // Nothing happens
    }
  }
});

代码示例来源:origin: bedatadriven/activityinfo

@Override
  protected void onButtonPressed(Button button) {
    if (button.getItemId().equals("ok")) {
      if (callback != null) {
        callback.onSelected(new DateRange(date1.getValue(), date2.getValue()));
      }
    }
    this.callback = null;
    hide();
  }
}

代码示例来源:origin: bedatadriven/activityinfo

@Override
  public void handleEvent(final MessageBoxEvent be) {
    String newTitle = be.getMessageBox().getTextBox().getValue();
    boolean cancelled = be.getButtonClicked().getItemId().equals("cancel");
    if (!Strings.isNullOrEmpty(newTitle) && !cancelled) {
      currentModel.setTitle(newTitle);
      reportBar.setReportTitle(newTitle);
      save(callback);
    }
  }
});

代码示例来源:origin: bedatadriven/activityinfo

@Override
protected void onDeleteConfirmed(final TargetDTO model) {
  MessageBox.confirm(
      I18N.CONSTANTS.deleteTarget(),
      I18N.MESSAGES.requestConfirmationToDeleteTarget(model.getName()),
      event -> {
        if (event.getButtonClicked().getItemId().equals(Dialog.YES)) {
          delete(model);
        }
      }
  );
}

代码示例来源:origin: bedatadriven/activityinfo

@Override
public void askConfirmDelete(LockedPeriodDTO item) {
  MessageBox.confirm(I18N.CONSTANTS.deleteLockedPeriodTitle(),
      I18N.CONSTANTS.deleteLockedPeriodQuestion(),
      event -> {
        if (event.getButtonClicked().getItemId().equals(Dialog.YES)) {
          eventBus.fireEvent(new ConfirmDeleteEvent());
        }
      });
}

代码示例来源:origin: bedatadriven/activityinfo

@Override
protected void onDeleteConfirmed(final ProjectDTO project) {
  MessageBox.confirm(
      I18N.CONSTANTS.deleteProject(),
      I18N.MESSAGES.requestConfirmationToDeleteProject(project.getName()),
      event -> {
        if (event.getButtonClicked().getItemId().equals(Dialog.YES)) {
          delete(project);
        }
      }
  );
}

代码示例来源:origin: bedatadriven/activityinfo

@Override
  public void handleEvent(MessageBoxEvent be) {
    if (be.getButtonClicked().getItemId().equals(Dialog.OK)) {
      model.setTitle(box.getTextBox().getValue());
      titleElement.setInnerText(ElementTitles.format(model));
    }
  }
});

代码示例来源:origin: bedatadriven/activityinfo

private void confirmDelete(PartnerDTO selectedItem) {
  MessageBox.confirm(
      I18N.CONSTANTS.removePartner(),
      I18N.MESSAGES.requestConfirmationToDeletePartner(selectedItem.getName()),
      event -> {
        if(event.getButtonClicked().getItemId().equals(Dialog.YES)) {
          delete(selectedItem);
        }
      }
  );
}

代码示例来源:origin: bedatadriven/activityinfo

@Override
  protected void onButtonPressed(Button button) {
    if (button.getItemId().equals("cancel")) {
      hide();
    } else {
      ModelData thumb = listView.getSelectionModel().getSelectedItem();
      if (thumb != null) {
        callback.onSelect((String) thumb.get("id"), (String) thumb.get("name"));
        hide();
      }
    }
  }
}

代码示例来源:origin: bedatadriven/activityinfo

private static void promptUseNewEntry(final ActivityDTO dto) {
    MessageBox box = new MessageBox();
    box.setTitle(dto.getName());
    box.setMessage(SafeHtmlUtils.fromString(I18N.CONSTANTS.pleaseUseNewDataEntry()));
    box.setButtons(MessageBox.OKCANCEL);
    box.addCallback(messageBoxEvent -> {
      if(messageBoxEvent.getButtonClicked().getItemId().equals(MessageBox.OK)) {
        App3.openNewTable(dto.getFormId());
      }
    });
    box.show();
  }
}

相关文章