本文整理了Java中org.eclipse.swt.widgets.Widget.checkBits()
方法的一些代码示例,展示了Widget.checkBits()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Widget.checkBits()
方法的具体详情如下:
包路径:org.eclipse.swt.widgets.Widget
类名称: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);
}
内容来源于网络,如有侵权,请联系作者删除!