本文整理汇总了Java中org.zkoss.zk.ui.event.Event类的典型用法代码示例。如果您正苦于以下问题:Java Event类的具体用法?Java Event怎么用?Java Event使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Event类属于org.zkoss.zk.ui.event包,在下文中一共展示了Event类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: closeGA
import org.zkoss.zk.ui.event.Event; //导入依赖的package包/类
@Command
public void closeGA() {
QLog.l().logQUser().debug("==> Start: closeGA");
CheckGABoard = false;
GAManagementDialogWindow.addEventListener("onClose", new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
QLog.l().logQUser().debug(" --> Start: onEvent in closeGA");
// TODO Auto-generated method stub
event.stopPropagation();
// GAManagementDialogWindow.detach();
GAManagementDialogWindow.setVisible(false);
CheckGABoard = false;
QLog.l().logQUser()
.debug(" --> user.getGABoard() flag: " + user.getGABoard());
QLog.l().logQUser().debug(" --> CheckGABoard static var: " + CheckGABoard);
QLog.l().logQUser().debug(" --> End: onEvent in closeGA");
}
});
QLog.l().logQUser().debug("==> End: closeGA");
}
示例2: doAfterCompose
import org.zkoss.zk.ui.event.Event; //导入依赖的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();
}
});
}
示例3: Event
import org.zkoss.zk.ui.event.Event; //导入依赖的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();
}
示例4: confirmarBorrado
import org.zkoss.zk.ui.event.Event; //导入依赖的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);
}
}
});
}
示例5: tbbNewSearchMenu_onClick
import org.zkoss.zk.ui.event.Event; //导入依赖的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();
}
示例6: tbbCloseForm_onClick
import org.zkoss.zk.ui.event.Event; //导入依赖的package包/类
@Listen("onClick = #tbbCloseForm")
public void tbbCloseForm_onClick() {
if (currentForm == null)
return;
if (designerCanvas.isCanvasDirty()) {
Messagebox.show("Do you want to save changes?", "Save changes",
Messagebox.YES | Messagebox.NO | Messagebox.CANCEL,
Messagebox.QUESTION, new EventListener<Event>() {
@Override
public void onEvent(Event evnt) throws Exception {
if (Messagebox.ON_YES.equals(evnt.getName())) {
saveForm();
closeForm();
} else if (Messagebox.ON_NO.equals(evnt.getName())) {
closeForm();
}
}
});
} else {
closeForm();
}
}
示例7: formNameDialog
import org.zkoss.zk.ui.event.Event; //导入依赖的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();
}
示例8: lstUsers_onSelect
import org.zkoss.zk.ui.event.Event; //导入依赖的package包/类
@Listen("onSelect = #lstUsers")
public void lstUsers_onSelect() throws SQLException {
if (isUserDirty) {
Messagebox.show("User was modified. Save changes?", "User",
Messagebox.YES | Messagebox.NO
, Messagebox.QUESTION, new EventListener<Event>() {
@Override
public void onEvent(Event e) throws Exception {
if(Messagebox.ON_YES.equals(e.getName())){
UpdateUser();
userSelected();
}else if(Messagebox.ON_NO.equals(e.getName())){
userSelected();
}
}
});
return;
} else {
userSelected();
}
}
示例9: lstRoles_onSelect
import org.zkoss.zk.ui.event.Event; //导入依赖的package包/类
@Listen("onSelect = #lstRoles")
public void lstRoles_onSelect() {
if (isRoleDirty) {
Messagebox.show("Role was modified. Save changes?", "Role",
Messagebox.YES | Messagebox.NO
, Messagebox.QUESTION, new EventListener<Event>() {
@Override
public void onEvent(Event e) throws Exception {
if(Messagebox.ON_YES.equals(e.getName())){
UpdateRole();
roleSelected();
}else if(Messagebox.ON_NO.equals(e.getName())){
roleSelected();
}
}
});
return;
} else {
roleSelected();
}
}
示例10: btnChangeRoles_onClick
import org.zkoss.zk.ui.event.Event; //导入依赖的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();
}
}
示例11: btnDeleteUser_onClick
import org.zkoss.zk.ui.event.Event; //导入依赖的package包/类
@Listen("onClick = #btnDeleteUser")
public void btnDeleteUser_onClick() {
if (selectedUser == null)
return;
Messagebox.show("You are shure, that you want to delete user?", "User delete",
Messagebox.YES | Messagebox.NO
, Messagebox.QUESTION, new EventListener<Event>() {
@Override
public void onEvent(Event e) throws Exception {
if(Messagebox.ON_YES.equals(e.getName())){
ConfigLoader.getInstance().getUsers().delete(selectedUser);
selectedUser = null;
refreshUserList();
}
}
});
}
示例12: btnDeleteRole_onClick
import org.zkoss.zk.ui.event.Event; //导入依赖的package包/类
@Listen("onClick = #btnDeleteRole")
public void btnDeleteRole_onClick() {
if (selectedRole == null)
return;
Messagebox.show("You are shure, that you want to delete role?", "Role delete",
Messagebox.YES | Messagebox.NO
, Messagebox.QUESTION, new EventListener<Event>() {
@Override
public void onEvent(Event e) throws Exception {
if(Messagebox.ON_YES.equals(e.getName())){
ConfigLoader.getInstance().getRoles().delete(selectedRole);
selectedRole = null;
refreshRoleList();
}
}
});
}
示例13: btnAddRole_onClick
import org.zkoss.zk.ui.event.Event; //导入依赖的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();
}
示例14: btnAddUser_onClick
import org.zkoss.zk.ui.event.Event; //导入依赖的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();
}
示例15: btnAddConnection_Click
import org.zkoss.zk.ui.event.Event; //导入依赖的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();
}