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

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

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

Scale.getMinimum介绍

[英]Returns the minimum value which the receiver will allow.
[中]返回接收器允许的最小值。

代码示例

代码示例来源:origin: net.java.dev.glazedlists/glazedlists_java15

/** {@inheritDoc} */
public int getMinimum() {
  return scale.getMinimum();
}

代码示例来源:origin: net.java.dev.glazedlists/glazedlists_java16

/** {@inheritDoc} */
@Override
public int getMinimum() {
  return scale.getMinimum();
}

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

/**
 * Gets the default minimim of the "Example" widgets.
 */
@Override
int getDefaultMinimum () {
  return scale1.getMinimum();
}

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

@Override
int doGetIntValue(Object source) {
  return ((Scale) source).getMinimum();
}

代码示例来源:origin: com.haulmont.thirdparty/glazedlists

/** {@inheritDoc} */
public int getMinimum() {
  return scale.getMinimum();
}

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

private void writeMinimum( final Scale scale ) throws IOException {
 Integer newValue = new Integer( scale.getMinimum() );
 String prop = PROP_MINIMUM;
 Integer defValue = DEFAULT_MINIMUM;
 if( WidgetLCAUtil.hasChanged( scale, prop, newValue, defValue ) ) {
  JSWriter writer = JSWriter.getWriterFor( scale );
  writer.set( prop, newValue );
 }
}

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

@Override
public void processReinit( Object aControlInitValue )
{
  if ( ( slider != null ) && ( ! slider.isDisposed() ) )
  {
    if ( aControlInitValue != null )
    {
      // -- apply initValue if one has been specified --
      setValue( (String) aControlInitValue, true );
    }
    else
    {
      // -- set to minimum when no initValue exists --
      slider.setSelection( slider.getMinimum() );
    }
  }
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc

/**
 * 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.
 *
 * @param value the new maximum, which must be greater than the current minimum
 *
 * @exception SWTException <ul>
 *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
 * </ul>
 */
public void setMaximum (int value) {
  checkWidget ();
  int minimum = getMinimum();
  if (value <= minimum) return;
  OS.g_signal_handlers_block_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, VALUE_CHANGED);
  OS.gtk_range_set_range (handle, minimum, value);
  OS.g_signal_handlers_unblock_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, VALUE_CHANGED);
}

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

public void preserveValues( final Widget widget ) {
 Scale scale = ( Scale )widget;
 ControlLCAUtil.preserveValues( scale );
 IWidgetAdapter adapter = WidgetUtil.getAdapter( scale );
 boolean hasListeners = SelectionEvent.hasListener( scale );
 adapter.preserve( Props.SELECTION_LISTENERS,
          Boolean.valueOf( hasListeners ) );
 adapter.preserve( PROP_SELECTION,
          new Integer( scale.getSelection() ) );
 adapter.preserve( PROP_MAXIMUM,
          new Integer( scale.getMaximum() ) );
 adapter.preserve( PROP_MINIMUM,
          new Integer( scale.getMinimum() ) );
 adapter.preserve( PROP_PAGE_INCREMENT,
          new Integer( scale.getPageIncrement() ) );
 adapter.preserve( PROP_INCREMENT,
          new Integer( scale.getIncrement() ) );
 WidgetLCAUtil.preserveCustomVariant( scale );
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x

/**
 * 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.
 *
 * @param value the new maximum, which must be greater than the current minimum
 *
 * @exception SWTException <ul>
 *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
 * </ul>
 */
public void setMaximum (int value) {
  checkWidget ();
  int minimum = getMinimum();
  if (value <= minimum) return;
  OS.g_signal_handlers_block_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, VALUE_CHANGED);
  OS.gtk_range_set_range (handle, minimum, value);
  OS.g_signal_handlers_unblock_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, VALUE_CHANGED);
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc

/**
 * 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.
 *
 * @param value the new maximum, which must be greater than the current minimum
 *
 * @exception SWTException <ul>
 *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
 * </ul>
 */
public void setMaximum (int value) {
  checkWidget ();
  int minimum = getMinimum();
  if (value <= minimum) return;
  OS.g_signal_handlers_block_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, VALUE_CHANGED);
  OS.gtk_range_set_range (handle, minimum, value);
  OS.g_signal_handlers_unblock_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, VALUE_CHANGED);
}

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

Scale scale = new Scale( metawidget.getCurrentLayoutComposite(), SWT.NONE );
scale.setMinimum( Integer.parseInt( minimumValue ) );
scale.setSelection( scale.getMinimum() );
scale.setMaximum( Integer.parseInt( maximumValue ) );

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

@Override
public void preserveValues( Scale scale ) {
 preserveProperty( scale, PROP_MINIMUM, scale.getMinimum() );
 preserveProperty( scale, PROP_MAXIMUM, scale.getMaximum() );
 preserveProperty( scale, PROP_SELECTION, scale.getSelection() );
 preserveProperty( scale, PROP_INCREMENT, scale.getIncrement() );
 preserveProperty( scale, PROP_PAGE_INCREMENT, scale.getPageIncrement() );
}

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

@Override
public void renderChanges( Scale scale ) throws IOException {
 ControlLCAUtil.renderChanges( scale );
 WidgetLCAUtil.renderCustomVariant( scale );
 renderProperty( scale, PROP_MINIMUM, scale.getMinimum(), DEFAULT_MINIMUM );
 renderProperty( scale, PROP_MAXIMUM, scale.getMaximum(), DEFAULT_MAXIMUM );
 renderProperty( scale, PROP_SELECTION, scale.getSelection(), DEFAULT_SELECTION );
 renderProperty( scale, PROP_INCREMENT, scale.getIncrement(), DEFAULT_INCREMENT );
 renderProperty( scale, PROP_PAGE_INCREMENT, scale.getPageIncrement(), DEFAULT_PAGE_INCREMENT );
 renderListenSelection( scale );
 renderClientListeners( scale );
}

相关文章