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

📄 gridgrouping.zul

📁 ZK是一个Ajax Java Web框架
💻 ZUL
字号:
<?xml version="1.0" encoding="UTF-8"?><!--gridgrouping.zul{{IS_NOTE	Purpose:			Description:			History:		Tue Apr 29 12:21:01 TST 2008, Created by jumperchen}}IS_NOTECopyright (C) 2008 Potix Corporation. All Rights Reserved.{{IS_RIGHT}}IS_RIGHT--><zk>	<zscript>	import org.zkoss.zkdemo.userguide.*;	Comparator asc = new RowLabelComparator(true),		dsc = new RowLabelComparator(false);	</zscript>	<grid id="grid">		<columns id="h" sizable="true">			<column id="col1" label="Type" sortAscending="&#36;{asc}" sortDescending="&#36;{dsc}"/>			<column id="col2" label="Content"/>		</columns>		<rows id="rows">			<group id="gp1">			<label value="Group1: (gp1)"/>			<label value="Group1:"/>			</group>			<row>				<label value="File:"/>				<label value="File:"/>			</row>			<row id="row1">				<label value="Type:"/>				<hbox>					<listbox rows="1" mold="select">						<listitem label="Java Files,(*.java)"/>						<listitem label="All Files,(*.*)"/>					</listbox>					<button label="Browse..."/>				</hbox>			</row>			<group id="gp2" label="Group 2 (gp2)" onOpen='alert(self.itemCount +"");'/>			<row>				<label value="Options:"/>				<label value="Options:"/>			</row>		</rows>	</grid>	<vbox>	<hbox>		<button label="show/hide column 1" onClick='col1.visible = !col1.visible'/>		<button label="show/hide column 2" onClick='col2.visible = !col2.visible'/>		<button label="add column 3" onClick='new Column("Column3").setParent(h);'/>		<button label="Listbox fixedLayout" onClick='grid.fixedLayout = !grid.fixedLayout'/>	</hbox>		<hbox>	<button label="add Grouping"		onClick='rows.insertBefore(new Group("Grouping Test.............. " + rows.getChildren().indexOf(row1)), row1)' />	<button label="add Row">		<attribute name="onClick">		Row row = new Row();		new Label("Column1").setParent(row);		new Label("Column2").setParent(row);		rows.insertBefore(row, row1);		</attribute>	</button>		</hbox>		<hbox>	<button label="show all the items" onClick='alert(rows.children.size() + "")'/>	<button label="show row1 Index"		onClick='alert(rows.getChildren().indexof(row1) + "")' />		<button label="show all the items of group">		<attribute name="onClick">	import java.util.*;		String s = "";		for (Iterator it = rows.getGroups().iterator(); it.hasNext();) {			Group g = (Group)it.next();			s += " [index: " + rows.getChildren().indexOf(g) + ", items: " + g.getItemCount() + "] ";		}		alert(s);		</attribute>	</button>		</hbox>	<hbox>	<button label="remove second Group"		onClick='gp2.detach();' />			<button label="remove row1.nextSibling"		onClick='row1.nextSibling.detach();' />	<button label="remove row1.previousSibling"		onClick='row1.previousSibling.detach();' />		</hbox>	<button label="Grid.invalidate()"		onClick='grid.invalidate();' />	<button label="gp1.invalidate()"		onClick='gp1.invalidate();' />	</vbox></zk>

⌨️ 快捷键说明

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