本文整理了Java中org.eclipse.swt.widgets.Label.getStyle()
方法的一些代码示例,展示了Label.getStyle()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Label.getStyle()
方法的具体详情如下:
包路径:org.eclipse.swt.widgets.Label
类名称:Label
方法名:getStyle
暂无
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.examples
/**
* Sets the state of the "Example" widgets.
*/
@Override
void setExampleWidgetState () {
super.setExampleWidgetState ();
boolean isSeparator = (label1.getStyle () & SWT.SEPARATOR) != 0;
wrapButton.setSelection (!isSeparator && (label1.getStyle () & SWT.WRAP) != 0);
leftButton.setSelection (!isSeparator && (label1.getStyle () & SWT.LEFT) != 0);
centerButton.setSelection (!isSeparator && (label1.getStyle () & SWT.CENTER) != 0);
rightButton.setSelection (!isSeparator && (label1.getStyle () & SWT.RIGHT) != 0);
shadowInButton.setSelection (isSeparator && (label1.getStyle () & SWT.SHADOW_IN) != 0);
shadowOutButton.setSelection (isSeparator && (label1.getStyle () & SWT.SHADOW_OUT) != 0);
shadowNoneButton.setSelection (isSeparator && (label1.getStyle () & SWT.SHADOW_NONE) != 0);
horizontalButton.setSelection (isSeparator && (label1.getStyle () & SWT.HORIZONTAL) != 0);
verticalButton.setSelection (isSeparator && (label1.getStyle () & SWT.VERTICAL) != 0);
wrapButton.setEnabled (!isSeparator);
leftButton.setEnabled (!isSeparator);
centerButton.setEnabled (!isSeparator);
rightButton.setEnabled (!isSeparator);
shadowInButton.setEnabled (isSeparator);
shadowOutButton.setEnabled (isSeparator);
shadowNoneButton.setEnabled (isSeparator);
horizontalButton.setEnabled (isSeparator);
verticalButton.setEnabled (isSeparator);
}
}
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt.q07
private static void writeOrientation( final Label label ) throws IOException {
int style = label.getStyle();
String orient = ( style & SWT.VERTICAL ) != 0 ? "vertical" : "horizontal";
JSWriter writer = JSWriter.getWriterFor( label );
writer.set( "lineOrientation", orient );
}
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt.q07
private static void writeLineStyle( final Label label ) throws IOException {
JSWriter writer = JSWriter.getWriterFor( label );
if( ( label.getStyle() & SWT.SHADOW_IN ) != 0 ) {
writer.call( "setLineStyle", new Object[] { "rwt_SHADOW_IN" } );
} else if( ( label.getStyle() & SWT.SHADOW_OUT ) != 0 ) {
writer.call( "setLineStyle", new Object[] { "rwt_SHADOW_OUT" } );
} else {
writer.call( "setLineStyle", new Object[] { "rwt_SHADOW_NONE" } );
}
}
}
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt.q07
void renderInitialization( final Label label ) throws IOException {
JSWriter writer = JSWriter.getWriterFor( label );
writer.newWidget( QX_TYPE );
ControlLCAUtil.writeStyleFlags( label );
Boolean wrap = Boolean.valueOf( ( label.getStyle() & SWT.WRAP ) != 0 );
Object[] args = { label };
writer.callStatic( "org.eclipse.swt.LabelUtil.initialize", args );
Object[] argsWrap = { label, wrap };
writer.callStatic( "org.eclipse.swt.LabelUtil.setWrap", argsWrap );
}
内容来源于网络,如有侵权,请联系作者删除!