修复添加实例目录页面有一个空 Tooltip 的问题 (#5112)
This commit is contained in:
@@ -23,7 +23,6 @@ import javafx.beans.property.SimpleBooleanProperty;
|
|||||||
import javafx.beans.property.SimpleStringProperty;
|
import javafx.beans.property.SimpleStringProperty;
|
||||||
import javafx.beans.property.StringProperty;
|
import javafx.beans.property.StringProperty;
|
||||||
import javafx.scene.control.Label;
|
import javafx.scene.control.Label;
|
||||||
import javafx.scene.control.Tooltip;
|
|
||||||
import javafx.scene.layout.BorderPane;
|
import javafx.scene.layout.BorderPane;
|
||||||
import javafx.scene.layout.VBox;
|
import javafx.scene.layout.VBox;
|
||||||
import javafx.stage.DirectoryChooser;
|
import javafx.stage.DirectoryChooser;
|
||||||
@@ -45,7 +44,6 @@ public class FileItem extends BorderPane {
|
|||||||
|
|
||||||
private final SimpleStringProperty name = new SimpleStringProperty(this, "name");
|
private final SimpleStringProperty name = new SimpleStringProperty(this, "name");
|
||||||
private final SimpleStringProperty title = new SimpleStringProperty(this, "title");
|
private final SimpleStringProperty title = new SimpleStringProperty(this, "title");
|
||||||
private final SimpleStringProperty tooltip = new SimpleStringProperty(this, "tooltip");
|
|
||||||
private final SimpleStringProperty path = new SimpleStringProperty(this, "path");
|
private final SimpleStringProperty path = new SimpleStringProperty(this, "path");
|
||||||
private final SimpleBooleanProperty convertToRelativePath = new SimpleBooleanProperty(this, "convertToRelativePath");
|
private final SimpleBooleanProperty convertToRelativePath = new SimpleBooleanProperty(this, "convertToRelativePath");
|
||||||
|
|
||||||
@@ -65,10 +63,6 @@ public class FileItem extends BorderPane {
|
|||||||
FXUtils.installFastTooltip(right, i18n("button.edit"));
|
FXUtils.installFastTooltip(right, i18n("button.edit"));
|
||||||
setRight(right);
|
setRight(right);
|
||||||
|
|
||||||
Tooltip tip = new Tooltip();
|
|
||||||
tip.textProperty().bind(tooltipProperty());
|
|
||||||
Tooltip.install(this, tip);
|
|
||||||
|
|
||||||
convertToRelativePath.addListener(onInvalidating(() -> path.set(processPath(path.get()))));
|
convertToRelativePath.addListener(onInvalidating(() -> path.set(processPath(path.get()))));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -142,18 +136,6 @@ public class FileItem extends BorderPane {
|
|||||||
this.title.set(title);
|
this.title.set(title);
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getTooltip() {
|
|
||||||
return tooltip.get();
|
|
||||||
}
|
|
||||||
|
|
||||||
public StringProperty tooltipProperty() {
|
|
||||||
return tooltip;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setTooltip(String tooltip) {
|
|
||||||
this.tooltip.set(tooltip);
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getPath() {
|
public String getPath() {
|
||||||
return path.get();
|
return path.get();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user