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

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

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

Button.sendSelectionEvent介绍

暂无

代码示例

代码示例来源:origin: org.eclipse.swt.cocoa.macosx/x86_64

void click () {
  sendSelectionEvent (SWT.Selection);
}

代码示例来源:origin: org.eclipse.swt.cocoa.macosx/x86_64

boolean setRadioSelection (boolean value){
  if ((style & SWT.RADIO) == 0) return false;
  if (getSelection () != value) {
    setSelection (value);
    sendSelectionEvent (SWT.Selection);
  }
  return true;
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x

@Override
boolean setRadioSelection (boolean value) {
  if ((style & SWT.RADIO) == 0) return false;
  if (getSelection () != value) {
    setSelection (value);
    sendSelectionEvent (SWT.Selection);
  }
  return true;
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc

@Override
boolean setRadioSelection (boolean value) {
  if ((style & SWT.RADIO) == 0) return false;
  if (getSelection () != value) {
    setSelection (value);
    sendSelectionEvent (SWT.Selection);
  }
  return true;
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc

@Override
boolean setRadioSelection (boolean value) {
  if ((style & SWT.RADIO) == 0) return false;
  if (getSelection () != value) {
    setSelection (value);
    sendSelectionEvent (SWT.Selection);
  }
  return true;
}

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86

@Override
boolean setRadioSelection (boolean value) {
  if ((style & SWT.RADIO) == 0) return false;
  if (getSelection () != value) {
    setSelection (value);
    sendSelectionEvent (SWT.Selection);
  }
  return true;
}

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86

@Override
LRESULT wmCommandChild (int /*long*/ wParam, int /*long*/ lParam) {
  int code = OS.HIWORD (wParam);
  switch (code) {
    case OS.BN_CLICKED:
    case OS.BN_DOUBLECLICKED:
      if ((style & (SWT.CHECK | SWT.TOGGLE)) != 0) {
        setSelection (!getSelection ());
      } else {
        if ((style & SWT.RADIO) != 0) {
          if ((parent.getStyle () & SWT.NO_RADIO_GROUP) != 0) {
            setSelection (!getSelection ());
          } else {
            selectRadio ();
          }
        }
      }
      sendSelectionEvent (SWT.Selection);
  }
  return super.wmCommandChild (wParam, lParam);
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc

@Override
int /*long*/ gtk_clicked (int /*long*/ widget) {
  if ((style & SWT.RADIO) != 0) {
    if ((parent.getStyle () & SWT.NO_RADIO_GROUP) != 0) {
      setSelection (!selected);
    } else {
      selectRadio ();
    }
  } else {
    if ((style & SWT.CHECK) != 0) {
      if (grayed) {
        if (OS.gtk_toggle_button_get_active (handle)) {
          OS.gtk_toggle_button_set_inconsistent (handle, true);
        } else {
          OS.gtk_toggle_button_set_inconsistent (handle, false);
        }
      }
    }
  }
  sendSelectionEvent (SWT.Selection);
  return 0;
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x

@Override
long /*int*/ gtk_clicked (long /*int*/ widget) {
  if ((style & SWT.RADIO) != 0) {
    if ((parent.getStyle () & SWT.NO_RADIO_GROUP) != 0) {
      setSelection (!selected);
    } else {
      selectRadio ();
    }
  } else {
    if ((style & SWT.CHECK) != 0) {
      if (grayed) {
        if (OS.gtk_toggle_button_get_active (handle)) {
          OS.gtk_toggle_button_set_inconsistent (handle, true);
        } else {
          OS.gtk_toggle_button_set_inconsistent (handle, false);
        }
      }
    }
  }
  sendSelectionEvent (SWT.Selection);
  return 0;
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc

@Override
int /*long*/ gtk_clicked (int /*long*/ widget) {
  if ((style & SWT.RADIO) != 0) {
    if ((parent.getStyle () & SWT.NO_RADIO_GROUP) != 0) {
      setSelection (!selected);
    } else {
      selectRadio ();
    }
  } else {
    if ((style & SWT.CHECK) != 0) {
      if (grayed) {
        if (OS.gtk_toggle_button_get_active (handle)) {
          OS.gtk_toggle_button_set_inconsistent (handle, true);
        } else {
          OS.gtk_toggle_button_set_inconsistent (handle, false);
        }
      }
    }
  }
  sendSelectionEvent (SWT.Selection);
  return 0;
}

代码示例来源:origin: org.eclipse.swt.cocoa.macosx/x86_64

void sendSelection () {
  if ((style & SWT.RADIO) != 0) {
    if ((parent.getStyle () & SWT.NO_RADIO_GROUP) == 0) {
      selectRadio ();
    }
  }
  if ((style & SWT.CHECK) != 0) {
    if (grayed && ((NSButton)view).state() == OS.NSOnState) {
      ((NSButton)view).setState(OS.NSOffState);
    }
    if (!grayed && ((NSButton)view).state() == OS.NSMixedState) {
      ((NSButton)view).setState(OS.NSOnState);
    }
  }
  sendSelectionEvent (SWT.Selection);
}

相关文章

Button类方法