当前位置: 首页>>代码示例>>Java>>正文


Java Button.addEventListener方法代码示例

本文整理汇总了Java中org.zkoss.zul.Button.addEventListener方法的典型用法代码示例。如果您正苦于以下问题:Java Button.addEventListener方法的具体用法?Java Button.addEventListener怎么用?Java Button.addEventListener使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.zkoss.zul.Button的用法示例。


在下文中一共展示了Button.addEventListener方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getSpecialProperty

import org.zkoss.zul.Button; //导入方法依赖的package包/类
@Override
public Component getSpecialProperty(final Component cmp, String name, IDeveloperStudio dev) {
	Button edit = new Button("Edit");
	final IDeveloperStudio developer = dev;
	
	edit.addEventListener(Events.ON_CLICK, new EventListener<MouseEvent>() {

		@Override
		public void onEvent(MouseEvent arg0) throws Exception {
			TableFieldProperties dialog = new TableFieldProperties((TableField)cmp);
			developer.getDesigner().appendChild(dialog);
			dialog.doModal();
		}
		
	});
	
	return edit;
}
 
开发者ID:sinnlabs,项目名称:dbvim,代码行数:19,代码来源:TableFieldRules.java

示例2: buildForm

import org.zkoss.zul.Button; //导入方法依赖的package包/类
@Override
protected void buildForm() throws Exception {
	CustomForm form = (CustomForm) getForm();

	Borderlayout mainLayout = new Borderlayout();
	form.appendChild(mainLayout);

	North mainPanelNorth = new North();
	mainLayout.appendChild(mainPanelNorth);

	Center mainPanelCenter = new Center();
	mainLayout.appendChild(mainPanelCenter);

	processButton = new Button();
	processButton.setLabel("Print Plugin Info");
	processButton.setStyle("text-align: right");
	mainPanelNorth.appendChild(processButton);

	pluginInfo = new WStringEditor();
	pluginInfo.getComponent().setText("");
	pluginInfo.getComponent().setWidth("100%");
	pluginInfo.setReadWrite(true);
	mainPanelCenter.appendChild(pluginInfo.getComponent());

	processButton.addEventListener(Events.ON_CLICK, this);

}
 
开发者ID:sauljabin,项目名称:idempiere-plugin-template,代码行数:28,代码来源:FPrintPluginInfo.java

示例3: addItem

import org.zkoss.zul.Button; //导入方法依赖的package包/类
private void addItem(int sizeX, int sizeY) {
    GridItem item = new GridItem();
    item.setSizeX(sizeX);
    item.setSizeY(sizeY);
    item.setStyle("background-color: " + randomColor());
    Button closeButton = new Button("X");
    closeButton.addEventListener(Events.ON_CLICK, new CloseItemEventListener(item));
    item.appendChild(closeButton);
    gridster.appendChild(item);
}
 
开发者ID:connollyst,项目名称:zkgridster,代码行数:11,代码来源:AbstractViewModel.java

示例4: doAfterCompose

import org.zkoss.zul.Button; //导入方法依赖的package包/类
@SuppressWarnings({ "unchecked", "rawtypes" })
@Override
public void doAfterCompose(Component comp) throws Exception {
	super.doAfterCompose(comp);

	projectDao = (ProjectDao) SpringUtil.getBean("projectDao");
	businessCalendarDao = (BusinessCalendarDao) SpringUtil.getBean("businessCalendarDao");
	auditLogger = (AuditLogger) SpringUtil.getBean("auditLogger");
	costDao = (CostDao) SpringUtil.getBean("costDao");
	calendarService = (CalendarService) SpringUtil.getBean("calendarService");

	final User user = getUser();
	if (user != null) {
		List<BusinessCalendarEvent> calendarEvents = calendarService.getEvents();
		calendarModel = new BusinessCalendarModel(calendarEvents);
		calendars.setModel(this.calendarModel);
		invoiceButton.setDisabled(true);
		discount.setDisabled(true);

		sendInvoiceButton = (Button) Path.getComponent("/win/invoiceWindow/sendInvoiceButton");
		sendInvoiceButton.addEventListener("onClick", new EventListener() {
			public void onEvent(Event event) throws Exception {
				sendInvoice();
			}

			private void sendInvoice() throws Exception {
				MailHelper.sendInvoice(invoice, invoiceBuf, user);
				registerInvoice();
				auditLogger.log(SEND_INVOICE, user);
				alert(Labels.getLabel("invoice.sent"));
			}

			private void registerInvoice() throws Exception {
				Cost cost = new Cost();
				cost.setUser(user);
				cost.setDescription(Labels.getLabel("invoice") + " " + invoice.getInvoiceNumber());
				cost.setAmount(invoice.getNetAmount());
				cost.setVat(invoice.getVatAmount());
				cost.setDate(new Date());
				cost.setCostType(INVOICE_SENT);
				costDao.persistEntity(cost);
			}
		});
	}
}
 
开发者ID:beemsoft,项目名称:techytax-zk,代码行数:46,代码来源:CalendarController.java


注:本文中的org.zkoss.zul.Button.addEventListener方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。