Skip to content

Commit

Permalink
Removed the use of non static initializers
Browse files Browse the repository at this point in the history
  • Loading branch information
ckjr committed Oct 22, 2016
1 parent a4245f5 commit d250435
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
8 changes: 2 additions & 6 deletions src/main/java/seedu/commando/commons/core/GuiSettings.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,10 @@
*/
public class GuiSettings implements Serializable {

private Double windowWidth;
private Double windowHeight;
private Double windowWidth = Config.DefaultWindowWidth;
private Double windowHeight = Config.DefaultWindowHeight;
private boolean isMaximized;
private Point windowCoordinates; // null represent no coordinates
{
windowWidth = Config.DefaultWindowWidth;
windowHeight = Config.DefaultWindowHeight;
}

public GuiSettings() {
this.windowCoordinates = null;
Expand Down
8 changes: 2 additions & 6 deletions src/main/java/seedu/commando/model/UserPrefs.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,8 @@
*/
public class UserPrefs {

private GuiSettings guiSettings;
private StringProperty toDoListFilePath;
{
guiSettings = new GuiSettings();
toDoListFilePath = new SimpleStringProperty(Config.DefaultToDoListFilePath);
}
private GuiSettings guiSettings = new GuiSettings();
private StringProperty toDoListFilePath = new SimpleStringProperty(Config.DefaultToDoListFilePath);

public UserPrefs() {}

Expand Down

0 comments on commit d250435

Please sign in to comment.