📄 combobox.zul
字号:
<?xml version="1.0" encoding="UTF-8"?><!--combobox.zul{{IS_NOTE Purpose: Description: History: Mon Oct 13 15:52:14 2008, Created by jumperchen}}IS_NOTECopyright (C) 2008 Potix Corporation. All Rights Reserved.{{IS_RIGHT}}IS_RIGHT--><window title="Test of Combobox's Serialization"><vbox id="vb"> <zk> <zscript> String[] data = new String[30]; for(int j=0; j < data.length; ++j) { data[j] = "option "+j; } ListModel strset = new SimpleListModel(data); </zscript> <combobox autodrop="true" id="list" width="200px" model="${strset}"/> </zk> <zscript> int cnt = 0; </zscript> <button label="Clone"> <attribute name="onClick">{ Object l = list.clone(); l.setId("dst" + ++cnt); vb.insertBefore(l, self); }</attribute> </button> <button label="Clone by Serialization"> <attribute name="onClick">{ import java.io.*; ByteArrayOutputStream boa = new ByteArrayOutputStream(); new ObjectOutputStream(boa).writeObject(list); byte[] bs = boa.toByteArray(); Object l = new ObjectInputStream(new ByteArrayInputStream(bs)).readObject(); l.setId("dst" + ++cnt); vb.insertBefore(l, self); vb.insertBefore(new Label(bs.length+" bytes copied"), self); }</attribute> </button></vbox></window>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -