From c5cfe4d1b353f75505352d2f59093bce2ee15224 Mon Sep 17 00:00:00 2001 From: Jan-Peter Klein Date: Mon, 16 Sep 2024 15:40:52 +0200 Subject: [PATCH] removed unnecessary properties --- .../cryptomator/ui/controls/NotificationBar.java | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/src/main/java/org/cryptomator/ui/controls/NotificationBar.java b/src/main/java/org/cryptomator/ui/controls/NotificationBar.java index 15641b2fc..fa52c7a4e 100644 --- a/src/main/java/org/cryptomator/ui/controls/NotificationBar.java +++ b/src/main/java/org/cryptomator/ui/controls/NotificationBar.java @@ -4,8 +4,6 @@ import org.cryptomator.ui.common.FxmlFile; import javafx.beans.property.BooleanProperty; import javafx.beans.property.SimpleBooleanProperty; -import javafx.beans.property.SimpleStringProperty; -import javafx.beans.property.StringProperty; import javafx.fxml.FXML; import javafx.fxml.FXMLLoader; import javafx.scene.control.Button; @@ -21,7 +19,6 @@ public class NotificationBar extends HBox { @FXML private Button closeButton; - private final StringProperty textProperty = new SimpleStringProperty(); private final BooleanProperty dismissable = new SimpleBooleanProperty(); private final BooleanProperty notify = new SimpleBooleanProperty(); @@ -29,7 +26,6 @@ public class NotificationBar extends HBox { public NotificationBar() { loadFXML(); closeButton.visibleProperty().bind(dismissable); - notificationLabel.textProperty().bind(textProperty); visibleProperty().bind(notifyProperty()); managedProperty().bind(notifyProperty()); @@ -54,15 +50,11 @@ public class NotificationBar extends HBox { } public String getText() { - return textProperty.get(); + return notificationLabel.getText(); } public void setText(String text) { - textProperty.set(text); - } - - public StringProperty textProperty() { - return textProperty; + notificationLabel.setText(text); } public void setStyleClass(String styleClass) { @@ -77,10 +69,6 @@ public class NotificationBar extends HBox { dismissable.set(value); } - public BooleanProperty dismissableProperty() { - return dismissable; - } - public boolean getNotify() { return notify.get(); }