thread2.zul

来自「ZK是一个Ajax Java Web框架」· ZUL 代码 · 共 42 行

ZUL
42
字号
<?xml version="1.0" encoding="UTF-8"?><!--thread2.zul{{IS_NOTE	Purpose:			Description:			History:		Wed Jun  7 18:44:47     2006, Created by tomyeh}}IS_NOTECopyright (C) 2006 Potix Corporation. All Rights Reserved.{{IS_RIGHT}}IS_RIGHT--><window id="main" title="Working Thread2">	<zscript>	int numPending = 0;	List result = Collections.synchronizedList(new LinkedList());	</zscript>	<button label="Start Working Thread">		<attribute name="onClick">	++numPending;	timer.start();	new org.zkoss.zkdemo.test.WorkingThread2(desktop, result).start();		</attribute>	</button>	<timer id="timer" running="false" delay="1000" repeats="true">		<attribute name="onTimer">	while (!result.isEmpty()) {		main.appendChild(result.remove(0));		--numPending;	}	if (numPending == 0) timer.stop();		</attribute>	</timer></window>

⌨️ 快捷键说明

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