Skip to content

Commit

Permalink
Add default constructor for backwards compatibility with FXML.
Browse files Browse the repository at this point in the history
  • Loading branch information
andytill committed Apr 20, 2017
1 parent e5936ea commit afe6402
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>andytill</groupId>
<artifactId>floaty-field</artifactId>
<version>1.1.0</version>
<version>1.2.0</version>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down
10 changes: 10 additions & 0 deletions src/main/java/floatyfield/FloatyFieldView.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,22 @@ public class FloatyFieldView implements Initializable {
@FXML
private TextField field;

/**
* Constructor for manual instantiation.
*/
public FloatyFieldView(Label label, TextField field) {
this.label = label;
this.field = field;
initialize(null, null);
}

/**
* Used for FXML instantiation only.
*/
public FloatyFieldView() {

}

@Override
public void initialize(URL url, ResourceBundle r) {
BooleanBinding textNotEmpty = field.textProperty().isEqualTo("").not();
Expand Down

0 comments on commit afe6402

Please sign in to comment.