Examples of EventListener


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

      super.onSelect(obj);
    }
  }

  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

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

  public Linkbutton(String label) {
    super(label);
  }

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

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

  public Date getDate() {
    return getValue();
  }

  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

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

      public void render(Listitem item, Object data) throws Exception {
        item.setValue(data);
        item.setLabel(renderer.render(data));
        item.setDraggable(Sortbox.this.toString());
        item.setDroppable(Sortbox.this.toString());
        item.addEventListener(Events.ON_DROP, new EventListener() {
          public void onEvent(Event evt) {
            DropEvent dropEvent = (DropEvent) evt;
            Sortbox.this.addItemToSelection((Listitem) dropEvent.getDragged());
            for (Object obj : Sortbox.this.getSelectedItems()) {
              Listitem listitem = (Listitem) obj;
View Full Code Here

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

  private void appendControls() {
    remove(controls);
    add("", controls);
    Image trash = new Image(Images.UserTrashFull);
    trash.setDroppable(toString());
    trash.addEventListener(Events.ON_DROP, new EventListener() {
      public void onEvent(Event evt) throws Exception {
        DropEvent dropEvent = (DropEvent) evt;
        getRows().removeChild(
            dropEvent.getDragged().getParent().getParent());
      }
View Full Code Here

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

      label.setValue(((PropertyEditor) label.getParent().getNextSibling()
          .getFirstChild()).getProperty().getName());
      label.setStyle("cursor: pointer; font-style: italic;");
      label.setDraggable(toString());
      label.setDroppable(toString());
      label.addEventListener(Events.ON_DROP, new EventListener() {
        public void onEvent(Event evt) throws Exception {
          DropEvent dropEvent = (DropEvent) evt;
          swapRows(dropEvent.getDragged(), dropEvent.getTarget());
        }
      });
      label.addEventListener(Events.ON_CLICK, new EventListener() {
        public void onEvent(Event evt) throws Exception {
          convertLabelToTextfield(label);
        }
      });
    }
View Full Code Here

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

        target.getParent().getParent());
  }

  private void convertLabelToTextfield(final Label label) {
    final Textfield textfield = new Textfield(label.getValue());
    EventListener labelEditPerformed = new EventListener() {
      public void onEvent(Event evt) throws Exception {
        String value = textfield.getValue();
        label.setValue(value);
        ((PropertyEditor) textfield.getParent().getNextSibling()
            .getFirstChild()).getProperty().setName(value);
View Full Code Here

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

  public void exit() {
    fireClose();
  }

  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

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

      }
    });
  }

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

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

    this(label, actionListener);
    setImage(image);
  }

  public void addClickListener(final ActionListener actionListener) {
    addEventListener(Events.ON_CLICK, new EventListener() {
      public void onEvent(Event e) throws Exception {
        actionListener.actionPerformed(e);
      }
    });
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.