javax.swing.text.NumberFormatter.setFormat()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(2.4k)|赞(0)|评价(0)|浏览(137)

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

NumberFormatter.setFormat介绍

暂无

代码示例

代码示例来源:origin: org.softsmithy.lib/lib-core

@Override
public void setFormat(Format format) {
  if (format != null && ! (format instanceof NumberFormat)){
    throw new IllegalArgumentException("format must be an instance of NumberFormat or null");
  }
  super.setFormat(format);
}

代码示例来源:origin: org.softsmithy.lib/softsmithy-lib-swing

@Override
public void setFormat(Format format) {
  if (format != null && ! (format instanceof NumberFormat)){
    throw new IllegalArgumentException("format must be an instance of NumberFormat or null");
  }
  super.setFormat(format);
}

代码示例来源:origin: Chatanga/Girinoscope

private void update() {
    try {
      formatTextField.setBackground(null);
      applyAction.setEnabled(true);
      for (NumberFormatter formatter : dynamicFormatters) {
        formatter.setFormat(new DecimalFormat(formatTextField.getText()));
      }
      startValueTextField.setValue(startValueTextField.getValue());
      endValueTextField.setValue(endValueTextField.getValue());
      incrementTextField.setValue(incrementTextField.getValue());
    } catch (IllegalArgumentException e) {
      formatTextField.setBackground(Color.RED);
      applyAction.setEnabled(false);
    }
  }
});

代码示例来源:origin: de.sciss/scisslib

numberFormatter.setFormat( numberFormat );
if( space.isInteger() ) {
  numberFormatter.setValueClass( Long.class );

代码示例来源:origin: net.sourceforge.ondex.apps/ovtk2-poplar

intFormatter.setFormat(integerFormat);
intFormatter.setMinimum(minimum);
intFormatter.setMaximum(maximum);

代码示例来源:origin: net.sourceforge.ondex.apps/ovtk2

intFormatter.setFormat(integerFormat);
intFormatter.setMinimum(minimum);
intFormatter.setMaximum(maximum);

代码示例来源:origin: com.github.haifengl/smile-plot

intFormatter.setFormat(integerFormat);
intFormatter.setOverwriteMode(false);
intFormatter.setMinimum(minimum);

代码示例来源:origin: com.github.haifengl/smile-plot

doubleFormatter.setFormat(doubleFormat);
doubleFormatter.setOverwriteMode(false);
doubleFormatter.setMinimum(minimum);

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

intFormatter.setFormat(integerFormat);
intFormatter.setMinimum(minimum);
intFormatter.setMaximum(maximum);

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

NumberFormatter intFormatter = new NumberFormatter(integerFormat);
intFormatter.setFormat(integerFormat);

相关文章