本文整理汇总了Java中org.zkoss.zk.ui.event.Events类的典型用法代码示例。如果您正苦于以下问题:Java Events类的具体用法?Java Events怎么用?Java Events使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Events类属于org.zkoss.zk.ui.event包,在下文中一共展示了Events类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: doAfterCompose
import org.zkoss.zk.ui.event.Events; //导入依赖的package包/类
@Override
public final void doAfterCompose(final Component compEntorno) {
super.doAfterCompose(compEntorno);
padre = compEntorno.getParent();
usuarioLogado = ConsolaUtil.recuperarUsuarioLogado();
treeUA.setItemRenderer(new UnidadAdministrativaItemRenderer());
treeUA.setModel(createModelUA());
treeUA.addEventListener(Events.ON_DOUBLE_CLICK,
new EventListener() {
public void onEvent(final Event pEvent) {
onClick$btnAceptar();
}
});
}
开发者ID:GovernIB,项目名称:sistra,代码行数:17,代码来源:SelectorUnidadAdministrativaWModal.java
示例2: Event
import org.zkoss.zk.ui.event.Events; //导入依赖的package包/类
/**
* M�todo para On click$btn aceptar de la clase EntornoWModal.
*/
public final void onClick$btnAceptar() {
if (treeUA.getSelectedItem() == null ) {
mostrarMessageBox(Labels.getLabel("error.noSeleccion"),
Labels.getLabel(ConstantesWEB.INFO), Messagebox.OK,
Messagebox.EXCLAMATION);
return;
}
UnidadAdministrativa value = (UnidadAdministrativa) ((DefaultTreeNode) treeUA.getSelectedItem().getValue()).getData();
// Generamos evento de seleccion
final Event event = new Event(ConstantesZK.EVENTO_SELECCION_SELECTOR, padre,
new SeleccionSelector(ConstantesWEB.SELECTOR_UNIDAD_ADMINISTRATIVA, value));
Events.postEvent(event);
wSelectorUnidadAdministrativa.detach();
}
开发者ID:GovernIB,项目名称:sistra,代码行数:22,代码来源:SelectorUnidadAdministrativaWModal.java
示例3: confirmarBorrado
import org.zkoss.zk.ui.event.Events; //导入依赖的package包/类
/**
* Muestra mensaje de confirmacion de borrado. En caso de aceptar lanza
* funcion confirmacionBorrado que deber� ser sobreescrita en la
* implementacion.
*
* @param obj
* Objeto a ser pasado a la funcion postConfirmarBorrado en caso
* de que se confirme el borrado (opcional). Por si se quiere
* pasar algo para particularizar funcionamiento
* postConfirmarBorrado.
*
*/
protected final void confirmarBorrado(final Object obj) {
mostrarMessageBox(Labels.getLabel("mensaje.confirmacionBorrado"),
Labels.getLabel("mensaje.atencion"), Messagebox.YES
+ Messagebox.NO, Messagebox.EXCLAMATION,
new EventListener() {
public void onEvent(final Event event) {
if (((Integer) event.getData()).intValue() == Messagebox.YES) {
// Invocamos evento confirmacion borrado
final Event ev = new Event(
ConstantesZK.EVENTO_POST_CONFIRMAR_BORRADO,
componentCompose, obj);
Events.postEvent(ev);
}
}
});
}
开发者ID:GovernIB,项目名称:sistra,代码行数:29,代码来源:BaseComposer.java
示例4: initFieldsMenu
import org.zkoss.zk.ui.event.Events; //导入依赖的package包/类
/**
* Initialize field select menu
*/
private void initFieldsMenu() {
fieldsPopup = new Menupopup();
fieldsPopup.setStyle("overflow: auto; max-height: 100vh;");
detailsView.appendChild(fieldsPopup);
for (IField<?> c : fields) {
final ConditionFieldMenuitem i = new ConditionFieldMenuitem(c);
i.setLabel(c.getId() + " (" + c.getLabel() + ")");
/** Add item event listener **/
i.addEventListener(Events.ON_CLICK, new EventListener<MouseEvent>() {
@Override
public void onEvent(MouseEvent arg0) throws Exception {
txtAdditionalSearch.setText(txtAdditionalSearch.getText() +
"'" + i.getField().getId() + "'");
}
});
/** add item **/
fieldsPopup.appendChild(i);
}
}
开发者ID:sinnlabs,项目名称:dbvim,代码行数:27,代码来源:SearchComposer.java
示例5: tbbNewSearchMenu_onClick
import org.zkoss.zk.ui.event.Events; //导入依赖的package包/类
@Listen("onClick = #tbbNewSearchMenu")
public void tbbNewSearchMenu_onClick() {
final SearchMenu menu = new SearchMenu();
final SearchMenuProperties dialog = new SearchMenuProperties(menu, true);
dialog.addEventListener(Events.ON_CLOSE, new EventListener<Event>() {
@Override
public void onEvent(Event arg0) throws Exception {
if (dialog.getSelectedAction() == SearchMenuProperties.DD_OK) {
ConfigLoader.getInstance().getSearchMenus().create(menu);
}
}
});
designer.appendChild(dialog);
dialog.doModal();
}
开发者ID:sinnlabs,项目名称:dbvim,代码行数:18,代码来源:BuilderComposer.java
示例6: formNameDialog
import org.zkoss.zk.ui.event.Events; //导入依赖的package包/类
private void formNameDialog() {
final FormNameDialog dialog = new FormNameDialog(
currentForm.getName());
designer.appendChild(dialog);
dialog.addEventListener(Events.ON_CLOSE,
new EventListener<Event>() {
@Override
public void onEvent(Event evnt) throws Exception {
currentForm.setName(dialog.getName());
saveForm();
}
});
dialog.doModal();
}
开发者ID:sinnlabs,项目名称:dbvim,代码行数:19,代码来源:BuilderComposer.java
示例7: btnChangeRoles_onClick
import org.zkoss.zk.ui.event.Events; //导入依赖的package包/类
@Listen("onClick = #btnChangeRoles")
public void btnChangeRoles_onClick() throws SQLException {
if (selectedUser != null) {
final ChangeUserRoleDialog dialog = new ChangeUserRoleDialog(selectedUser);
wndMain.appendChild(dialog);
dialog.setHeight("50%");
dialog.setWidth("60%");
dialog.addEventListener(Events.ON_CLOSE, new EventListener<Event>() {
@Override
public void onEvent(Event arg0) throws Exception {
if (dialog.getSelectedAction() == ChangeUserRoleDialog.DD_OK) {
refreshRoles();
}
}
});
dialog.doModal();
}
}
开发者ID:sinnlabs,项目名称:dbvim,代码行数:23,代码来源:AdministrationConsoleComposer.java
示例8: btnAddRole_onClick
import org.zkoss.zk.ui.event.Events; //导入依赖的package包/类
@Listen("onClick = #btnAddRole")
public void btnAddRole_onClick() {
final AddRoleDialog dialog = new AddRoleDialog();
wndMain.appendChild(dialog);
dialog.addEventListener(Events.ON_CLOSE, new EventListener<Event>() {
@Override
public void onEvent(Event arg0) throws Exception {
// ok button clicked
if (dialog.getSelectedAction() == AddUserDialog.DD_OK) {
Role r = dialog.getRole();
// save new role
ConfigLoader.getInstance().getRoles().create(r);
// update UI
refreshRoleList();
}
}
});
dialog.setWidth("50%");
// show dialog window
dialog.doModal();
}
开发者ID:sinnlabs,项目名称:dbvim,代码行数:25,代码来源:AdministrationConsoleComposer.java
示例9: btnAddUser_onClick
import org.zkoss.zk.ui.event.Events; //导入依赖的package包/类
@Listen("onClick = #btnAddUser")
public void btnAddUser_onClick() {
final AddUserDialog dialog = new AddUserDialog();
wndMain.appendChild(dialog);
dialog.addEventListener(Events.ON_CLOSE, new EventListener<Event>() {
@Override
public void onEvent(Event arg0) throws Exception {
if (dialog.getSelectedAction() == AddUserDialog.DD_OK) {
User user = dialog.getUser();
// save new user
ConfigLoader.getInstance().getUsers().create(user);
// refresh UI
refreshUserList();
}
}
});
dialog.setWidth("50%");
dialog.doModal();
}
开发者ID:sinnlabs,项目名称:dbvim,代码行数:23,代码来源:AdministrationConsoleComposer.java
示例10: getSpecialProperty
import org.zkoss.zk.ui.event.Events; //导入依赖的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
示例11: btnAddConnection_Click
import org.zkoss.zk.ui.event.Events; //导入依赖的package包/类
private void btnAddConnection_Click() {
final AddConnectionDialog dialog = new AddConnectionDialog();
dialog.addEventListener(Events.ON_CLOSE, new EventListener<Event>() {
@Override
public void onEvent(Event arg0) throws Exception {
if (dialog.getSelectedAction() == AddConnectionDialog.DD_OK) {
DBConnection conn = new DBConnection(dialog.getName(),
dialog.getConnectionString(), dialog.getClassName());
ConfigLoader.getInstance().getDBConnections().create(conn);
RefreshTree();
}
}
});
this.appendChild(dialog);
dialog.doModal();
}
开发者ID:sinnlabs,项目名称:dbvim,代码行数:21,代码来源:ModelTree.java
示例12: btnSelectForm_onClick
import org.zkoss.zk.ui.event.Events; //导入依赖的package包/类
@Listen("onClick = #btnSelectForm")
public void btnSelectForm_onClick() throws SQLException {
final SelectFormDialog dialog = new SelectFormDialog();
this.getParent().appendChild(dialog);
dialog.addEventListener(Events.ON_CLOSE, new EventListener<Event>() {
@Override
public void onEvent(Event arg0) throws Exception {
if (dialog.getSelectedAction() == SelectFormDialog.DD_OK) {
form = dialog.getSelectedForm();
txtFormName.setText(form.getName());
}
}
});
dialog.doModal();
}
开发者ID:sinnlabs,项目名称:dbvim,代码行数:20,代码来源:SearchMenuProperties.java
示例13: btnSelectForm_onClick
import org.zkoss.zk.ui.event.Events; //导入依赖的package包/类
@Listen("onClick = #btnSelectForm")
public void btnSelectForm_onClick() throws SQLException {
final SelectFormDialog dialog = new SelectFormDialog();
this.appendChild(dialog);
dialog.addEventListener(Events.ON_CLOSE, new EventListener<Event>() {
@Override
public void onEvent(Event arg0) throws Exception {
if (dialog.getSelectedForm() != null) {
txtFormName.setText(dialog.getSelectedForm().getName());
txtFormName_onChange();
}
}
});
dialog.doModal();
}
开发者ID:sinnlabs,项目名称:dbvim,代码行数:20,代码来源:TableFieldProperties.java
示例14: onEvent
import org.zkoss.zk.ui.event.Events; //导入依赖的package包/类
@Override
public void onEvent(MouseEvent evnt) throws Exception {
Treeitem item = (Treeitem) evnt.getTarget();
final DBConnection dbc = (DBConnection) item.getValue();
final AddConnectionDialog dialog = new AddConnectionDialog(dbc);
developer.getDesigner().appendChild(dialog);
dialog.addEventListener(Events.ON_CLOSE, new EventListener<Event>() {
@Override
public void onEvent(Event arg0) throws Exception {
if (dialog.getSelectedAction() == AddConnectionDialog.DD_OK) {
dbc.setClassName(dialog.getClassName());
dbc.setConnectionString(dialog.getConnectionString());
ConfigLoader.getInstance().getDBConnections().update(dbc);
}
}
});
dialog.doModal();
}
开发者ID:sinnlabs,项目名称:dbvim,代码行数:24,代码来源:DBConnectionOnDoubleClickEventListener.java
示例15: render
import org.zkoss.zk.ui.event.Events; //导入依赖的package包/类
@Override
public void render(Row row, final Cost cost, int index) throws Exception {
row.appendChild(new Label(cost.getDescription()));
row.appendChild(new Label(DateHelper.getDate(cost.getDate())));
row.appendChild(new Label(AmountHelper.formatDecimal(cost.getAmount())));
row.appendChild(new Label(AmountHelper.formatDecimal(cost.getVat())));
row.appendChild(new Label(cost.getCostType().getOmschrijving()));
row.addEventListener(Events.ON_CLICK, new EventListener<Event>() {
public void onEvent(Event event) throws Exception {
Map<String, Object> arguments = new HashMap<>();
arguments.put("cost", cost);
String template = "edit-cost.zul";
Window window = (Window) Executions.createComponents(template, null, arguments);
window.doModal();
}
});
}
开发者ID:beemsoft,项目名称:techytax-zk,代码行数:19,代码来源:CostRowRenderer.java
示例16: render
import org.zkoss.zk.ui.event.Events; //导入依赖的package包/类
@SuppressWarnings("unchecked")
public void render(Listitem listitem, BookValueHistory data, int index) {
Listbox listbox = listitem.getListbox();
if (index == 0) {
if (listbox.getListhead() != null) {
listbox.getListhead().setParent(null);
}
createListhead(data).setParent(listbox);
}
listitem.setValue(data);
if (data.getBookValues().size() > 0) {
String description = data.getBookValues().get(0).getDescription();
addLabelCell(listitem, description);
for (BookValue bookValue : data.getBookValues()) {
if (bookValue.getSaldo() != null) {
addIntboxCell(listitem, bookValue.getSaldo().intValue()).addEventListener(Events.ON_CHANGE,
getSaldoChangedListener(listbox, bookValue, listitem));
} else {
addLabelCell(listitem, "");
}
}
}
}
开发者ID:beemsoft,项目名称:techytax-zk,代码行数:24,代码来源:InplaceEditingActivumRenderer.java
示例17: bindCommand
import org.zkoss.zk.ui.event.Events; //导入依赖的package包/类
@Override
public void bindCommand(Event onEvent, Object viewModel, String commandExpr,
ClickableComponent clickableComp) {
Component comp = ZkHtmlComponentUtil.castHtmlComponent(clickableComp);
Deque<Binder> registeredBinders = binderThreadLocal.get();
if (registeredBinders.isEmpty()) {
throw new IllegalStateException("Binder must be registered");
}
Binder binder = registeredBinders.getLast();
if (viewModel != binder.getViewModel()) {
throw new IllegalStateException("Bind property only on last registered bean item");
}
String evtnm;
switch (onEvent) {
case ON_CLICK:
evtnm = Events.ON_CLICK;
break;
default:
throw new UnsupportedOperationException("Unsupported event: " + onEvent);
}
binder.addCommandBinding(comp, evtnm, "'" + commandExpr + "'", null);
}
开发者ID:panifex,项目名称:panifex-platform,代码行数:27,代码来源:ZkGuiFactory.java
示例18: Event
import org.zkoss.zk.ui.event.Events; //导入依赖的package包/类
/**
* Click boton Cancelar.
*/
public final void onClick$btnCancelar() {
//Generamos evento
if (plantillaIdioma != null) {
Events.postEvent(new Event(ConsolaUtil.eventoModoAcesso(modo), wPlantillaIdioma.getParent(), plantillaIdioma));
}
wPlantillaIdioma.detach();
}
开发者ID:GovernIB,项目名称:sistra,代码行数:13,代码来源:PlantillaIdiomaWModal.java
示例19: buildForm
import org.zkoss.zk.ui.event.Events; //导入依赖的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
示例20: addItem
import org.zkoss.zk.ui.event.Events; //导入依赖的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
注:本文中的org.zkoss.zk.ui.event.Events类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论