Package org.zkoss.zul

Examples of org.zkoss.zul.Button$EncodedHref


  private void updateContent() {
    grid.getRows().getChildren().clear();
    for (Node node : JeaseSession.getFilter().apply(
        ((Node) tree.getSelectedValue()).getChildren())) {
      Button button = newNodeSelector(node);
      Popup popup = newNodePreview(node);
      if (popup != null) {
        button.setTooltip(popup);
        grid.add(button, popup);
      } else {
        grid.add(button);
      }
    }
View Full Code Here


        plotinfo.setDataModel(dataModel);
        plotinfo.setParent(timeplot);
        plotinfo.setTimeGeometry(tg);
        plotinfo.setValueGeometry(vg);
        timeplot.setParent(comp);
        Button btn = new Button("click");
        btn.setParent(comp);
        btn.addEventListener("onClick", new EventListener()
        {

            @Override
            public void onEvent(Event event) throws Exception
            {
View Full Code Here

        plotinfo.setParent(timeplot);
        plotinfo.setTimeGeometry(tg);
        plotinfo.setValueGeometry(vg);
        timeplot.setParent(comp);
      
        Button btn1 = new Button("ChangeData");
        btn1.setParent(comp);
        btn1.addEventListener("onClick", new EventListener(){

            @Override
            public void onEvent(Event event) throws Exception
            {
                // TODO Auto-generated method stub
View Full Code Here

    t.setWidth("98%");
    t.setMultiline(true);
    t.setRows(20);
    t.setParent(w);
    t.setConstraint("no empty");
    final Button ok = new Button("OK");
    final Button cancel = new Button("Cancel");
    ok.setParent(w);
    ok.addEventListener(Events.ON_CLICK,
        new EventListener() {
      public void onEvent(Event e) throws Exception {
        String val = t.getValue();
        String[] vals = val.trim().split("\n");
        final StringBuffer sb = new StringBuffer();
        fileModel.clear();
        final String r = getDesktop().getWebApp().getRealPath("/");
        final File test2 = new File(r, PATH);
        final File[] files = test2.listFiles(new MyFilenameFilter("", false));
        for(int j = 0; j < vals.length; j++) {
          boolean exist = false;
          for (int i = 0; i < files.length; i++) {
            if (vals[j].trim().equalsIgnoreCase(files[i].getName())) {
              fileModel.add(files[i]);
              exist = true;
              break;
            }
          }
          if (!exist) sb.append(vals[j].trim()).append("\n");
        }
        if (sb.toString().trim().length() > 0) t.setValue("Failed File Name:\n" + sb.toString());
        w.insertBefore(new Label(" \nsuccess : [" + fileModel.size() + "] failed : [" + (vals.length - fileModel.size())+ "]"),
            (Component)w.getChildren().get(0));
        ok.detach();
        cancel.detach();
      }
    });
    cancel.setParent(w);
    cancel.addEventListener(Events.ON_CLICK,
        new EventListener() {
      public void onEvent(Event e) throws Exception {
        w.detach();
      }
    });
View Full Code Here

        }
      }
    });

    final Textbox messageBox = new Textbox();
    Button sendMessage = new Button("Send message");
    sendMessage.addEventListener(Events.ON_CLICK, new EventListener() {
      public void onEvent(Event arg0) throws Exception {
        message = messageBox.getText();
      }
    });

    Button readMessage = new Button("Read Message");
    readMessage.addEventListener(Events.ON_CLICK, new EventListener() {
      public void onEvent(Event evt) throws Exception {
        // this is just an example of user interacting with the
        // application
      }
    });
View Full Code Here

    Label l = new Label();
    l.setValue("You are using ...");
    l.setParent(pc);

    Button btn = new Button();
    btn.addEventListener("onClick", new EventListener() {

      public void onEvent(Event event) throws Exception {
        Messagebox.show("I'm pressed");
      }
    });

    btn.setLabel("say hello");
    btn.setParent(pc);

  }
View Full Code Here

    /* 100. Button */
    final Div divBtn1 = new Div();
    divBtn1.setStyle("align: center");
    divBtn1.setParent(this.div_Buttons);

    this.btn100 = new Button();
    this.btn100.setId("btn100");
    this.btn100.setLabel("insert 100");
    this.btn100.setImage("/images/icons/import_16x16.gif");
    this.btn100.setTooltiptext("Insert 100 randomly created customer records");
    this.btn100.setParent(divBtn1);

    this.btn100.addEventListener("onClick", new OnClick100Eventlistener());

    /* Separator */
    createNewSeparator(this.div_Buttons, "horizontal", false, "5", "");
    createNewSeparator(this.div_Buttons, "horizontal", false, "5", "");

    /* 1.000 Button */
    final Div divBtn2 = new Div();
    divBtn2.setStyle("align: center;");
    divBtn2.setParent(this.div_Buttons);

    this.btn1000 = new Button();
    this.btn1000.setId("btn1000");
    this.btn1000.setLabel("insert 1.000");
    this.btn1000.setImage("/images/icons/import_16x16.gif");
    this.btn1000.setTooltiptext("Insert 1.000 randomly created customer records");
    this.btn1000.setParent(divBtn2);
View Full Code Here

    Separator sp2 = new Separator();
    sp2.setBar(true);
    sp2.setParent(this);

    Button btnSend = new Button();
    btnSend.setLabel(Labels.getLabel("common.Send"));
    btnSend.setParent(this);
    btnSend.addEventListener("onClick", new EventListener() {

      @Override
      public void onEvent(Event event) throws Exception {

        // Check if empty, than do not send
View Full Code Here

    South south = new South();
    south.setHeight("26px");
    south.setParent(bl);

    // Button
    Button btnOK = new Button();
    btnOK.setLabel("OK");
    btnOK.addEventListener("onClick", new OnCloseListener());
    btnOK.setParent(south);

    // Listbox
    listbox = new Listbox();
    listbox.setStyle("border: none;");
    listbox.setHeight("100%");
View Full Code Here

    Hbox hboxSameButtonsHeight = new Hbox();
    hboxSameButtonsHeight.setPack("center");
    hboxSameButtonsHeight.setParent(toolbarRight);

    Button btnRefresh = new Button();
    btnRefresh.setId("btnSelectYoutubeSong");
    btnRefresh.setSclass("oT_ButtonForPanelWithIcon");
    btnRefresh.setImage("/images/icons/play-music_16x16.png");
    btnRefresh.setTooltiptext(Labels.getLabel("btnSelectYoutubeSong.tooltiptext"));
    btnRefresh.addEventListener("onClick", new BtnClickListener());
    btnRefresh.setParent(hboxSameButtonsHeight);

    // body
    Borderlayout bl = new Borderlayout();
    bl.setHeight(getModulHeight() + "px");
    bl.setParent(plc);
View Full Code Here

TOP

Related Classes of org.zkoss.zul.Button$EncodedHref

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.