Monday May 10, 2010

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).

<script src="http://dl.javafx.com/1.3/dtfx.js"></script> <script src="http://javafxdemos.googlecode.com/hg/resource/FileBrowser/FileBrowser.js"></script>

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

Monday Apr 26, 2010

JavaFX [1.3] - Save As Image


JavaFX - Save As Image code updated to be compatible with JavaFX 1.3
Please refer to JavaFX13Utils.fx for more information. You will need to update only if you are using internal APIs as mentioned in this forum thread.

<script src="http://dl.javafx.com/1.3/dtfx.js"></script> <script src="http://javafxdemos.googlecode.com/hg/resource/SaveAsImage/1.3/SaveAsImage.js"></script>

For Applet mode, click on above image

For standalone mode

Try it out and let me know feedback

About


The views expressed on this blog are my own and do not necessarily reflect that of my organization

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today