Package org.zkoss.zul

Examples of org.zkoss.zul.Toolbarbutton


      if (value instanceof Map) continue;
      String path = String.valueOf(value);
      String swfPath = "";
      if (path.endsWith("swf"))
        swfPath = "~./ckez/img/flashIcon.jpg";
      Toolbarbutton tb = new Toolbarbutton(String.valueOf(me.getKey()), "".equals(swfPath)? path: swfPath);
      tb.addEventListener("onClick", new EventListener() {
        public void onEvent(Event event) throws Exception {
          if (selBtn !=null)
            selBtn.setSclass(null);
          selBtn = (Toolbarbutton) event.getTarget();
          selBtn.setSclass("sel");
        }
      });
      int CKEditorFuncNum = 1;
      CKEditorFuncNum = new Integer(((String[])param.get("CKEditorFuncNum"))[0]).intValue();
      String script = "window.opener.CKEDITOR.tools.callFunction("+
        CKEditorFuncNum+", '" + execution.encodeURL(path) + "'); window.close(); ";
      tb.setWidgetListener("onDoubleClick",script);
     
      cntDiv.appendChild(tb);
    }
   
  }
View Full Code Here


    Div div = new Div();
    div.setStyle("padding: 1px;");
    div.setParent(statusBarMessageIndicator);

    // open message button
    this.btnOpenMsg = new Toolbarbutton();
    this.btnOpenMsg.setId("btnOpenMsg");
    this.btnOpenMsg.setWidth("20px");
    this.btnOpenMsg.setHeight("20px");
    this.btnOpenMsg.setImage("/images/icons/message2_16x16.gif");
    this.btnOpenMsg.setTooltiptext(Labels.getLabel("common.Message.Open"));
    this.btnOpenMsg.setParent(div);
    this.btnOpenMsg.addEventListener("onClick", new EventListener() {

      @Override
      public void onEvent(Event event) throws Exception {
        // 1. Reset to normal image
        btnOpenMsg.setImage("/images/icons/message2_16x16.gif");
        // 2. open the message window
        Window win = getMsgWindow();
        Textbox t = (Textbox) win.getFellow("tb");
        t.setText(getMsg());
        // TODO scroll to latest message
        // Clients.scrollIntoView(t);

      }
    });

    // send message button
    this.btnSendMsg = new Toolbarbutton();
    this.btnSendMsg.setWidth("20px");
    this.btnSendMsg.setHeight("20px");
    this.btnSendMsg.setImage("/images/icons/message1_16x16.gif");
    this.btnSendMsg.setTooltiptext(Labels.getLabel("common.Message.Send"));
    this.btnSendMsg.setParent(div);
View Full Code Here

   *
   * @throws InterruptedException
   */
  private void createMenu() throws InterruptedException {

    Toolbarbutton toolbarbutton;

    final Panelchildren gb = (Panelchildren) getMainMenuWindow().getFellowIfAny("panelChildren_menu");

    Space space = new Space();
    space.setHeight("5px");
    space.setParent(gb);

    // Hbox for the expand/collapse buttons
    final Hbox hbox = new Hbox();
    // hbox.setStyle("backgound-color: " + bgColorInner);
    hbox.setParent(gb);

    // ToolbarButton for expanding the menutree
    toolbarbutton = new Toolbarbutton();
    hbox.appendChild(toolbarbutton);
    toolbarbutton.setId("btnMainMenuExpandAll");
    toolbarbutton.setImage("/images/icons/folder_open_16x16.gif");
    toolbarbutton.setTooltiptext(Labels.getLabel("btnFolderExpand.tooltiptext"));
    toolbarbutton.addEventListener("onClick", new EventListener() {
      @Override
      public void onEvent(Event event) throws Exception {
        onClick$btnMainMenuExpandAll(event);
      }
    });
    toolbarbutton = new Toolbarbutton();
    hbox.appendChild(toolbarbutton);
    toolbarbutton.setId("btnMainMenuCollapseAll");
    toolbarbutton.setImage("/images/icons/folder_closed2_16x16.gif");
    toolbarbutton.setTooltiptext(Labels.getLabel("btnFolderCollapse.tooltiptext"));
    toolbarbutton.addEventListener("onClick", new EventListener() {
      @Override
      public void onEvent(Event event) throws Exception {
        onClick$btnMainMenuCollapseAll(event);
      }
    });

    toolbarbutton = new Toolbarbutton();
    hbox.appendChild(toolbarbutton);
    toolbarbutton.setId("btnMainMenuChange");

    toolbarbutton.setImage("/images/icons/menu_16x16.gif");
    // toolbarbutton.setImage("/images/icons/combobox_16x16.gif");
    toolbarbutton.setTooltiptext(Labels.getLabel("btnMainMenuChange.tooltiptext"));
    toolbarbutton.addEventListener("onClick", new EventListener() {
      @Override
      public void onEvent(Event event) throws Exception {
        onClick$btnMainMenuChange(event);
      }
    });
View Full Code Here

TOP

Related Classes of org.zkoss.zul.Toolbarbutton

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.