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

x33g5p2x  于2022-02-02 转载在 其他  
字(6.3k)|赞(0)|评价(0)|浏览(122)

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

Widget.checkBits介绍

[英]Returns a style with exactly one style bit set out of the specified set of exclusive style bits. All other possible bits are cleared when the first matching bit is found. Bits that are not part of the possible set are untouched.
[中]返回一个样式,该样式在指定的独占样式位集合中只设置了一个样式位。当找到第一个匹配位时,所有其他可能的位都被清除。不属于可能集合的位将保持不变。

代码示例

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

void checkOrientation (Widget parent) {
  style &= ~SWT.MIRRORED;
  if ((style & (SWT.LEFT_TO_RIGHT | SWT.RIGHT_TO_LEFT)) == 0) {
    if (parent != null) {
      if ((parent.style & SWT.LEFT_TO_RIGHT) != 0) style |= SWT.LEFT_TO_RIGHT;
      if ((parent.style & SWT.RIGHT_TO_LEFT) != 0) style |= SWT.RIGHT_TO_LEFT;
    }
  }
  style = checkBits (style, SWT.LEFT_TO_RIGHT, SWT.RIGHT_TO_LEFT, 0, 0, 0, 0);
}

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

void checkOrientation (Widget parent) {
  style &= ~SWT.MIRRORED;
  if ((style & (SWT.LEFT_TO_RIGHT | SWT.RIGHT_TO_LEFT)) == 0) {
    if (parent != null) {
      if ((parent.style & SWT.LEFT_TO_RIGHT) != 0) style |= SWT.LEFT_TO_RIGHT;
      if ((parent.style & SWT.RIGHT_TO_LEFT) != 0) style |= SWT.RIGHT_TO_LEFT;
    }
  }
  style = checkBits (style, SWT.LEFT_TO_RIGHT, SWT.RIGHT_TO_LEFT, 0, 0, 0, 0);
}

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

void checkOrientation (Widget parent) {
  style &= ~SWT.MIRRORED;
  if ((style & (SWT.LEFT_TO_RIGHT | SWT.RIGHT_TO_LEFT)) == 0) {
    if (parent != null) {
      if ((parent.style & SWT.LEFT_TO_RIGHT) != 0) style |= SWT.LEFT_TO_RIGHT;
      if ((parent.style & SWT.RIGHT_TO_LEFT) != 0) style |= SWT.RIGHT_TO_LEFT;
    }
  }
  style = checkBits (style, SWT.LEFT_TO_RIGHT, SWT.RIGHT_TO_LEFT, 0, 0, 0, 0);
}

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

void checkOrientation (Widget parent) {
  style &= ~SWT.MIRRORED;
  if ((style & (SWT.LEFT_TO_RIGHT | SWT.RIGHT_TO_LEFT)) == 0) {
    if (parent != null) {
      if ((parent.style & SWT.LEFT_TO_RIGHT) != 0) style |= SWT.LEFT_TO_RIGHT;
      if ((parent.style & SWT.RIGHT_TO_LEFT) != 0) style |= SWT.RIGHT_TO_LEFT;
    }
  }
  style = checkBits (style, SWT.LEFT_TO_RIGHT, SWT.RIGHT_TO_LEFT, 0, 0, 0, 0);
}

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

void checkOrientation (Widget parent) {
  style &= ~SWT.MIRRORED;
  if ((style & (SWT.LEFT_TO_RIGHT | SWT.RIGHT_TO_LEFT)) == 0) {
    if (parent != null) {
      if ((parent.style & SWT.LEFT_TO_RIGHT) != 0) style |= SWT.LEFT_TO_RIGHT;
      if ((parent.style & SWT.RIGHT_TO_LEFT) != 0) style |= SWT.RIGHT_TO_LEFT;
    }
  }
  style = checkBits (style, SWT.LEFT_TO_RIGHT, SWT.RIGHT_TO_LEFT, 0, 0, 0, 0);
}

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

void checkOrientation( Widget parent ) {
 style &= ~SWT.MIRRORED;
 if( ( style & ( SWT.LEFT_TO_RIGHT | SWT.RIGHT_TO_LEFT ) ) == 0 ) {
  if( parent != null ) {
   if( ( parent.style & SWT.LEFT_TO_RIGHT ) != 0 ) {
    style |= SWT.LEFT_TO_RIGHT;
   }
   if( ( parent.style & SWT.RIGHT_TO_LEFT ) != 0 ) {
    style |= SWT.RIGHT_TO_LEFT;
   }
  }
 }
 style = checkBits( style, SWT.LEFT_TO_RIGHT, SWT.RIGHT_TO_LEFT, 0, 0, 0, 0 );
}

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

static int checkStyle (Shell parent, int style) {
  int mask = SWT.PRIMARY_MODAL | SWT.APPLICATION_MODAL | SWT.SYSTEM_MODAL;
  if ((style & SWT.SHEET) != 0) {
    style &= ~SWT.SHEET;
    if ((style & mask) == 0) {
      style |= parent == null ? SWT.APPLICATION_MODAL : SWT.PRIMARY_MODAL;
    }
  }
  if ((style & mask) == 0) {
    style |= SWT.APPLICATION_MODAL;
  }
  style &= ~SWT.MIRRORED;
  if ((style & (SWT.LEFT_TO_RIGHT | SWT.RIGHT_TO_LEFT)) == 0) {
    if (parent != null) {
      if ((parent.style & SWT.LEFT_TO_RIGHT) != 0) style |= SWT.LEFT_TO_RIGHT;
      if ((parent.style & SWT.RIGHT_TO_LEFT) != 0) style |= SWT.RIGHT_TO_LEFT;
    }
  }
  return Widget.checkBits (style, SWT.LEFT_TO_RIGHT, SWT.RIGHT_TO_LEFT, 0, 0, 0, 0);
}

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

static int checkStyle (Shell parent, int style) {
  int mask = SWT.PRIMARY_MODAL | SWT.APPLICATION_MODAL | SWT.SYSTEM_MODAL;
  if ((style & SWT.SHEET) != 0) {
    style &= ~SWT.SHEET;
    if ((style & mask) == 0) {
      style |= parent == null ? SWT.APPLICATION_MODAL : SWT.PRIMARY_MODAL;
    }
  }
  if ((style & mask) == 0) {
    style |= SWT.APPLICATION_MODAL;
  }
  style &= ~SWT.MIRRORED;
  if ((style & (SWT.LEFT_TO_RIGHT | SWT.RIGHT_TO_LEFT)) == 0) {
    if (parent != null) {
      if ((parent.style & SWT.LEFT_TO_RIGHT) != 0) style |= SWT.LEFT_TO_RIGHT;
      if ((parent.style & SWT.RIGHT_TO_LEFT) != 0) style |= SWT.RIGHT_TO_LEFT;
    }
  }
  return Widget.checkBits (style, SWT.LEFT_TO_RIGHT, SWT.RIGHT_TO_LEFT, 0, 0, 0, 0);
}

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

static int checkStyle (Shell parent, int style) {
  int mask = SWT.PRIMARY_MODAL | SWT.APPLICATION_MODAL | SWT.SYSTEM_MODAL;
  if ((style & SWT.SHEET) != 0) {
    style &= ~SWT.SHEET;
    if ((style & mask) == 0) {
      style |= parent == null ? SWT.APPLICATION_MODAL : SWT.PRIMARY_MODAL;
    }
  }
  if ((style & mask) == 0) {
    style |= SWT.APPLICATION_MODAL;
  }
  style &= ~SWT.MIRRORED;
  if ((style & (SWT.LEFT_TO_RIGHT | SWT.RIGHT_TO_LEFT)) == 0) {
    if (parent != null) {
      if ((parent.style & SWT.LEFT_TO_RIGHT) != 0) style |= SWT.LEFT_TO_RIGHT;
      if ((parent.style & SWT.RIGHT_TO_LEFT) != 0) style |= SWT.RIGHT_TO_LEFT;
    }
  }
  return Widget.checkBits (style, SWT.LEFT_TO_RIGHT, SWT.RIGHT_TO_LEFT, 0, 0, 0, 0);
}

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

static int checkStyle (Shell parent, int style) {
  int mask = SWT.PRIMARY_MODAL | SWT.APPLICATION_MODAL | SWT.SYSTEM_MODAL;
  if ((style & SWT.SHEET) != 0) {
    style &= ~SWT.SHEET;
    if ((style & mask) == 0) {
      style |= parent == null ? SWT.APPLICATION_MODAL : SWT.PRIMARY_MODAL;
    }
  }
  if ((style & mask) == 0) {
    style |= SWT.APPLICATION_MODAL;
  }
  style &= ~SWT.MIRRORED;
  if ((style & (SWT.LEFT_TO_RIGHT | SWT.RIGHT_TO_LEFT)) == 0) {
    if (parent != null) {
      if ((parent.style & SWT.LEFT_TO_RIGHT) != 0) style |= SWT.LEFT_TO_RIGHT;
      if ((parent.style & SWT.RIGHT_TO_LEFT) != 0) style |= SWT.RIGHT_TO_LEFT;
    }
  }
  return Widget.checkBits (style, SWT.LEFT_TO_RIGHT, SWT.RIGHT_TO_LEFT, 0, 0, 0, 0);
}

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

static int checkStyle (Shell parent, int style) {
  int mask = SWT.PRIMARY_MODAL | SWT.APPLICATION_MODAL | SWT.SYSTEM_MODAL;
  if ((style & SWT.SHEET) != 0) {
    style &= ~SWT.SHEET;
    if ((style & mask) == 0) {
      style |= parent == null ? SWT.APPLICATION_MODAL : SWT.PRIMARY_MODAL;
    }
  }
  if ((style & mask) == 0) {
    style |= SWT.APPLICATION_MODAL;
  }
  style &= ~SWT.MIRRORED;
  if ((style & (SWT.LEFT_TO_RIGHT | SWT.RIGHT_TO_LEFT)) == 0) {
    if (parent != null) {
      if ((parent.style & SWT.LEFT_TO_RIGHT) != 0) style |= SWT.LEFT_TO_RIGHT;
      if ((parent.style & SWT.RIGHT_TO_LEFT) != 0) style |= SWT.RIGHT_TO_LEFT;
    }
  }
  return Widget.checkBits (style, SWT.LEFT_TO_RIGHT, SWT.RIGHT_TO_LEFT, 0, 0, 0, 0);
}

相关文章

Widget类方法