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

📄 menupopup.java

📁 ZK 基础介绍 功能操作 模块 结合数据库操作
💻 JAVA
字号:
/* Menupopup.java{{IS_NOTE	Purpose:			Description:			History:		Thu Sep 22 10:58:18     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.zul;import java.io.IOException;import org.zkoss.lang.Objects;import org.zkoss.zk.ui.Component;import org.zkoss.zk.ui.Execution;import org.zkoss.zk.ui.UiException;import org.zkoss.zk.ui.event.Events;/** * A container used to display menus. It should be placed inside a * {@link Menu}. * * <p>Supported event: onOpen.<br/> * Note: to have better performance, onOpen is sent only if * non-deferrable event listener is registered * (see {@link org.zkoss.zk.ui.event.Deferrable}). * * <p>To load the content dynamically, you can listen to the onOpen event, * and then create menuitem when {@link org.zkoss.zk.ui.event.OpenEvent#isOpen} * is true. * * <p>Default {@link #getSclass}: menupopup. * * @author tomyeh */public class Menupopup extends Popup {	public Menupopup() {		setSclass("menupopup");	}	//-- super --//	public String getOuterAttrs() {		final StringBuffer sb =			new StringBuffer(64).append(super.getOuterAttrs());		appendAsapAttr(sb, Events.ON_OPEN);		if (typeRequired())			sb.append(" z.type=\"zul.menu.Mpop\"");			//to minimize HTML's size, generate z.type only if necessary		return sb.toString();	}	private boolean typeRequired() {		return !(getParent() instanceof Menu);	}	//-- Component --//	public boolean insertBefore(Component child, Component insertBefore) {		if (!(child instanceof Menuitem)		&& !(child instanceof Menuseparator) && !(child instanceof Menu))			throw new UiException("Unsupported child for menupopup: "+child);		return super.insertBefore(child, insertBefore);	}}

⌨️ 快捷键说明

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