mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-06-08 07:02:44 -04:00
offer creation screen, model updates, confirm comp.
This commit is contained in:
parent
a3bee7652b
commit
3f398755ad
53 changed files with 1261 additions and 1297 deletions
|
@ -1,23 +1,27 @@
|
|||
package io.bitsquare.gui.util;
|
||||
|
||||
import io.bitsquare.settings.Settings;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.text.DecimalFormat;
|
||||
import java.text.ParseException;
|
||||
import java.util.Locale;
|
||||
|
||||
public class Converter
|
||||
{
|
||||
public static double convertToDouble(String input)
|
||||
private static final Logger log = LoggerFactory.getLogger(Converter.class);
|
||||
|
||||
public static double stringToDouble(String input)
|
||||
{
|
||||
try
|
||||
{
|
||||
DecimalFormat decimalFormat = (DecimalFormat) DecimalFormat.getInstance(Settings.getLocale());
|
||||
DecimalFormat decimalFormat = (DecimalFormat) DecimalFormat.getInstance(Locale.getDefault());
|
||||
return decimalFormat.parse(input).doubleValue();
|
||||
} catch (ParseException e)
|
||||
{
|
||||
//e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
|
||||
log.warn(e.toString());
|
||||
}
|
||||
return 0.0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue