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

x33g5p2x  于2022-01-30 转载在 其他  
字(3.2k)|赞(0)|评价(0)|浏览(107)

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

Scrollable.traversalCode介绍

暂无

代码示例

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

@Override
int traversalCode (int key, GdkEventKey event) {
  int bits = super.traversalCode (key, event);
  if ((style & SWT.READ_ONLY) != 0)  return bits;
  if ((style & SWT.MULTI) != 0) {
    bits &= ~SWT.TRAVERSE_RETURN;
    if (key == OS.GDK_Tab && event != null) {
      boolean next = (event.state & OS.GDK_SHIFT_MASK) == 0;
      if (next && (event.state & OS.GDK_CONTROL_MASK) == 0) {
        bits &= ~(SWT.TRAVERSE_TAB_NEXT | SWT.TRAVERSE_TAB_PREVIOUS);
      }
    }
  }
  return bits;
}

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

@Override
int traversalCode (int key, GdkEventKey event) {
  int bits = super.traversalCode (key, event);
  if ((style & SWT.READ_ONLY) != 0)  return bits;
  if ((style & SWT.MULTI) != 0) {
    bits &= ~SWT.TRAVERSE_RETURN;
    if (key == OS.GDK_Tab && event != null) {
      boolean next = (event.state & OS.GDK_SHIFT_MASK) == 0;
      if (next && (event.state & OS.GDK_CONTROL_MASK) == 0) {
        bits &= ~(SWT.TRAVERSE_TAB_NEXT | SWT.TRAVERSE_TAB_PREVIOUS);
      }
    }
  }
  return bits;
}

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

@Override
int traversalCode (int key, GdkEventKey event) {
  int bits = super.traversalCode (key, event);
  if ((style & SWT.READ_ONLY) != 0)  return bits;
  if ((style & SWT.MULTI) != 0) {
    bits &= ~SWT.TRAVERSE_RETURN;
    if (key == OS.GDK_Tab && event != null) {
      boolean next = (event.state & OS.GDK_SHIFT_MASK) == 0;
      if (next && (event.state & OS.GDK_CONTROL_MASK) == 0) {
        bits &= ~(SWT.TRAVERSE_TAB_NEXT | SWT.TRAVERSE_TAB_PREVIOUS);
      }
    }
  }
  return bits;
}

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

@Override
int traversalCode(int key, GdkEventKey event) {
  if ((state & CANVAS) != 0) {
    if ((style & SWT.NO_FOCUS) != 0) return 0;
    if (hooksKeys ()) return 0;
  }
  return super.traversalCode (key, event);
}

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

int traversalCode (int key, NSEvent theEvent) {
  if ((state & CANVAS) != 0) {
    if ((style & SWT.NO_FOCUS) != 0) return 0;
    if (hooksKeys ()) return 0;
  }
  return super.traversalCode (key, theEvent);
}

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

@Override
int traversalCode(int key, GdkEventKey event) {
  if ((state & CANVAS) != 0) {
    if ((style & SWT.NO_FOCUS) != 0) return 0;
    if (hooksKeys ()) return 0;
  }
  return super.traversalCode (key, event);
}

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

@Override
int traversalCode(int key, GdkEventKey event) {
  if ((state & CANVAS) != 0) {
    if ((style & SWT.NO_FOCUS) != 0) return 0;
    if (hooksKeys ()) return 0;
  }
  return super.traversalCode (key, event);
}

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

int traversalCode (int key, NSEvent theEvent) {
  int bits = super.traversalCode (key, theEvent);
  if ((style & SWT.READ_ONLY) != 0) return bits;
  if ((style & SWT.MULTI) != 0) {
    bits &= ~SWT.TRAVERSE_RETURN;
    if (key == 48 /* Tab */ && theEvent != null) {
      long /*int*/ modifiers = theEvent.modifierFlags ();
      boolean next = (modifiers & OS.NSShiftKeyMask) == 0;
      if (next && (modifiers & OS.NSControlKeyMask) == 0) {
        bits &= ~(SWT.TRAVERSE_TAB_NEXT | SWT.TRAVERSE_TAB_PREVIOUS);
      }
    }
  }
  return bits;
}

相关文章

Scrollable类方法