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

📄 z35-portallayout-comp.zul

📁 ZK是一个Ajax Java Web框架
💻 ZUL
字号:
<zk>
	<listbox if="${!empty execution.parameterMap.listbox1}" rows="1" mold="select">
		<listitem label="option1" />
		<listitem label="option2" />
		<listitem label="option3" />
	</listbox>
	<listbox if="${!empty execution.parameterMap.listbox2}">
		<listhead sizable="true">
			<listheader label="name" sort="auto" />
			<listheader label="gender" sort="auto" />
		</listhead>
		<listitem>
			<listcell label="Mary" />
			<listcell label="FEMALE" />
		</listitem>
		<listitem>
			<listcell label="John" />
			<listcell label="MALE" />
		</listitem>
		<listitem>
			<listcell label="Jane" />
			<listcell label="FEMALE" />
		</listitem>
		<listitem>
			<listcell label="Henry" />
			<listcell label="MALE" />
		</listitem>
		<listitem>
			<listcell label="Mary" />
			<listcell label="FEMALE" />
		</listitem>
		<listitem>
			<listcell label="John" />
			<listcell label="MALE" />
		</listitem>
		<listitem>
			<listcell label="Jane" />
			<listcell label="FEMALE" />
		</listitem>
		<listitem>
			<listcell label="Henry" />
			<listcell label="MALE" />
		</listitem>
	</listbox>

	<tree width="90%" rows="5" if="${!empty execution.parameterMap.tree1}">
		<treecols sizable="true">
			<treecol label="Name" />
			<treecol label="Description" />
		</treecols>
		<treechildren>
			<treeitem>
				<treerow>
					<treecell label="Item 1" />
					<treecell label="Item 1 description" />
				</treerow>
			</treeitem>
			<treeitem>
				<treerow>
					<treecell label="Item 2" />
					<treecell label="Item 2 description" />
				</treerow>
				<treechildren>
					<treeitem>
						<treerow>
							<treecell label="Item 2.1" />
						</treerow>
						<treechildren>
							<treeitem>
								<treerow>
									<treecell label="Item 2.1.1" />
								</treerow>
							</treeitem>
							<treeitem>
								<treerow>
									<treecell label="Item 2.1.2" />
								</treerow>
							</treeitem>
						</treechildren>
					</treeitem>
					<treeitem>
						<treerow>
							<treecell label="Item 2.2" />
							<treecell label="Item 2.2 is something who cares" />
						</treerow>
					</treeitem>
				</treechildren>
			</treeitem>
			<treeitem label="Item 3" />
		</treechildren>
	</tree>

	<tabbox width="400px" mold="accordion" if="${!empty execution.parameterMap.tabbox1}">
		<tabs>
			<tab label="Tab 1" />
			<tab label="Tab 2" />
		</tabs>
		<tabpanels>
			<tabpanel>
				<tabbox>
					<tabs width="20px">
						<tab label="A" />
						<tab label="B" />
						<tab label="C" />
						<tab label="D" />
						<tab label="E" />
					</tabs>
					<tabpanels>
						<tabpanel>This is panel A</tabpanel>
						<tabpanel>This is panel B</tabpanel>
						<tabpanel>This is panel C</tabpanel>
						<tabpanel>This is panel D</tabpanel>
						<tabpanel>This is panel E</tabpanel>
					</tabpanels>
				</tabbox>
			</tabpanel>
			<tabpanel>This is panel 2 The second panel</tabpanel>
		</tabpanels>
	</tabbox>

	<groupbox mold="3d" width="300px"  if="${!empty execution.parameterMap.groupbox1}">
			<caption image="/img/inet.png" label="fruits"/>
			<radiogroup onCheck="fruit.value = self.selectedItem.label">
				<radio label="Apple"/>
				<radio label="Orange"/>
				<radio label="Grape"/>
			</radiogroup>
	</groupbox>
	
	<panel framable="true" width="200px"
		title="Panel component"
		maximizable="true" minimizable="true" border="normal"
		collapsible="true" closable="true"  if="${!empty execution.parameterMap.panel1}">
		<panelchildren>
		<window border="normal" width="250px" sizable="true">
			<caption image="/img/inet.png" label="Hi there!"/>
			<checkbox label="Hello, World!"/>
			<separator bar="true"/>
			Auto-position (applicable if not embedded)
			<separator/>
			<button label="left,center" onClick='spaceOwner.position = "left,center"'/>
			<button label="right,bottom" onClick='spaceOwner.position = "right,bottom"'/>
			<button label="center" onClick='spaceOwner.position = "center"'/>
		</window>
		</panelchildren>
	</panel>
	
	<grid width="100%" if="${!empty execution.parameterMap.input1}">
	<rows>
		<row>
			textbox: <textbox value="text..."/>
		</row>
		<row>int box:<intbox/></row>
		<row>decimal box:<decimalbox format="#,##0.##"/></row>
		<row>date box:
			<hbox>
			<datebox id="db"/>
			<listbox onSelect="db.setFormat(self.selectedItem.value)" mold="select" rows="1">
				<listitem label="Default" value=""/>
				<listitem label="yyyy/MM/dd" value="yyyy/MM/dd"/>
				<listitem label="MM-dd-yy" value="MM-dd-yy"/>
			</listbox>
			</hbox>
		</row>
		<row>slider:<slider /></row>
		<row>time box:<timebox /></row>		
		<row>positive int box:<intbox constraint="no negative,no zero"/></row>
		<row>e-mail:<textbox constraint="/.+@.+\.[a-z]+/: Please enter an e-mail address"/></row>
		<row>spinner:<spinner /></row>		
		<row>
			multiple lines: 
			<textbox rows="5" cols="40">
				<attribute name="value">
text line1...
text line2...
 				</attribute>
 			</textbox>
		</row>		
		<row>
			Selection event: 
			<vbox>
				<textbox id="sel" rows="5" cols="40" >
					<attribute name="value">Welcome John !</attribute>
					<attribute name="onSelection">
						int start = event.start;
						int end = event.end;
						msg.setValue("Start: "+start+" , End:"+end);
					</attribute>
				</textbox>
				<button label="Replace" onClick="replace()"/>
				<label id="msg"/>
			</vbox>
		</row>
	</rows>
	</grid>


	<bandbox if="${!empty execution.parameterMap.bandbox1}">
		<bandpopup>
		<vbox>		
		<hbox>Search <textbox/></hbox>
		<listbox width="200px"
		onSelect="self.parent.parent.parent.closeDropdown();self.parent.parent.parent.value=self.selectedItem.label">
			<listhead>
				<listheader label="Name"/>
				<listheader label="Description"/>
			</listhead>
			<listitem>
				<listcell label="John"/>
				<listcell label="CEO"/>
			</listitem>
			<listitem>
				<listcell label="Joe"/>
				<listcell label="Engineer"/>
			</listitem>
			<listitem>
				<listcell label="Mary"/>
				<listcell label="Supervisor"/>
			</listitem>
		</listbox>
		</vbox>
		</bandpopup>
	</bandbox>
	
	<vbox  if="${!empty execution.parameterMap.images1}">
		<image id="image" src="/img/sun.jpg" width="100px"/>
		Do you like the photo?
		<label id="label"/>

		<hbox>		
			<button label="Yes" onClick="label.value = self.label"/>
			<button label="No" onClick="label.value = self.label"/>
		</hbox>
	</vbox>
	<vbox  if="${!empty execution.parameterMap.combobox1}">
	<combobox>
		<comboitem label="Simple and Rich"/>
		<comboitem label="Cool!"/>
		<comboitem label="Thumbs Up!"/>
	</combobox>
	<combobox>
		<comboitem label="Simple and Rich"
		description="The simplest way to make Web applications rich"/>
		<comboitem label="Cool!"
		description="The coolest technology"/>
		<comboitem label="Ajax and RIA"
		description="Rich Internet Application by Ajax"/>
	</combobox>
	<combobox>
		<comboitem label="Simple and Rich" image="/img/coffee.gif"
		description="The simplest way to make Web applications rich"/>
		<comboitem label="Cool!" image="/img/corner.gif"
		description="The coolest technology"/>
		<comboitem label="Ajax and RIA" image="/img/cubfirs.gif"
		description="Rich Internet Application by Ajax"/>
	</combobox>
	<separator bar="true"/>
	Auto-complete:
	<combobox id="combo" autodrop="true" use="org.zkoss.zkdemo.userguide.SimpleAutoComplete"/>
	<hbox>
	<checkbox checked="true" onCheck="combo.autodrop = self.checked" label="auto drop popup when typing"/>
	<checkbox checked="true" onCheck="combo.buttonVisible = self.checked" label="button visible"/>
	</hbox>
	</vbox>
	
	
	<menubar if="${!empty execution.parameterMap.menu1}">
		<menu label="File" src="/img/m1.gif" >
			<menupopup>
				<menuitem src="/img/m1.gif" label="New" onClick="alert(self.label)"/>
				<menuitem src="/img/m2.gif" label="Open" onClick="alert(self.label)"/>
				<menuitem src="/img/m3.gif" label="Save" onClick="alert(self.label)"/>
				<menuseparator/>
				<menuitem label="Exit" onClick="alert(self.label)"/>
			</menupopup>
		</menu>
		<menu label="Help">
			<menupopup>
				<menuitem label="Index" onClick="alert(self.label)"/>
				<menu label="About">
					<menupopup>
						<menuitem label="About ZK" onClick="alert(self.label)"/>
						<menuitem label="About Potix" onClick="alert(self.label)"/>
					</menupopup>
				</menu>
			</menupopup>
		</menu>
		<menu src="/img/m2.gif"/>
	</menubar>
	
	<window title="Customizable Tooltips" border="normal" width="360px" if="${!empty execution.parameterMap.popup1}">>
		<label value="Move Mouse Over Me!" tooltip="editPopup"/>
		<separator bar="true"/>
		<label value="Tooptip for Another Popup" tooltip="any"/>
		<separator bar="true"/>
		<label value="Click Me!" popup="editPopup"/>
	
		<menupopup id="editPopup">
	        <menuitem label="Undo"/>
	        <menuitem label="Redo"/>
	        <menu label="Sort">
				<menupopup>
			        <menuitem label="Sort by Name" autocheck="true"/>
			        <menuitem label="Sort by Date" autocheck="true"/>
				</menupopup>
	        </menu>
		</menupopup>
		<popup id="any" width="300px">
			<vbox>
				ZK simply rich.
				<toolbarbutton label="ZK your killer Web application now!" href="http://www.zkoss.org"/>
			</vbox>
		</popup>
	</window>
	
	
	<window if="${!empty execution.parameterMap.chart1}">
		<grid width="400px">
		<columns>
		  <column label="category" width="150px"/>
		  <column label="value"/>
		</columns>
		<rows>
		  <row><label id="c0" value="C/C++"/><decimalbox id="v0" value="21.2" constraint="no empty" onChange="update(0)"/></row>
		  <row><label id="c1" value="VB"/><decimalbox id="v1" value="10.2" constraint="no empty" onChange="update(1)"/></row>
		  <row><label id="c2" value="Java"/><decimalbox id="v2" value="40.4" constraint="no empty" onChange="update(2)"/></row>
		  <row><label id="c3" value="PHP"/><decimalbox id="v3" value="28.2" constraint="no empty" onChange="update(3)"/></row>
		</rows>
		</grid>
		<checkbox label="3D Chart" checked="true" onCheck="mychart.setThreeD(self.isChecked())"/>
		<chart id="mychart" title="Pie Chart Demo" width="500" height="250" type="pie" threeD="true" fgAlpha="128">
			<attribute name="onClick"><![CDATA[  
			  String areaid = event.getArea();
			  if (areaid != null) {
			    Area area = (Area)self.getFellow(areaid);
			    alert(""+area.getAttribute("entity")+": "+area.getTooltiptext());
			  }
		  	]]></attribute>
			<zscript><![CDATA[//@DECLARATION
			  void update(int rowIndex) {
			    Label lb = (Label) self.getFellow("c"+rowIndex);
			    Decimalbox db = (Decimalbox) self.getFellow("v"+rowIndex);
			    model.setValue(lb.value, new Double(db.getValue().doubleValue()));
			  }
			  ]]>
			  <![CDATA[  
			  PieModel model = new SimplePieModel();
			  for(int j=0; j < 4; ++j) {
			  	update(j);
			  }
			  mychart.setModel(model);
			 ]]></zscript>
		</chart>
	</window>
	
	<fisheyebar style="position:absolute;margin:20px;"
		attachEdge="top"  if="${!empty execution.parameterMap.fisheye1}">
		<fisheye image="/img/icon_browser.png" label="Web Browser"
			onClick="alert(self.label)" />
		<fisheye image="/img/icon_calendar.png" label="Calendar"
			onClick="alert(self.label)" />
		<fisheye image="/img/icon_email.png" label="Email"
			onClick="alert(self.label)" />
		<fisheye image="/img/icon_texteditor.png" label="Text Editor"
			onClick="alert(self.label)" />
		<fisheye image="/img/icon_update.png" label="Software Update"
			onClick="alert(self.label)" />
		<fisheye image="/img/icon_users.png" label="Users"
			onClick="alert(self.label)" />
	</fisheyebar>
			
</zk>

⌨️ 快捷键说明

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