本文整理了Java中org.eclipse.swt.widgets.Scale.<init>()
方法的一些代码示例,展示了Scale.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Scale.<init>()
方法的具体详情如下:
包路径:org.eclipse.swt.widgets.Scale
类名称:Scale
方法名:<init>
[英]Constructs a new instance of this class given its parent and a style value describing its behavior and appearance.
The style value is either one of the style constants defined in class SWT
which is applicable to instances of this class, or must be built by bitwise OR'ing together (that is, using the int
"|" operator) two or more of those SWT
style constants. The class description lists the style constants that are applicable to the class. Style bits are also inherited from superclasses.
[中]根据该类的父类和描述其行为和外观的样式值,构造该类的新实例。
样式值可以是类SWT
中定义的样式常量之一,该类适用于该类的实例,或者必须通过位或组合(即使用int
“|”运算符)两个或多个SWT
样式常量来构建。类描述列出了适用于该类的样式常量。样式位也继承自超类。
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.examples
/**
* Creates the "Example" widgets.
*/
@Override
void createExampleWidgets () {
/* Compute the widget style */
int style = getDefaultStyle();
if (horizontalButton.getSelection ()) style |= SWT.HORIZONTAL;
if (verticalButton.getSelection ()) style |= SWT.VERTICAL;
if (borderButton.getSelection ()) style |= SWT.BORDER;
/* Create the example widgets */
scale1 = new Scale (scaleGroup, style);
}
代码示例来源:origin: org.metawidget.modules/metawidget-all
Scale scale = new Scale( metawidget.getCurrentLayoutComposite(), SWT.NONE );
scale.setMinimum( Integer.parseInt( minimumValue ) );
scale.setSelection( scale.getMinimum() );
代码示例来源:origin: inspectIT/inspectIT
sliderLabel.setLayoutData(data);
slider = new Scale(composite, SWT.HORIZONTAL);
toolkit.adapt(slider, true, true);
slider.setMinimum(0);
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jface
/**
* Returns this field editor's scale control. The control is created if it
* does not yet exist.
*
* @param parent
* the parent
* @return the scale control
*/
private Scale getScaleControl(Composite parent) {
if (scale == null) {
scale = new Scale(parent, SWT.HORIZONTAL);
scale.setFont(parent.getFont());
scale.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent event) {
valueChanged();
}
});
scale.addDisposeListener(event -> scale = null);
} else {
checkParent(scale, parent);
}
return scale;
}
代码示例来源:origin: atdl4j/atdl4j
slider = new Scale( c, style | SWT.HORIZONTAL );
slider.setIncrement( 1 );
slider.setPageIncrement( 1 );
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.jface
/**
* Returns this field editor's scale control. The control is created if it
* does not yet exist.
*
* @param parent
* the parent
* @return the scale control
*/
private Scale getScaleControl(Composite parent) {
if (scale == null) {
scale = new Scale(parent, SWT.HORIZONTAL);
scale.setFont(parent.getFont());
scale.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent event) {
valueChanged();
}
});
scale.addDisposeListener(new DisposeListener() {
public void widgetDisposed(DisposeEvent event) {
scale = null;
}
});
} else {
checkParent(scale, parent);
}
return scale;
}
代码示例来源:origin: stefanhaustein/flowgrid
setControl(scale = new Scale(maybeAddLabel(parentComposite), SWT.NONE));
scale.addSelectionListener(new SelectionAdapter() {
@Override
代码示例来源:origin: BiglySoftware/BiglyBT
label.setLayoutData(gd);
privacy_scale = new Scale(slider2_comp, SWT.HORIZONTAL);
代码示例来源:origin: Nodeclipse/EditBox
la.setLayoutData(gd);
scale = new Scale(c, SWT.HORIZONTAL);
scale.setToolTipText("Can slow down box drawing");
gd = new GridData();
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.examples
label.setText(getResourceString("settings.AirbrushRadius.text"));
final Scale airbrushRadiusScale = new Scale(toolSettingsFrame, SWT.HORIZONTAL);
airbrushRadiusScale.setMinimum(5);
airbrushRadiusScale.setMaximum(50);
label.setText(getResourceString("settings.AirbrushIntensity.text"));
final Scale airbrushIntensityScale = new Scale(toolSettingsFrame, SWT.HORIZONTAL);
airbrushIntensityScale.setMinimum(1);
airbrushIntensityScale.setMaximum(100);
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.examples
scale = new Scale(shell, SWT.NONE);
代码示例来源:origin: org.eclipse.platform/org.eclipse.jface
/**
* Returns this field editor's scale control. The control is created if it
* does not yet exist.
*
* @param parent
* the parent
* @return the scale control
*/
private Scale getScaleControl(Composite parent) {
if (scale == null) {
scale = new Scale(parent, SWT.HORIZONTAL);
scale.setFont(parent.getFont());
scale.addSelectionListener(widgetSelectedAdapter(event -> valueChanged()));
scale.addDisposeListener(event -> scale = null);
} else {
checkParent(scale, parent);
}
return scale;
}
代码示例来源:origin: diffplug/gradle-and-eclipse-rcp
public IntValue(Composite parent, int initialValue) {
inputField = new Text(parent, SWT.BORDER | SWT.SINGLE);
outputField = new Label(parent, SWT.NONE);
scale = new Scale(parent, SWT.HORIZONTAL);
inputField.setText(Integer.toString(initialValue));
outputField.setText(msgForValue(initialValue));
scale.setMinimum(0);
scale.setMaximum(100);
scale.setSelection(initialValue);
Layouts.setGrid(parent);
Layouts.setGridData(inputField).grabHorizontal();
Layouts.setGridData(outputField).grabHorizontal();
Layouts.setGridData(scale).grabHorizontal();
}
代码示例来源:origin: com.diffplug.durian/durian-swt
scale = new Scale(wrapped, SWT.HORIZONTAL);
scale.setMinimum(0);
scale.setMaximum(SCALE_MAX);
代码示例来源:origin: org.xworker/xworker_swt
Scale scale = new Scale(parent, style);
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.examples
children [i] = progress;
} else if (control.equals ("Scale")) {
Scale scale = new Scale (layoutComposite, SWT.NONE);
children [i] = scale;
} else if (control.equals ("Slider")) {
代码示例来源:origin: org.eclipse/org.eclipse.jst.ws.consumption.ui
clientComposite_.setLayoutData(scGridData);
clientScale_ = new Scale(clientComposite_ , SWT.VERTICAL | SWT.BORDER);
utils_.createInfoPop(clientScale_, INFOPOP_WSWSCEN_SCALE_CLIENT);
clientScale_.setMinimum(0);
代码示例来源:origin: diffplug/gradle-and-eclipse-rcp
Scale scale = new Scale(wrapped, SWT.HORIZONTAL);
scale.setMinimum(0);
scale.setMaximum(255);
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.examples
scale = new Scale(shell, SWT.NONE);
scale.setToolTipText("Scale ToolTip");
overrideScale = new Scale(shell, SWT.NONE);
overrideScale.setToolTipText("Scale ToolTip");
overrideScale.setData("name", "Scale");
代码示例来源:origin: diffplug/gradle-and-eclipse-rcp
@Test
public void testControl() {
InteractiveTest.testCoat("Should show the YCbCr plane at various values of Y", cmp -> {
Layouts.setGrid(cmp);
Scale scale = new Scale(cmp, SWT.HORIZONTAL);
scale.setMinimum(0);
scale.setMaximum(255);
scale.setSelection(128);
Layouts.setGridData(scale).grabHorizontal();
ColorPicker colors = new ColorPicker(cmp);
Layouts.setGridData(colors).grabAll();
scale.addListener(SWT.Selection, e -> {
colors.setY(scale.getSelection());
});
});
}
}
内容来源于网络,如有侵权,请联系作者删除!