Archive

Posts Tagged ‘treeview’

JavaFX[1.3] – Power of CSS


There was a question related to setting of background color for TreeView. Yes we can do lot of customization of Controls using CSS. It may be a bit difficult at this point of time due to lack of proper documentation. But you can start playing with CSS using StyleEditor sample.

Below samples shows ListView and TreeView customized using javafx.css file. Thanks to Jasper Potts for help

For Applet mode, click on above image. For standalone mode

Try it out and let me know feedback It will be much much easier once the official documentation is in place..

Categories: javafx Tags: , , ,

JavaFX [1.3] – TreeView


JavaFX 1.3 has TreeView as preview control. Here I’ll demonstrate how to use it to implement a File Browser. For this, we need to implement a custom TreeView.cellFactory which will return a TreeCell instance (View) and provide an implementation for TreeItem (Model). TreeItem.createChildren is implemented so as to add more and more items, as and when user expands the nodes (Drive/Directory).

For Applet mode, click on above image

For standalone mode

Try all preview controls and give your valuable feedback and file RFEs/Bugs in JavaFX – JIRA

Categories: javafx Tags: , ,