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

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

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

Scale.getMaximum介绍

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

代码示例

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

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

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

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

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

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

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

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

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

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

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

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

代码示例来源: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.ppc

  1. /**
  2. * Sets the minimum value that the receiver will allow. This new
  3. * value will be ignored if it is negative or is not less than the receiver's
  4. * current maximum value. If the new minimum 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 minimum, which must be nonnegative and less than the current maximum
  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 setMinimum (int value) {
  15. checkWidget ();
  16. if (value < 0) return;
  17. int maximum = getMaximum ();
  18. if (value >= maximum) return;
  19. OS.g_signal_handlers_block_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, VALUE_CHANGED);
  20. OS.gtk_range_set_range (handle, value, maximum);
  21. OS.g_signal_handlers_unblock_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, VALUE_CHANGED);
  22. }

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

  1. /**
  2. * Sets the minimum value that the receiver will allow. This new
  3. * value will be ignored if it is negative or is not less than the receiver's
  4. * current maximum value. If the new minimum 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 minimum, which must be nonnegative and less than the current maximum
  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 setMinimum (int value) {
  15. checkWidget ();
  16. if (value < 0) return;
  17. int maximum = getMaximum ();
  18. if (value >= maximum) return;
  19. OS.g_signal_handlers_block_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, VALUE_CHANGED);
  20. OS.gtk_range_set_range (handle, value, maximum);
  21. OS.g_signal_handlers_unblock_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, VALUE_CHANGED);
  22. }

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

  1. /**
  2. * Sets the minimum value that the receiver will allow. This new
  3. * value will be ignored if it is negative or is not less than the receiver's
  4. * current maximum value. If the new minimum 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 minimum, which must be nonnegative and less than the current maximum
  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 setMinimum (int value) {
  15. checkWidget ();
  16. if (value < 0) return;
  17. int maximum = getMaximum ();
  18. if (value >= maximum) return;
  19. OS.g_signal_handlers_block_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, VALUE_CHANGED);
  20. OS.gtk_range_set_range (handle, value, maximum);
  21. OS.g_signal_handlers_unblock_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, VALUE_CHANGED);
  22. }

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

相关文章