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

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

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

Scale.setMaximum介绍

[英]Sets the maximum value that the receiver will allow. This new value will be ignored if it is not greater than the receiver's current minimum value. If the new maximum 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).setMaximum(value);
}

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

/**
 * Sets the minimim of the "Example" widgets.
 */
@Override
void setWidgetMaximum () {
  scale1.setMaximum (maximumSpinner.getSelection ());
}

代码示例来源:origin: stackoverflow.com

scale.setMaximum (4);
scale.setPageIncrement (1);
scale.setSelection(4);

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

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

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

toolkit.adapt(slider, true, true);
slider.setMinimum(0);
slider.setMaximum(Sensitivity.values().length - 1);
slider.setIncrement(1);
slider.setSize(200, 10);

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

sliderData.horizontalSpan = numColumns;
slider.setLayoutData( sliderData );
slider.setMaximum( numColumns > 1 ? numColumns - 1 : 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: 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: BiglySoftware/BiglyBT

privacy_scale.setMaximum( 30 );

代码示例来源: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.setMaximum(50);
airbrushRadiusScale.setSelection(toolSettings.airbrushRadius);
airbrushRadiusScale.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_FILL));
airbrushIntensityScale.setMaximum(100);
airbrushIntensityScale.setSelection(toolSettings.airbrushIntensity);
airbrushIntensityScale.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_FILL));

代码示例来源: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.setMaximum(SCALE_MAX);
Layouts.setGridData(scale).grabHorizontal().horizontalSpan(3);
scale.addListener(SWT.Selection, event -> {

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

scale.setMaximum(self.getInt("maximum", 1));

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

utils_.createInfoPop(clientScale_, INFOPOP_WSWSCEN_SCALE_CLIENT);    
clientScale_.setMinimum(0);
clientScale_.setMaximum(6);
clientScale_.setIncrement(1);
clientScale_.addSelectionListener(scaleSelectionListener);

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

scale.setMaximum(255);
Rx.subscribe(luminance, scale::setSelection);
scale.addListener(SWT.Selection, e -> {

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

相关文章