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

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

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

Button.addListener介绍

暂无

代码示例

代码示例来源:origin: com.extjs/gxt

/**
 * Adds a selection listener.
 * 
 * @param listener the listener to add
 */
public void addSelectionListener(SelectionListener<ButtonEvent> listener) {
 addListener(Events.Select, listener);
}

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

private void createDeleteButton() {
  deleteButton = new Button("Usun plik");
  deleteButton.addListener(Events.OnClick, new Listener<BaseEvent>() {
    public void handleEvent(BaseEvent baseEvent) {
      displayDeleteConfirmationBox();
    }
  });
}

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

private void createCloseButton() {
  closeButton = new Button(I18N.CONSTANTS.close());
  addButton(closeButton);
  closeButton.addListener(Events.Select, new Listener<ButtonEvent>() {
    @Override
    public void handleEvent(ButtonEvent be) {
      hide();
    }
  });
}

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

/**
 * @param actionId The id to be provided to the
 *                 {@link org.activityinfo.ui.client.page.common.toolbar.ActionListener}
 *                 if the button is selected
 * @param text     Text of the button
 * @param icon     Icon of the button. See
 *                 {@link org.activityinfo.ui.client.style.legacy.icon.IconImageBundle}
 */
public Button addButton(String actionId, String text, AbstractImagePrototype icon) {
  Button button = new Button(text, icon);
  button.setItemId(actionId);
  button.addListener(Events.Select, this);
  add(button);
  return button;
}

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

private void createCancelButton() {
  cancelButton = new Button(I18N.CONSTANTS.cancel());
  cancelButton.setIcon(IconImageBundle.ICONS.cancel());
  addButton(cancelButton);
  cancelButton.addListener(Events.Select, new Listener<ButtonEvent>() {
    @Override
    public void handleEvent(ButtonEvent be) {
      hide();
      onCancel();
    }
  });
}

代码示例来源:origin: geoserver/geofence

testConnectionButton.setIcon(Resources.ICONS.test());
testConnectionButton.addListener(Events.OnClick, new Listener<ButtonEvent>()

代码示例来源:origin: geoserver/geofence

groupsUserButton.setIcon(Resources.ICONS.table());
groupsUserButton.addListener(Events.OnClick, new Listener<ButtonEvent>()

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

private void createSaveButton() {
  saveButton = new Button(I18N.CONSTANTS.save());
  saveButton.setIcon(IconImageBundle.ICONS.save());
  saveButton.addListener(Events.Select, new Listener<ButtonEvent>() {
    @Override
    public void handleEvent(ButtonEvent be) {
      // use a deferred handler to make sure we get any change
      // events first
      Scheduler.get().scheduleDeferred(new ScheduledCommand() {
        @Override
        public void execute() {
          if (!form.isValid()) {
            MessageBox.alert(getHeadingHtml(),
                fromSafeConstant(I18N.CONSTANTS.pleaseCompleteForm()), null);
          } else {
            onValidated();
          }
        }
      });
    }
  });
  addButton(saveButton);
}

代码示例来源:origin: geoserver/geofence

removeUserButton.setIcon(Resources.ICONS.delete());
removeUserButton.addListener(Events.OnClick, new Listener<ButtonEvent>()

代码示例来源:origin: geoserver/geofence

removeProfileButton.setIcon(Resources.ICONS.delete());
removeProfileButton.addListener(Events.OnClick,
    new Listener<ButtonEvent>() {

代码示例来源:origin: geoserver/geofence

removeInstanceButton.setIcon(Resources.ICONS.delete());
removeInstanceButton.addListener(Events.OnClick, new Listener<ButtonEvent>()

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

private void createAddLayerButton() {
  Button addLayerButton = new Button();
  addLayerButton.setText(I18N.CONSTANTS.add());
  addLayerButton.addListener(Events.Select, new SelectionListener<ButtonEvent>() {
    @Override
    public void componentSelected(ButtonEvent ce) {
      final NewLayerWizard wizard = new NewLayerWizard(service, locator);
      addLayersDialog = new WizardDialog(wizard);
      addLayersDialog.show(new WizardCallback() {
        @Override
        public void onFinished() {
          addLayer(wizard.createLayer());
        }
      });
    }
  });
  addLayerButton.setIcon(IconImageBundle.ICONS.add());
  layersPanel.getHeader().addTool(addLayerButton);
}

代码示例来源:origin: geoserver/geofence

priorityUpButton.addListener(Events.OnClick,
    new Listener<ButtonEvent>() {

代码示例来源:origin: geoserver/geofence

ruleDetailsButton.setEnabled(true);
ruleDetailsButton.addListener(Events.OnClick,
    new Listener<ButtonEvent>() {

代码示例来源:origin: geoserver/geofence

removeButton.addListener(Events.OnClick, new Listener<ButtonEvent>()

代码示例来源:origin: geoserver/geofence

ruleAddButton.addListener(Events.OnClick,
    new Listener<ButtonEvent>() {

代码示例来源:origin: geoserver/geofence

priorityDownButton.addListener(Events.OnClick,
    new Listener<ButtonEvent>() {

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

saveButton.addListener(Events.Select, new Listener<ButtonEvent>() {
  @Override
  public void handleEvent(ButtonEvent be) {
discardButton.addListener(Events.Select, new Listener<ButtonEvent>() {
  @Override
  public void handleEvent(ButtonEvent be) {
addButton(cancelButton);
cancelButton.addListener(Events.Select, new Listener<ButtonEvent>() {
  @Override
  public void handleEvent(ButtonEvent be) {

代码示例来源:origin: geoserver/geofence

saveLayerDetailsButton.disable();
saveLayerDetailsButton.addListener(Events.OnClick, new Listener<ButtonEvent>()
cancelButton.addListener(Events.OnClick, new Listener<ButtonEvent>()

代码示例来源:origin: geoserver/geofence

addProfileButton.addListener(Events.OnClick, new Listener<ButtonEvent>()

相关文章