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

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

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

Scale.setMinimum介绍

[英]Sets the minimum value that the receiver will allow. This new value will be ignored if it is negative or is not less than the receiver's current maximum value. If the new minimum is applied then the receiver's selection value will be adjusted if necessary to fall within its new range.
[中]设置接收器允许的最小值。如果该新值为负值或不小于接收器的当前最大值,则该值将被忽略。如果应用了新的最小值,则接收机的选择值将在必要时调整,以在其新范围内。

代码示例

代码示例来源:origin: org.eclipse.platform/org.eclipse.jface.databinding

@Override
void doSetIntValue(Object source, int value) {
  ((Scale) source).setMinimum(value);
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.examples

/**
 * Sets the minimim of the "Example" widgets.
 */
@Override
void setWidgetMinimum () {
  scale1.setMinimum (minimumSpinner.getSelection ());
}

代码示例来源:origin: org.metawidget.modules/metawidget-all

scale.setMinimum( Integer.parseInt( minimumValue ) );
scale.setSelection( scale.getMinimum() );
scale.setMaximum( Integer.parseInt( maximumValue ) );

代码示例来源:origin: inspectIT/inspectIT

slider.setMinimum(0);
slider.setMaximum(Sensitivity.values().length - 1);
slider.setIncrement(1);

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

/**
 * Update the scale particulars with set values.
 */
private void updateScale() {
  if (scale != null && !scale.isDisposed()) {
    scale.setMinimum(getMinimum());
    scale.setMaximum(getMaximum());
    scale.setIncrement(getIncrement());
    scale.setPageIncrement(getPageIncrement());
  }
}

代码示例来源:origin: Nodeclipse/EditBox

gd.widthHint = 80;
scale.setLayoutData(gd);
scale.setMinimum(0);
scale.setMinimum(255);
scale.addSelectionListener(new SelectionAdapter() {
  @Override

代码示例来源:origin: BiglySoftware/BiglyBT

privacy_scale.setLayoutData(gd);
privacy_scale.setMinimum( 0 );
privacy_scale.setMaximum( 30 );

代码示例来源:origin: org.eclipse.platform/org.eclipse.jface

/**
 * Update the scale particulars with set values.
 */
private void updateScale() {
  if (scale != null && !scale.isDisposed()) {
    scale.setMinimum(getMinimum());
    scale.setMaximum(getMaximum());
    scale.setIncrement(getIncrement());
    scale.setPageIncrement(getPageIncrement());
  }
}

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jface

/**
 * Update the scale particulars with set values.
 */
private void updateScale() {
  if (scale != null && !scale.isDisposed()) {
    scale.setMinimum(getMinimum());
    scale.setMaximum(getMaximum());
    scale.setIncrement(getIncrement());
    scale.setPageIncrement(getPageIncrement());
  }
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.examples

airbrushRadiusScale.setMinimum(5);
airbrushRadiusScale.setMaximum(50);
airbrushRadiusScale.setSelection(toolSettings.airbrushRadius);
airbrushIntensityScale.setMinimum(1);
airbrushIntensityScale.setMaximum(100);
airbrushIntensityScale.setSelection(toolSettings.airbrushIntensity);

代码示例来源: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.setMinimum(0);
scale.setMaximum(SCALE_MAX);
Layouts.setGridData(scale).grabHorizontal().horizontalSpan(3);

代码示例来源:origin: org.xworker/xworker_swt

scale.setMinimum(self.getInt("minimum", 1));

代码示例来源:origin: org.eclipse/org.eclipse.jst.ws.consumption.ui

clientScale_.setMinimum(0);
clientScale_.setMaximum(6);
clientScale_.setIncrement(1);

代码示例来源:origin: diffplug/gradle-and-eclipse-rcp

scale.setMinimum(0);
scale.setMaximum(255);
Rx.subscribe(luminance, scale::setSelection);

代码示例来源: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());
      });
    });
  }
}

相关文章