Example usage for org.apache.commons.math3.complex ComplexFormat ComplexFormat

List of usage examples for org.apache.commons.math3.complex ComplexFormat ComplexFormat

Introduction

In this page you can find the example usage for org.apache.commons.math3.complex ComplexFormat ComplexFormat.

Prototype

public ComplexFormat(String imaginaryCharacter) throws NullArgumentException, NoDataException 

Source Link

Document

Create an instance with a custom imaginary character, and the default number format for both real and imaginary parts.

Usage

From source file:org.nmrfx.processor.gui.ComplexOperationItem.java

public ComplexOperationItem(ChangeListener listener, Complex defaultValue, String category, String name,
        String description) {/*from   w w  w . java2 s.  c o  m*/
    super(category, name, description);
    if (defaultValue != null) {
        this.defaultValue = defaultValue;
    } else {
        this.defaultValue = Complex.ZERO;
    }
    this.value = this.defaultValue;
    this.listener = listener;
    this.cf = new ComplexFormat("j");
}