drag over highlight

This commit is contained in:
Craig Raw
2020-04-12 18:40:31 +02:00
parent 87efdfdd5d
commit 3d04ce4686
2 changed files with 19 additions and 2 deletions
@@ -32,6 +32,7 @@ import java.util.ResourceBundle;
public class AppController implements Initializable {
private static final String TRANSACTION_TAB_TYPE = "transaction";
public static final String DRAG_OVER_CLASS = "drag-over";
@FXML
private CheckMenuItem showTxHex;
@@ -70,6 +71,14 @@ public class AppController implements Initializable {
event.consume();
});
rootStack.setOnDragEntered(event -> {
rootStack.getStyleClass().add(DRAG_OVER_CLASS);
});
rootStack.setOnDragExited(event -> {
rootStack.getStyleClass().removeAll(DRAG_OVER_CLASS);
});
tabs.getSelectionModel().selectedItemProperty().addListener((observable, old_val, selectedTab) -> {
if(selectedTab != null) {
String tabType = (String)selectedTab.getUserData();