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

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

本文整理了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

  1. /** {@inheritDoc} */
  2. public int getMinimum() {
  3. return scale.getMinimum();
  4. }

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

  1. /** {@inheritDoc} */
  2. @Override
  3. public int getMinimum() {
  4. return scale.getMinimum();
  5. }

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

  1. /**
  2. * Gets the default minimim of the "Example" widgets.
  3. */
  4. @Override
  5. int getDefaultMinimum () {
  6. return scale1.getMinimum();
  7. }

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

  1. @Override
  2. int doGetIntValue(Object source) {
  3. return ((Scale) source).getMinimum();
  4. }

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

  1. /** {@inheritDoc} */
  2. public int getMinimum() {
  3. return scale.getMinimum();
  4. }

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

  1. private void writeMinimum( final Scale scale ) throws IOException {
  2. Integer newValue = new Integer( scale.getMinimum() );
  3. String prop = PROP_MINIMUM;
  4. Integer defValue = DEFAULT_MINIMUM;
  5. if( WidgetLCAUtil.hasChanged( scale, prop, newValue, defValue ) ) {
  6. JSWriter writer = JSWriter.getWriterFor( scale );
  7. writer.set( prop, newValue );
  8. }
  9. }

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

  1. @Override
  2. public void processReinit( Object aControlInitValue )
  3. {
  4. if ( ( slider != null ) && ( ! slider.isDisposed() ) )
  5. {
  6. if ( aControlInitValue != null )
  7. {
  8. // -- apply initValue if one has been specified --
  9. setValue( (String) aControlInitValue, true );
  10. }
  11. else
  12. {
  13. // -- set to minimum when no initValue exists --
  14. slider.setSelection( slider.getMinimum() );
  15. }
  16. }
  17. }

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

  1. /**
  2. * Sets the maximum value that the receiver will allow. This new
  3. * value will be ignored if it is not greater than the receiver's current
  4. * minimum value. If the new maximum is applied then the receiver's
  5. * selection value will be adjusted if necessary to fall within its new range.
  6. *
  7. * @param value the new maximum, which must be greater than the current minimum
  8. *
  9. * @exception SWTException <ul>
  10. * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
  11. * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  12. * </ul>
  13. */
  14. public void setMaximum (int value) {
  15. checkWidget ();
  16. int minimum = getMinimum();
  17. if (value <= minimum) return;
  18. OS.g_signal_handlers_block_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, VALUE_CHANGED);
  19. OS.gtk_range_set_range (handle, minimum, value);
  20. OS.g_signal_handlers_unblock_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, VALUE_CHANGED);
  21. }

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

  1. public void preserveValues( final Widget widget ) {
  2. Scale scale = ( Scale )widget;
  3. ControlLCAUtil.preserveValues( scale );
  4. IWidgetAdapter adapter = WidgetUtil.getAdapter( scale );
  5. boolean hasListeners = SelectionEvent.hasListener( scale );
  6. adapter.preserve( Props.SELECTION_LISTENERS,
  7. Boolean.valueOf( hasListeners ) );
  8. adapter.preserve( PROP_SELECTION,
  9. new Integer( scale.getSelection() ) );
  10. adapter.preserve( PROP_MAXIMUM,
  11. new Integer( scale.getMaximum() ) );
  12. adapter.preserve( PROP_MINIMUM,
  13. new Integer( scale.getMinimum() ) );
  14. adapter.preserve( PROP_PAGE_INCREMENT,
  15. new Integer( scale.getPageIncrement() ) );
  16. adapter.preserve( PROP_INCREMENT,
  17. new Integer( scale.getIncrement() ) );
  18. WidgetLCAUtil.preserveCustomVariant( scale );
  19. }

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

  1. /**
  2. * Sets the maximum value that the receiver will allow. This new
  3. * value will be ignored if it is not greater than the receiver's current
  4. * minimum value. If the new maximum is applied then the receiver's
  5. * selection value will be adjusted if necessary to fall within its new range.
  6. *
  7. * @param value the new maximum, which must be greater than the current minimum
  8. *
  9. * @exception SWTException <ul>
  10. * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
  11. * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  12. * </ul>
  13. */
  14. public void setMaximum (int value) {
  15. checkWidget ();
  16. int minimum = getMinimum();
  17. if (value <= minimum) return;
  18. OS.g_signal_handlers_block_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, VALUE_CHANGED);
  19. OS.gtk_range_set_range (handle, minimum, value);
  20. OS.g_signal_handlers_unblock_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, VALUE_CHANGED);
  21. }

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

  1. /**
  2. * Sets the maximum value that the receiver will allow. This new
  3. * value will be ignored if it is not greater than the receiver's current
  4. * minimum value. If the new maximum is applied then the receiver's
  5. * selection value will be adjusted if necessary to fall within its new range.
  6. *
  7. * @param value the new maximum, which must be greater than the current minimum
  8. *
  9. * @exception SWTException <ul>
  10. * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
  11. * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  12. * </ul>
  13. */
  14. public void setMaximum (int value) {
  15. checkWidget ();
  16. int minimum = getMinimum();
  17. if (value <= minimum) return;
  18. OS.g_signal_handlers_block_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, VALUE_CHANGED);
  19. OS.gtk_range_set_range (handle, minimum, value);
  20. OS.g_signal_handlers_unblock_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, VALUE_CHANGED);
  21. }

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

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

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

  1. @Override
  2. public void preserveValues( Scale scale ) {
  3. preserveProperty( scale, PROP_MINIMUM, scale.getMinimum() );
  4. preserveProperty( scale, PROP_MAXIMUM, scale.getMaximum() );
  5. preserveProperty( scale, PROP_SELECTION, scale.getSelection() );
  6. preserveProperty( scale, PROP_INCREMENT, scale.getIncrement() );
  7. preserveProperty( scale, PROP_PAGE_INCREMENT, scale.getPageIncrement() );
  8. }

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

  1. @Override
  2. public void renderChanges( Scale scale ) throws IOException {
  3. ControlLCAUtil.renderChanges( scale );
  4. WidgetLCAUtil.renderCustomVariant( scale );
  5. renderProperty( scale, PROP_MINIMUM, scale.getMinimum(), DEFAULT_MINIMUM );
  6. renderProperty( scale, PROP_MAXIMUM, scale.getMaximum(), DEFAULT_MAXIMUM );
  7. renderProperty( scale, PROP_SELECTION, scale.getSelection(), DEFAULT_SELECTION );
  8. renderProperty( scale, PROP_INCREMENT, scale.getIncrement(), DEFAULT_INCREMENT );
  9. renderProperty( scale, PROP_PAGE_INCREMENT, scale.getPageIncrement(), DEFAULT_PAGE_INCREMENT );
  10. renderListenSelection( scale );
  11. renderClientListeners( scale );
  12. }

相关文章