⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bindowstest.xml

📁 ajax 框价.是个好工具.javascript 矿家.可以用在任何平台.
💻 XML
📖 第 1 页 / 共 3 页
字号:
	});		// Init tool bar command.	toolBarCommand.addEventListener("checkedchanged", function (e) {		toolBar.setVisible(this.getChecked());		toolBar.getParent().layoutAllChildren();	});		// Init status bar command.	statusBarCommand.addEventListener("checkedchanged", function (e) {		statusBar.setVisible(this.getChecked());		statusBar.getParent().layoutAllChildren();	});		// Init progress bar.	uProgressBar.start();	// Init rich edit.	b1.addEventListener("action", this.onRichEditAction, this);	b2.addEventListener("action", this.onRichEditAction, this);	b3.addEventListener("action", this.onRichEditAction, this);		// Init desktop pane.	desktopPane.setContextMenu(desktopPane.getWindowManager().getWindowsMenu());	desktopToolBar.setContextMenu(desktopPane.getWindowManager().getWindowsMenu());	this._openedWindows = 1;	this.addWindow("Sample window " + this._openedWindows++);	newButton.addEventListener("action", function (e) {		var win = this.addWindow("Sample window " + this._openedWindows++);		win.setActive(true)	}, this);		// Init graph.	if (BiBrowserCheck.ie) {		var graph = new BiGraph();		graph.setTabIndex(1);		graph.setId("graph");		graph.addEventListener("create", function (e) {			var oDoc = BiXmlLoader.load("ronchart.xml");			graph.fromXmlDocument(oDoc);			graph.setChartType("line");			graph.update();		});		graphType.addEventListener("change", function (e) {			graph.setChartType(graphType.getUserValue());			graph.update();		});		graphBox.add(graph);		BiBox.setFlex(graph, 3);	}	else {		var graph = new BiLabel("BiGraph is only supported in IE. Try BiGraph2.");		graph.setTabIndex(1);		graph.setId("graph");		graphBox.add(graph);		BiBox.setFlex(graph, 3);	}	// Init graph2.	graph2.addEventListener("create", function (e) {		var oDoc = BiXmlLoader.load("ronchart.xml");		graph2.fromXmlDocument(oDoc);		graph2.update();	});	graph2Type.addEventListener("change", function (e) {		graph2.setChartType(graph2Type.getUserValue());		graph2.update();	});	// Init gauge.	if (BiBrowserCheck.ie) {		var gauge = new BiGauge();		gauge.setTabIndex(1);		gauge.setId("gauge");		gauge.setMaximumHeight(250);		gauge.setMaximumWidth(250);		gaugeSlider.addEventListener("change", function (e) {			gauge.setValue(gaugeSlider.getValue());		});		gaugeBox.add(gauge);		BiBox.setFlex(gauge, 3);	}	else {		var gauge = new BiLabel("BiGauge is only supported in IE.");		gauge.setTabIndex(1);		gauge.setId("gauge");		gaugeBox.add(gauge);		BiBox.setFlex(gauge, 3);	}		// Init grid.	grid.addEventListener("create", function (e) {		e.getTarget().update();	});	gridSelection.addEventListener("change", function (e) {		var value = gridSelection.getUserValue();		grid.setMultipleSelection(value.indexOf("multiple") > -1);		if (value.indexOf("row") > -1) {			grid.setSelectionMode("row");		}		else {			grid.setSelectionMode("cell");		}	});		// Init grid2.	grid2Selection.addEventListener("change", function (e) {		var value = grid2Selection.getUserValue();		grid2.getSelectionModel().setMultipleSelection(value.indexOf("multiple") > -1);		if (value.indexOf("row") > -1) {			grid2.getSelectionModel().setSelectionMode("row");		}		else {			grid2.getSelectionModel().setSelectionMode("cell");		}	});		// Init tree.	var cols = 2;	tree.setColumnCount(cols);	tree.setColumnNames(["Zero", "One"]);		function getArray(row) {		var res = new Array(cols);		for (var x = 0; x < cols; x++) {			res[x] = row + "." + x		}		return res;	}		var row = 0;	var tmp1, tmp2, tmp3;		tree.addNode(tmp1 = new BiTreeNode(getArray(row++)));	tree.addNode(tmp1 = new BiTreeNode(getArray(row++)));	tmp1.addNode(tmp2 = new BiTreeNode(getArray(row++)));	tmp2.addNode(tmp3 = new BiTreeNode(getArray(row++)));	tmp2.addNode(tmp3 = new BiTreeNode(getArray(row++)));	tmp2.addNode(tmp3 = new BiTreeNode(getArray(row++)));	tmp1.addNode(tmp2 = new BiTreeNode(getArray(row++)));	tmp2.addNode(tmp3 = new BiTreeNode(getArray(row++)));	tmp1.addNode(tmp2 = new BiTreeNode(getArray(row++)));		tree.addEventListener("create", function (e) {		e.getTarget().update();	});		treeSelection.addEventListener("change", function (e) {		var value = treeSelection.getUserValue();		tree.setMultipleSelection(value == "multiple");	});		// Init tree2.	tree2Selection.addEventListener("change", function (e) {		var value = tree2Selection.getUserValue();		tree2.getSelectionModel().setMultipleSelection(value == "multiple");	});	// Init treeView	treeViewSelection.addEventListener("change", function (e) {		var value = treeViewSelection.getUserValue();		treeView.getSelectionModel().setMultipleSelection(value == "multiple");	});	// Init olap grid.	olapGrid.getDataModel().getAxisDimensionName = function (nAxis, nDim) {		if (nAxis == 0) {			if (nDim == 0) {				return "Product";			}			else if (nDim == 1) {				return "Gender";			}		}		else if (nAxis == 1) {			if (nDim == 0) {				return "State";			}			else if (nDim == 1) {				return "City";			}		}	}		// Disable the iframe tab.	if (BiBrowserCheck.moz) {		graphsGaugesPane.setSelected(graph2Page);	}}BindowsTest.main = function () {	new BindowsTest();};BindowsTest.createWizard = function () {	var wizard = new BiWizard("New user");	var page1 = new BiComponent();	var page2 = new BiComponent();	page1.setProperties({ left: 0, top: 0, right: 0, bottom: 0});	page2.setProperties({ left: 0, top: 0, right: 0, bottom: 0});	wizard.addPage(page1);	wizard.addPage(page2);	var vBox1 = new BiVBox();	var vBox2 = new BiVBox();	vBox1.setProperties({ left: 0, top: 0, right: 0, bottom: 0});	vBox2.setProperties({ left: 0, top: 0, right: 0, bottom: 0});	page1.add(vBox1);	page2.add(vBox2);	var txt1_1 = new BiTextField();	txt1_1.setMarginBottom(10);	var txt1_2 = new BiTextField();	txt1_2.setMarginBottom(10);	var txt2_1 = new BiTextField();	txt2_1.setMarginBottom(10);	var txt2_2 = new BiTextField();	txt2_2.setMarginBottom(10);	var lbl1_1 = new BiLabel("First name:");	var lbl1_2 = new BiLabel("Last name:");	var lbl2_1 = new BiLabel("Phone:");	var lbl2_2 = new BiLabel("E-mail:");	lbl1_1.setLabelFor(txt1_1);	lbl1_2.setLabelFor(txt1_2);	lbl2_1.setLabelFor(txt2_1);	lbl2_2.setLabelFor(txt2_2);		vBox1.add(lbl1_1);	vBox1.add(txt1_1);	vBox1.add(lbl1_2);	vBox1.add(txt1_2);	vBox2.add(lbl2_1);	vBox2.add(txt2_1);	vBox2.add(lbl2_2);	vBox2.add(txt2_2);	application.getWindow().add(wizard);	wizard.setVisible(true);};BindowsTest.prototype.addWindow = function (caption) {	var win = new BiWindow(caption);	win.setIcon( new BiImage("images/folder.open.16.gif") );		var lbl = new BiLabel("Some text in a window.");	lbl.setLocation(10, 10);	lbl.setTabIndex(1);		win.getContentPane().add(lbl);		desktopPane.add(win);	this.addTaskBarButton(win);		return win;};BindowsTest.prototype.addTaskBarButton = function (win) {	// minimized check	var button = new BiToolBarToggleButton(win.getCaption(), win.getIcon());	button.setTabIndex(1);	desktopToolBar.add(button);	button.lastState = win.getState();	win.addEventListener("statechanged", function (e) {		if (win.getState() != "minimized") {			button.lastState = win.getState();		}		else {			button.setChecked(false);		}	});	win.addEventListener("captionchanged", function (e) {		button.setText( win.getCaption() );	});	win.addEventListener("activated", function (e) {		button.setChecked(true);	});	win.addEventListener("deactivated", function (e) {		button.setChecked(false);	});	button.addEventListener("action", function (e) {		if (win.getActive()) {			win.setState("minimized");			win.setActive(false);		}		else {			if (win.getState() == "minimized") {				win.setState(button.lastState);			}			win.setActive(true);		}	});	win.addEventListener("close", function (e) {		desktopToolBar.remove(button);		button.dispose();	}, this);};BindowsTest.prototype.onRichEditAction = function (e) {	richEdit.setFocused(true);	richEdit.execCommand(e.getTarget().getText());};		]]></Script>	</Resources></Application>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -