Menu
  • HOME
  • TAGS

JavaFX-CSS: How to “move” style of parent to a child?

java,javafx-8,treecell,javafx-css

The reason why it doesn't work is because .label doesn't have a rule where -fx-background is applied, so any value assigned to it won't affect any of the Label properties. What's more, Label doesn't use a -fx-background-color property. So an easy solution would be adding it: .tree-text-only > .label {...

JavaFx 8 TreeCell Drag and Drop

drag-and-drop,treeview,javafx-8,treecell

It seems the event handlers are not triggered until you put some content to Dragboard: setOnDragDetected(e -> { System.out.println(" Detected "); Dragboard db = startDragAndDrop(TransferMode.MOVE); ClipboardContent content = new ClipboardContent(); content.putString( "Hello!" ); db.setContent(content); e.consume(); }); You may also choose to use the other type of drag-n-drop mechanism described in...

JavaFx TreeCell how to expand nodes after one second

javafx,nodes,expand,treecell

You can use a PauseTransition for adding the delay. On its setOnFinished(), you can add an action to be performed after the supplied time has elapsed. On setOnDragEntered(), you can start the PauseTransition and on setOnDragExited(), check the status of PauseTransition and if it is still in RUNNING status, stop...