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

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

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

Spinner.getDigits介绍

[英]Returns the number of decimal places used by the receiver.
[中]返回接收器使用的小数位数。

代码示例

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

/**
 * Gets the default digits of the "Example" widgets.
 */
int getDefaultDigits () {
  return spinner1.getDigits();
}

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

private static void renderDigits( Spinner spinner ) {
 renderProperty( spinner, PROP_DIGITS, spinner.getDigits(), DEFAULT_DIGITS );
}

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

private static void writeValues( final Spinner spinner ) throws IOException {
 JSWriter writer = JSWriter.getWriterFor( spinner );
 writer.set( PROP_DIGITS,
       "digits",
       new Integer( spinner.getDigits() ),
       DEFAULT_DIGITS );
 writer.set( PROP_INCREMENT,
       "incrementAmount",
       new Integer( spinner.getIncrement() ),
       DEFAULT_INCREMENT );
 writer.set( PROP_INCREMENT,
       "wheelIncrementAmount",
       new Integer( spinner.getIncrement() ),
       DEFAULT_INCREMENT );
 writer.set( PROP_PAGE_INCREMENT,
       "pageIncrementAmount",
       new Integer( spinner.getPageIncrement() ),
       DEFAULT_PAGE_INCREMENT );
}

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

public void preserveValues( final Widget widget ) {
 Spinner spinner = ( Spinner )widget;
 ControlLCAUtil.preserveValues( spinner );
 IWidgetAdapter adapter = WidgetUtil.getAdapter( widget );
 adapter.preserve( PROP_SELECTION, new Integer( spinner.getSelection() ) );
 adapter.preserve( PROP_MINIMUM, new Integer( spinner.getMinimum() ) );
 adapter.preserve( PROP_MAXIMUM, new Integer( spinner.getMaximum() ) );
 adapter.preserve( PROP_DIGITS, new Integer( spinner.getDigits() ) );
 adapter.preserve( PROP_INCREMENT, new Integer( spinner.getIncrement() ) );
 adapter.preserve( PROP_PAGE_INCREMENT,
          new Integer( spinner.getPageIncrement() ) );
 adapter.preserve( PROP_MODIFY_LISTENER,
          Boolean.valueOf( ModifyEvent.hasListener( spinner ) ) );
 adapter.preserve( PROP_SELECTION_LISTENER,
          Boolean.valueOf( SelectionEvent.hasListener( spinner ) ) );
 adapter.preserve( PROP_TEXT_LIMIT, new Integer( spinner.getTextLimit() ) );
 adapter.preserve( PROP_DECIMAL_SEPARATOR, getDecimalSeparator() );
 WidgetLCAUtil.preserveCustomVariant( spinner );
}

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

@Override
public void preserveValues( Spinner spinner ) {
 preserveProperty( spinner, PROP_MINIMUM, spinner.getMinimum() );
 preserveProperty( spinner, PROP_MAXIMUM, spinner.getMaximum() );
 preserveProperty( spinner, PROP_SELECTION, spinner.getSelection() );
 preserveProperty( spinner, PROP_DIGITS, spinner.getDigits() );
 preserveProperty( spinner, PROP_INCREMENT, spinner.getIncrement() );
 preserveProperty( spinner, PROP_PAGE_INCREMENT, spinner.getPageIncrement() );
 preserveProperty( spinner, PROP_TEXT_LIMIT, getTextLimit( spinner ) );
 preserveProperty( spinner, PROP_DECIMAL_SEPARATOR, getDecimalSeparator() );
}

相关文章