Skip to content

Commit

Permalink
Unit internationalization, fixed setting storage problems.
Browse files Browse the repository at this point in the history
Internationalized unit storage, fixed settings storing coin selection.
Fixed float rounding problem.
  • Loading branch information
zackurben committed Jan 12, 2014
1 parent 9120daf commit 696f6e9
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 7 deletions.
6 changes: 6 additions & 0 deletions changelog.txt
@@ -1,2 +1,8 @@
1.0.0
- Initial release.

1.0.1
- Fixed problem coin selection problem in settings with GUI.
- Fixed problem storing data for non US-LOCALE computers.
- Fixed float round-down problem.
- Updated version numbers.
6 changes: 3 additions & 3 deletions src/Dashboard.java
Expand Up @@ -4,7 +4,7 @@
* under the Apache V2 License, which can be found at: gson/LICENSE.txt
*
* Dashboard.java
* Version : 1.0.0
* Version : 1.0.1
* Author : Zack Urben
* Contact : zackurben@gmail.com
* Creation : 12/31/13
Expand Down Expand Up @@ -417,12 +417,12 @@ private void loadSettings() {
* Write settings from GUI to user Reinvestor Object.
*/
private void updateSettings() {
this.user.BTC.active = CHECKBOX_BTC.isEnabled();
this.user.BTC.active = CHECKBOX_BTC.isSelected();
this.user.BTC.reserve = Float.valueOf(INPUT_RESERVE_BTC.getText());
this.user.BTC.max = Float.valueOf(INPUT_MAX_BTC.getText());
this.user.BTC.min = Float.valueOf(INPUT_MIN_BTC.getText());

this.user.NMC.active = CHECKBOX_NMC.isEnabled();
this.user.NMC.active = CHECKBOX_NMC.isSelected();
this.user.NMC.reserve = Float.valueOf(INPUT_RESERVE_NMC.getText());
this.user.NMC.max = Float.valueOf(INPUT_MAX_NMC.getText());
this.user.NMC.min = Float.valueOf(INPUT_MIN_NMC.getText());
Expand Down
4 changes: 2 additions & 2 deletions src/Login.java
Expand Up @@ -4,7 +4,7 @@
* under the Apache V2 License, which can be found at: gson/LICENSE.txt
*
* Login.java
* Version : 1.0.0
* Version : 1.0.1
* Author : Zack Urben
* Contact : zackurben@gmail.com
* Creation : 12/31/13
Expand Down Expand Up @@ -87,7 +87,7 @@ private void initialize() {
LABEL_VERSION.setBounds(317, 178, 47, 16);
PANEL.add(LABEL_VERSION);

LABEL_VERSION_NUMBER = new JLabel("1.0.0");
LABEL_VERSION_NUMBER = new JLabel("1.0.1");
LABEL_VERSION_NUMBER.setEnabled(false);
LABEL_VERSION_NUMBER.setBounds(371, 178, 61, 16);
PANEL.add(LABEL_VERSION_NUMBER);
Expand Down
8 changes: 6 additions & 2 deletions src/Reinvestor.java
Expand Up @@ -4,7 +4,7 @@
* under the Apache V2 License, which can be found at: gson/LICENSE.txt
*
* Reinvestor.java
* Version : 1.0.0
* Version : 1.0.1
* Author : Zack Urben
* Contact : zackurben@gmail.com
* Creation : 12/31/13
Expand All @@ -24,8 +24,10 @@
import java.io.PrintWriter;
import java.math.RoundingMode;
import java.text.DecimalFormat;
import java.text.DecimalFormatSymbols;
import java.util.ArrayList;
import java.util.Date;
import java.util.Locale;
import java.util.Scanner;
import zackurben.cex.data.*;
import zackurben.cex.data.Balance.Currency;
Expand Down Expand Up @@ -186,7 +188,9 @@ public void log(String file, String input) {
*/
public String formatNumber(float input) {
DecimalFormat format = new DecimalFormat("###0.00000000");
format.setRoundingMode(RoundingMode.DOWN);
format.setRoundingMode(RoundingMode.HALF_DOWN);
format.setDecimalFormatSymbols(DecimalFormatSymbols
.getInstance(Locale.US));
return format.format(input);
}

Expand Down

0 comments on commit 696f6e9

Please sign in to comment.