Skip to content

Commit

Permalink
Removed spacer constructor using active parameter.
Browse files Browse the repository at this point in the history
  • Loading branch information
dlemmermann committed Aug 22, 2023
1 parent 7678f5e commit 0ec69a0
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions gemsfx/src/main/java/com/dlsc/gemsfx/Spacer.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,22 +34,16 @@
public class Spacer extends Region {

public Spacer() {
this(true);
}

public Spacer(boolean active) {
getStyleClass().add("spacer");

setActive(active);

managedProperty().bind(visibleProperty());
visibleProperty().bind(activeProperty());

VBox.setVgrow(this, Priority.ALWAYS);
HBox.setHgrow(this, Priority.ALWAYS);
}

private final BooleanProperty active = new StyleableBooleanProperty(false) {
private final BooleanProperty active = new StyleableBooleanProperty(true) {
@Override
public Object getBean() {
return Spacer.this;
Expand All @@ -74,7 +68,7 @@ public final void setActive(boolean value) {
active.set(value);
}

public BooleanProperty activeProperty() {
public final BooleanProperty activeProperty() {
return active;
}

Expand Down

0 comments on commit 0ec69a0

Please sign in to comment.