inputevent.java

来自「非常接近C/S操作方式的Java Ajax框架-ZK 用ZK框架使你的B/S应」· Java 代码 · 共 71 行

JAVA
71
字号
/* InputEvent.java{{IS_NOTE	Purpose:			Description:			History:		Tue Jun 14 17:39:00     2005, Created by tomyeh}}IS_NOTECopyright (C) 2005 Potix Corporation. All Rights Reserved.{{IS_RIGHT	This program is distributed under GPL Version 2.0 in the hope that	it will be useful, but WITHOUT ANY WARRANTY.}}IS_RIGHT*/package org.zkoss.zk.ui.event;import org.zkoss.zk.ui.Component;/** * Represents an event cause by user's input something at the client. *  * @author tomyeh * @see org.zkoss.zk.ui.ext.client.Inputable */public class InputEvent extends Event {	private final String _val;	private final boolean _selbk;	/** Constructs a input-relevant event.	 * @param val the new value	 */	public InputEvent(String name, Component target, String val) {		this(name, target, val, false);	}	/** Constructs an event for <code>onChanging</code>.	 *	 * @param selbk whether this event is caused by user's selecting a list	 * of items. Currently, only combobox might set it to true for the onChanging	 * event. See {@link #isChangingBySelectBack} for details.	 */	public InputEvent(String name, Component target, String val, boolean selbk) {		super(name, target);		_val = val;		_selbk = selbk;	}	/** Returns the value that user input.	 */	public final String getValue() {		return _val;	}	/** Returns whether this event is <code>onChanging</code>, and caused by	 * user's selecting a list of items.	 *	 * <p>It is always false if it is caused by the <code>onChange</code> event.	 *	 * <p>Currently, only combobox might set it to true for the onChanging	 * event. It is useful when you implement autocomplete.	 * To have better response, you usually don't filter out unmatched items	 * if this method returns true. In other words, you simply ignore	 * the <code>onChanging</code> event if this method return true, when	 * implementing autocomplete.	 */	public final boolean isChangingBySelectBack() {		return _selbk;	}}

⌨️ 快捷键说明

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