Wed Jan 26, 2011 8:09 pm
Thu Jan 27, 2011 9:05 am
Thu Jan 27, 2011 2:08 pm
Thu Jan 27, 2011 5:19 pm
import javafx.stage.Stage;
import javafx.scene.Scene;
import javafx.scene.paint.Stop;
import javafx.scene.paint.Color;
import javafx.scene.effect.DropShadow;
import javafx.scene.paint.LinearGradient;
import java.lang.System;
import com.javafx.preview.control.TreeItem;
import com.javafx.preview.control.TreeItemBase;
import com.javafx.preview.control.TreeView;
import java.io.*;
import java.lang.String;
var w = 500;
var h = 300;
var tree = TreeView {
effect:DropShadow{offsetY:3 offsetX:3}
root: TreeItem {
def home_name = System.getProperty("user.name");
data: new File("C:/Documents and Settings/{home_name}/Favorites")
expanded:false
//isLeaf: isLeaf
createChildren: createChildren;
}
}
function createChildren(item:TreeItemBase):TreeItemBase[] {
def file = item.data as File;
if (file.isDirectory()) {
return for (f in file.listFiles())
{
TreeItem {
var xz = f.split("/"); // <-- this wont work
data: xz[1];
createChildren: createChildren;
//isLeaf: isLeaf;
}
}
}
return [];
}
Fri Jan 28, 2011 3:19 am
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com
Powered by phpBB © phpBB Group.