本文整理汇总了Java中org.zkoss.zul.Button类的典型用法代码示例。如果您正苦于以下问题:Java Button类的具体用法?Java Button怎么用?Java Button使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Button类属于org.zkoss.zul包,在下文中一共展示了Button类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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: readTransactions
import org.zkoss.zul.Button; //导入依赖的package包/类
private List<Cost> readTransactions() throws IOException, Exception {
String firstLine = getFirstLine();
InputStream is = new ByteArrayInputStream(media.getStringData().getBytes());
Reader reader2 = new InputStreamReader(is);
reader = new BufferedReader(reader2);
// reader = new BufferedReader(media.getReaderData());
TransactionReader importTransactions = transactionReaderFactory.getTransactionReader(firstLine);
importTransactions.reset();
List<Cost> result = importTransactions.readFile(reader);
boolean unmatchedTransactions = listContainsUnmatchedTransactions(result);
boolean longDescriptions = listContainsLongDescriptions(result);
if (!unmatchedTransactions && !longDescriptions) {
importBtn.setDisabled(false);
} else if (unmatchedTransactions) {
Messagebox.show("Er zijn nog onbepaalde transacties. Voeg tekstfragmenten toe, waarmee transacties herkend kunnen worden voor een bepaalde kostensoort.", null,
new Messagebox.Button[] { Messagebox.Button.OK }, Messagebox.EXCLAMATION, null);
return filterUnmatchedTransactions(result);
} else if (longDescriptions) {
Messagebox.show("Er zijn nog lange omschrijvingen. Maak deze wat korter om ze in te kunnen lezen.", null, new Messagebox.Button[] { Messagebox.Button.OK }, Messagebox.EXCLAMATION, null);
return filterLongDescriptions(result);
}
return result;
}
开发者ID:beemsoft,项目名称:techytax-zk,代码行数:24,代码来源:VatViewCtrl.java
示例3: kill
import org.zkoss.zul.Button; //导入依赖的package包/类
@Command
@NotifyChange(value = { "btnsDisabled", "customer" })
public void kill() {
Messagebox.show("Do you want to remove the client?", "Remove", new Messagebox.Button[]{
Messagebox.Button.YES, Messagebox.Button.NO}, Messagebox.QUESTION,
(Messagebox.ClickEvent t) -> {
QLog.l().logQUser().debug("Kill by " + user.getName() + " customer " + customer.getFullNumber());
if (t.getButton() != null && t.getButton().compareTo(Messagebox.Button.YES) == 0) {
final CmdParams params = new CmdParams();
params.userId = user.getUser().getId();
Executer.getInstance().getTasks().get(Uses.TASK_KILL_NEXT_CUSTOMER)
.process(params, "", new byte[4]);
customer.refreshPrevious();
customer = null;
// Set the current working service to be empty
QUser quser = QUserList.getInstance().getById(params.userId);
quser.setCurrentService("");
setKeyRegim(KEYS_MAY_INVITE);
service_list.setModel(service_list.getModel());
refreshListServices();
service_list.invalidate();
BindUtils.postNotifyChange(null, null, Form.this, "*");
serveCustomerDialogWindow.setVisible(false);
}
});
}
开发者ID:bcgov,项目名称:sbc-qsystem,代码行数:34,代码来源:Form.java
示例4: 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
示例5: 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
示例6: setActive
import org.zkoss.zul.Button; //导入依赖的package包/类
private void setActive(Button button, int value) {
switch (value){
case 2:
button.setSclass("button right button_2");
break;
case 1:
button.setSclass("button center button_1");
break;
default:
button.setSclass("button left button_0");
break;
}
}
开发者ID:Meijinfr,项目名称:Run4WinTournamentManager,代码行数:14,代码来源:SingleRoundRowRenderer.java
示例7: setInactive
import org.zkoss.zul.Button; //导入依赖的package包/类
private void setInactive(Button button, int value) {
switch (value){
case 2:
button.setSclass("button right");
break;
case 1:
button.setSclass("button center");
break;
default:
button.setSclass("button left");
break;
}
}
开发者ID:Meijinfr,项目名称:Run4WinTournamentManager,代码行数:14,代码来源:SingleRoundRowRenderer.java
示例8: clickListPostponedInvite
import org.zkoss.zul.Button; //导入依赖的package包/类
@Command
public void clickListPostponedInvite() {
if (user.getPlan().isEmpty() || pickedPostponed == null) {
return;
}
Messagebox.show("Do you want to invite citizen " + pickedPostponed.getFullNumber() + " ?",
l("inviting_client"), new Messagebox.Button[] {
Messagebox.Button.YES, Messagebox.Button.NO },
Messagebox.QUESTION,
(Messagebox.ClickEvent t) -> {
QLog.l().logQUser().debug(
"Invite postponed by " + user.getName() + " citizen " + pickedPostponed
.getFullNumber());
if (t.getButton() != null
&& t.getButton().compareTo(Messagebox.Button.YES) == 0) {
final CmdParams params = new CmdParams();
// @param userId id юзера который вызывает The user who causes
// @param id это ID кастомера которого вызываем из пула отложенных, оно есть т.к. с качстомером давно работаем
// It is the ID of the caller which is called from the pool of deferred, it is because With a long-stroke tool we have been working for
// a long time
params.customerId = pickedPostponed.getId();
params.userId = user.getUser().getId();
Executer.getInstance().getTasks().get(Uses.TASK_INVITE_POSTPONED)
.process(params, "", new byte[4]);
customer = user.getUser().getCustomer();
setKeyRegim(KEYS_INVITED);
BindUtils.postNotifyChange(null, null, Form.this, "postponList");
BindUtils.postNotifyChange(null, null, Form.this, "customer");
BindUtils.postNotifyChange(null, null, Form.this, "btnsDisabled");
this.addServeScreen();
this.begin();
pickedPostponed = null;
}
else {
pickedPostponed = null;
}
});
}
开发者ID:bcgov,项目名称:sbc-qsystem,代码行数:42,代码来源:Form.java
示例9: 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
示例10: constructComponent
import org.zkoss.zul.Button; //导入依赖的package包/类
@Override
public ZkButton constructComponent() {
suppress(defaultConstructorIn(Button.class));
suppress(method(Vlayout.class, "setId", String.class));
return new ZkButton(compId);
}
开发者ID:panifex,项目名称:panifex-platform,代码行数:7,代码来源:ZkButtonTest.java
注:本文中的org.zkoss.zul.Button类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论