clone.zul
来自「ZK是一个Ajax Java Web框架」· ZUL 代码 · 共 56 行
ZUL
56 行
<?xml version="1.0" encoding="UTF-8"?><!--clone.zul{{IS_NOTE Purpose: Description: History: Sun Feb 4 15:39:50 2007, Created by tomyeh}}IS_NOTECopyright (C) 2007 Potix Corporation. All Rights Reserved.{{IS_RIGHT}}IS_RIGHT--><zk> <window id="win" border="normal" width="200px" sizable="true"> <caption image="/img/inet.png" label="Clone Test"/> <checkbox id="ck" label="Hello, Wolrd!" onCheck="alert(self.id+": "+self.label)"/> </window> <zscript> int cnt = 0; void cloneAttached(Window w) { Window nw = w.clone(); check(nw, "ck"); nw.setId("win"+ cnt++); nw.setPage(page); check(nw, "ck"); } void cloneDetached() { Window w = new Window(); Label l = new Label("Detached"); l.setId("l"); l.setParent(w); Window nw = w.clone(); check(nw, "l"); nw.setPage(page); check(nw, "l"); } void check(Window w, String nm) { if (w.getFellow(nm) == null) alert("Failed to clone: fellow"); if (w.getNamespace().getVariable(nm, true) == null) alert("Failed to clone: getVariable"); } </zscript> <button label="clone attached" onClick="cloneAttached(win)"/> <button label="clone detached" onClick="cloneDetached()"/></zk>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?