Package org.zkoss.zk.ui.event

Examples of org.zkoss.zk.ui.event.EventListener


    appendChild(resetButton);
    initListener();
  }

  private void initListener() {
    EventListener searchAction = new EventListener() {
      public void onEvent(Event e) {
        searchPerformed(searchField.getText());
      }
    };

    EventListener resetAction = new EventListener() {
      public void onEvent(Event e) {
        clearSearch();
        searchPerformed(null);
      }
    };
View Full Code Here


          .decipher(ZK.getCookie(COOKIE_LOGIN), SALT));
      passwordField.setText(Crypts.decipher(
          ZK.getCookie(COOKIE_PASSWORD), SALT));
    }

    EventListener submitListener = new EventListener() {
      public void onEvent(Event e) {
        loginHandler(rememberMe);
      }
    };

    Button submitButton = new Button(I18N.get("Login"), Images.SystemUsers);
    submitButton.addEventListener(Events.ON_CLICK, submitListener);
    addEventListener(Events.ON_OK, submitListener);

    Button resetButton = new Button(I18N.get("Reset"), Images.ViewRefresh);
    resetButton.addEventListener(Events.ON_CLICK, new EventListener() {
      public void onEvent(Event e) {
        resetHandler();
      }
    });
       
View Full Code Here

    createButton = new Button(I18N.get("New"), Images.DocumentNew);
    exportButton = new Button(I18N.get("Export"), Images.XOfficeSpreadsheet);
    printButton = new Button(I18N.get("Print"), Images.Printer);

    listbox.addEventListener(Events.ON_SELECT, new EventListener() {
      public void onEvent(Event event) throws Exception {
        onSelect(listbox.getSelectedValue());
      }
    });

    createButton.addEventListener(Events.ON_CLICK, new EventListener() {
      public void onEvent(Event event) throws Exception {
        onSelect(objectTableModel.newObject());
      }
    });

    if (editor == null || objectTableModel.newObject() == null) {
      createButton.setVisible(false);
    }

    exportButton.addEventListener(Events.ON_CLICK, new EventListener() {
      public void onEvent(Event event) throws Exception {
        exportTable();
      }
    });

    printButton.addEventListener(Events.ON_CLICK, new EventListener() {
      public void onEvent(Event event) throws Exception {
        printTable();
      }
    });
View Full Code Here

  }

  public Window getEditorWindow() {
    if (editorWindow == null) {
      editorWindow = new Window();
      editorWindow.addEventListener(Events.ON_CLOSE, new EventListener() {
        public void onEvent(Event event) {
          if (editor != null) {
            Events.sendEvent(editor, event);
          }
          if (event.isPropagatable()) {
View Full Code Here

    if (editor != null) {
      if (!getEditorWindow().getChildren().contains(editor)) {
        getEditorWindow().getChildren().clear();
        getEditorWindow().appendChild(editor);
      }
      editor.addEventListener(Events.ON_CLOSE, new EventListener() {
        public void onEvent(Event event) {
          getEditorWindow().close();
          clearSelection();
          refresh();
        }
      });
      editor.addEventListener(Events.ON_CHANGE, new EventListener() {
        public void onEvent(Event event) {
          getEditorWindow().setTitle(getEditor());
          refresh();
        }
      });
View Full Code Here

  public Radiobutton(String label, String image) {
    super(label, image);
  }

  public void addCheckListener(final ActionListener actionListener) {
    addEventListener(Events.ON_CHECK, new EventListener() {
      public void onEvent(Event e) throws Exception {
        actionListener.actionPerformed(e);
      }
    });
  }
View Full Code Here

      appendChild(radio);
    }
  }

  public void addCheckListener(final ActionListener actionListener) {
    addEventListener(Events.ON_CHECK, new EventListener() {
      public void onEvent(Event e) throws Exception {
        actionListener.actionPerformed(e);
      }
    });
  }
View Full Code Here

import org.zkoss.zk.ui.event.Events;

public class Calendar extends org.zkoss.zul.Calendar {
 
  public void addChangeListener(final ActionListener actionListener) {
    addEventListener(Events.ON_CHANGE, new EventListener() {
      public void onEvent(Event e) throws Exception {
        actionListener.actionPerformed(e);
      }
    });
  }
View Full Code Here

      return 0;
    }
  }
 
  public void addChangingListener(final ActionListener actionListener) {
    addEventListener(Events.ON_CHANGING, new EventListener() {
      public void onEvent(Event e) throws Exception {
        actionListener.actionPerformed(e);
      }
    });
  }
View Full Code Here

  private Tabpanels tabpanels = new Tabpanels();

  public Tabbox() {
    appendChild(tabs);
    appendChild(tabpanels);
    addEventListener(Events.ON_SELECT, new EventListener() {
      public void onEvent(Event evt) {
        refresh();
      }
    });
  }
View Full Code Here

TOP

Related Classes of org.zkoss.zk.ui.event.EventListener

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.