日期:2014-05-19  浏览次数:20936 次

求见解,这是什么语言代码?有资料的求点资料。
$package("com.qn.dlg");

com.qn.dlg.DirDlg = function (){
}

com.qn.dlg.DirDlg.prototype = new js.ui.BaseWindow();

com.qn.dlg.DirDlg.prototype.file = null;

com.qn.dlg.DirDlg.prototype.extendUI = function (){
var __this = this;
this.setTitle(props("Select Directory"));
var extui = this.getDomNode("com.qn.dlg.DirDlg");
this.container.appendChild(extui);
this.okButton = extui.getElementsByTagName("button")[0];
this.cancelButton = extui.getElementsByTagName("button")[1];
this.leftDiv = extui.getElementsByTagName("div")[1];
this.okButton.onclick = function(){
__this.result = 1;
__this.close();
__this.result = 0;
}
this.cancelButton.onclick = function(){
__this.result = 0;
__this.close();
}
this.ui.style.width = "500px";
this.ui.style.height = "300px";
this.buildTree();
}

com.qn.dlg.DirDlg.prototype.list = function (path){
if(path) {
var rootNode = this.tree.getRoot();
var file = rootNode.userObject;
file.setPath(path);
}
this.tree.setSelected(this.tree.getRoot());
}

com.qn.dlg.DirDlg.prototype.buildTree = function (){
var __this = this;
var tree = this.tree = new com.qn.ui.FileTreeView();
tree.getUI().style.height = "170px";
tree.getUI().style.width = "100%";

this.leftDiv.appendChild(tree.getUI());

var file = new com.qn.io.File();
file.type = 1;
file.setPath("/");
var rootnode = new js.ui.tree.TreeNode(tree);
rootnode.setUserObject(file);
tree.setRoot(rootnode);
// rootnode.getRenderer().text.innerHTML = props("Share Folders");

tree.onload = function(files, parentNode){
__this.currentPath = parentNode.userObject.getPath();
}
if(typeof(fillTreeSysIcons)!="undefined" && typeof(doFillRow)!="undefined"){
tree.getFile().onfillRow = doFillRow;
tree.onlist = fillTreeSysIcons;
}
}

------解决方案--------------------
探讨

javascript

------解决方案--------------------
探讨
这中JavaScript没见过呀!!!听说是JavaScript原型链是不是?