All Downloads are FREE. Search and download functionalities are using the official Maven repository.

eu.hansolo.steelseries.tools.NumberFormat Maven / Gradle / Ivy

Go to download

The SteelSeries is a javabeans component library that contains gauges. You will find linear and radial gauges. In addition you will also find digital displays.

There is a newer version: 3.9.6
Show newest version
/*
 */
package eu.hansolo.steelseries.tools;

/**
 * @author Gerrit Grunwald 
 */
public enum NumberFormat
{
    AUTO("0"),
    STANDARD("0"),
    FRACTIONAL("0.0#"),
    SCIENTIFIC("0.##E0"),
    PERCENTAGE("##0.0%");
    
    
    private final java.text.DecimalFormat DF;
    
    private NumberFormat(final String FORMAT_STRING)
    {
        DF = new java.text.DecimalFormat(FORMAT_STRING);
    }
    
    public String format(final Number NUMBER)
    {
        return DF.format(NUMBER);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy