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

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

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

Button.menuShell介绍

暂无

代码示例

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

@Override
long /*int*/ gtk_focus_out_event (long /*int*/ widget, long /*int*/ event) {
  long /*int*/ result = super.gtk_focus_out_event (widget, event);
  // widget could be disposed at this point
  if (handle == 0) return 0;
  if ((style & SWT.PUSH) != 0) {
    Decorations menuShell = menuShell ();
    if (menuShell.defaultButton == this) {
      menuShell.defaultButton = null;
    }
  }
  return result;
}

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

@Override
int /*long*/ gtk_focus_out_event (int /*long*/ widget, int /*long*/ event) {
  int /*long*/ result = super.gtk_focus_out_event (widget, event);
  // widget could be disposed at this point
  if (handle == 0) return 0;
  if ((style & SWT.PUSH) != 0) {
    Decorations menuShell = menuShell ();
    if (menuShell.defaultButton == this) {
      menuShell.defaultButton = null;
    }
  }
  return result;
}

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

@Override
int /*long*/ gtk_focus_out_event (int /*long*/ widget, int /*long*/ event) {
  int /*long*/ result = super.gtk_focus_out_event (widget, event);
  // widget could be disposed at this point
  if (handle == 0) return 0;
  if ((style & SWT.PUSH) != 0) {
    Decorations menuShell = menuShell ();
    if (menuShell.defaultButton == this) {
      menuShell.defaultButton = null;
    }
  }
  return result;
}

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

@Override
int /*long*/ gtk_focus_in_event (int /*long*/ widget, int /*long*/ event) {
  int /*long*/ result = super.gtk_focus_in_event (widget, event);
  // widget could be disposed at this point
  if (handle == 0) return 0;
  if ((style & SWT.PUSH) != 0 && OS.gtk_widget_has_default (handle)) {
    Decorations menuShell = menuShell ();
    menuShell.defaultButton = this;
  }
  return result;
}

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

@Override
long /*int*/ gtk_focus_in_event (long /*int*/ widget, long /*int*/ event) {
  long /*int*/ result = super.gtk_focus_in_event (widget, event);
  // widget could be disposed at this point
  if (handle == 0) return 0;
  if ((style & SWT.PUSH) != 0 && OS.gtk_widget_has_default (handle)) {
    Decorations menuShell = menuShell ();
    menuShell.defaultButton = this;
  }
  return result;
}

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

@Override
int /*long*/ gtk_focus_in_event (int /*long*/ widget, int /*long*/ event) {
  int /*long*/ result = super.gtk_focus_in_event (widget, event);
  // widget could be disposed at this point
  if (handle == 0) return 0;
  if ((style & SWT.PUSH) != 0 && OS.gtk_widget_has_default (handle)) {
    Decorations menuShell = menuShell ();
    menuShell.defaultButton = this;
  }
  return result;
}

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

@Override
LRESULT WM_KILLFOCUS (int /*long*/ wParam, int /*long*/ lParam) {
  LRESULT result = super.WM_KILLFOCUS (wParam, lParam);
  if ((style & SWT.PUSH) != 0 && getDefault ()) {
    menuShell ().setDefaultButton (null, false);
  }
  return result;
}

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

void setDefault (boolean value) {
  if ((style & SWT.PUSH) == 0) return;
  int /*long*/ hwndShell = menuShell ().handle;
  int bits = OS.GetWindowLong (handle, OS.GWL_STYLE);
  if (value) {
    bits |= OS.BS_DEFPUSHBUTTON;
    OS.SendMessage (hwndShell, OS.DM_SETDEFID, handle, 0);
  } else {
    bits &= ~OS.BS_DEFPUSHBUTTON;
    OS.SendMessage (hwndShell, OS.DM_SETDEFID, 0, 0);
  }
  OS.SendMessage (handle, OS.BM_SETSTYLE, bits, 1);
}

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

@Override
LRESULT WM_SETFOCUS (int /*long*/ wParam, int /*long*/ lParam) {
  /*
  * Feature in Windows. When Windows sets focus to
  * a radio button, it sets the WS_TABSTOP style.
  * This is undocumented and unwanted.  The fix is
  * to save and restore the window style bits.
  */
  int bits = 0;
  if ((style & SWT.RADIO) != 0) {
    bits = OS.GetWindowLong (handle, OS.GWL_STYLE);
  }
  LRESULT result = super.WM_SETFOCUS (wParam, lParam);
  if ((style & SWT.RADIO) != 0) {
    OS.SetWindowLong (handle, OS.GWL_STYLE, bits);
  }
  if ((style & SWT.PUSH) != 0) {
    menuShell ().setDefaultButton (this, false);
  }
  return result;
}

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

if (button != null) {
  if (button.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
  if (button.menuShell () != this) error(SWT.ERROR_INVALID_PARENT);

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

if (button != null) {
  if (button.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
  if (button.menuShell () != this) error (SWT.ERROR_INVALID_PARENT);
  buttonHandle = button.handle;

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

if (button != null) {
  if (button.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
  if (button.menuShell () != this) error (SWT.ERROR_INVALID_PARENT);
  buttonHandle = button.handle;

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

if (button != null) {
  if (button.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
  if (button.menuShell () != this) error (SWT.ERROR_INVALID_PARENT);
  buttonHandle = button.handle;

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

if (button != null) {
  if (button.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
  if (button.menuShell () != this) error (SWT.ERROR_INVALID_PARENT);
  if ((button.style & SWT.PUSH) == 0) return;

相关文章

Button类方法