2023年6月2日18:28:13

master
zhangmeng 2023-06-03 18:28:31 +08:00
parent a9415a3ada
commit 39c6185b3a
1 changed files with 10 additions and 0 deletions

View File

@ -10,6 +10,7 @@ import javafx.beans.property.SimpleIntegerProperty;
import javafx.beans.value.ChangeListener; import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue; import javafx.beans.value.ObservableValue;
import javafx.collections.FXCollections; import javafx.collections.FXCollections;
import javafx.collections.ListChangeListener;
import javafx.collections.ObservableList; import javafx.collections.ObservableList;
import javafx.event.ActionEvent; import javafx.event.ActionEvent;
import javafx.fxml.FXML; import javafx.fxml.FXML;
@ -80,6 +81,15 @@ public class FileEditController {
splitPane.getItems().add(1, tabPane); splitPane.getItems().add(1, tabPane);
splitPane.setDividerPosition(0, 0.20); splitPane.setDividerPosition(0, 0.20);
splitPane.setDividerPosition(1, 0.80); splitPane.setDividerPosition(1, 0.80);
tabPane.getTabs().addListener(new ListChangeListener<Tab>() {
@Override
public void onChanged(Change<? extends Tab> c) {
if (c.wasRemoved()){
filePaths_list.remove(c);
}
}
});
} }
@FXML @FXML