org.eclipse.swt.widgets.Button.addFocusListener()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(2.8k)|赞(0)|评价(0)|浏览(164)

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

Button.addFocusListener介绍

暂无

代码示例

代码示例来源:origin: pentaho/pentaho-kettle

public void addFocusListener( FocusListener lsFocus ) {
 wBox.addFocusListener( lsFocus );
}

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jface

@Override
protected void doSetFocus() {
  button.setFocus();
  // add a FocusListener to the button
  button.addFocusListener(getButtonFocusListener());
}

代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.jface

protected void doSetFocus() {
  button.setFocus();
  
  // add a FocusListener to the button
  button.addFocusListener(getButtonFocusListener());
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.jface

@Override
protected void doSetFocus() {
  button.setFocus();
  // add a FocusListener to the button
  button.addFocusListener(getButtonFocusListener());
}

代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.jface

public void widgetSelected(SelectionEvent event) {
    // Remove the button's focus listener since it's guaranteed
    // to lose focus when the dialog opens
    button.removeFocusListener(getButtonFocusListener());
    
    Object newValue = openDialogBox(editor);
    
    // Re-add the listener once the dialog closes
    button.addFocusListener(getButtonFocusListener());
    if (newValue != null) {
      boolean newValidState = isCorrect(newValue);
      if (newValidState) {
        markDirty();
        doSetValue(newValue);
      } else {
        // try to insert the current value into the error message.
        setErrorMessage(MessageFormat.format(getErrorMessage(),
            new Object[] { newValue.toString() }));
      }
      fireApplyEditorValue();
    }
  }
});

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jface

@Override
  public void widgetSelected(SelectionEvent event) {
    // Remove the button's focus listener since it's guaranteed
    // to lose focus when the dialog opens
    button.removeFocusListener(getButtonFocusListener());
    Object newValue = openDialogBox(editor);
    // Re-add the listener once the dialog closes
    button.addFocusListener(getButtonFocusListener());
    if (newValue != null) {
      boolean newValidState = isCorrect(newValue);
      if (newValidState) {
        markDirty();
        doSetValue(newValue);
      } else {
        // try to insert the current value into the error message.
        setErrorMessage(MessageFormat.format(getErrorMessage(),
            new Object[] { newValue.toString() }));
      }
      fireApplyEditorValue();
    }
  }
});

代码示例来源:origin: org.eclipse.pde/org.eclipse.pde.ui

button.setToolTipText(element.getPath());
button.setData(element);
button.addFocusListener(this);
button.addSelectionListener(this);

代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.jface

button.addFocusListener(getButtonFocusListener());

代码示例来源:origin: org.eclipse.platform/org.eclipse.jface

button.addFocusListener(getButtonFocusListener());
  button.addFocusListener(getButtonFocusListener());

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jface

button.addFocusListener(getButtonFocusListener());

相关文章

Button类方法