Package org.zkoss.zul

Examples of org.zkoss.zul.Window


    /**
     * !! Windows as NameSpaceContainer to prevent not unique id's error
     * from other dashboard module buttons or other used components.
     */
    Window win = new Window();
    win.setBorder("none");
    win.setParent(this);

    Groupbox gb = new Groupbox();
    gb.setMold("3d");
    gb.setClosable(false);
    gb.setParent(win);
    Caption cap = new Caption();
    cap.setImage(iconPath);
    cap.setLabel("Translator");
    cap.setStyle("padding: 0px;");
    cap.setParent(gb);

    // body
    Borderlayout bl = new Borderlayout();
    bl.setHeight(getModulHeight() + "px");
    bl.setParent(gb);
    Center ct = new Center();
    ct.setSclass("FDCenterNoBorder");
    ct.setStyle("background-color: white");
    ct.setParent(bl);

    Div container = new Div();
    container.setStyle("padding: 4px;");
    ct.appendChild(container);

    Script init = new Script();
    init.setContent("function googleTranslateElementInit() { new google.translate.TranslateElement({pageLanguage: 'af'}, '" + container.getUuid() + "'); };");
    win.appendChild(init);

    Script translate = new Script();
    translate.setSrc("http://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit");
    win.appendChild(translate);

  }
View Full Code Here


   */
  private void createServerPushTimer() {

    this.moduleTimer = new Timer();
    // timer doesn't work without a page as parent
    Window win = (Window) Path.getComponent("/outerIndexWindow");
    this.moduleTimer.setPage(win.getPage());

    this.moduleTimer.setDelay(getDelay());
    this.moduleTimer.setRepeats(true);
    this.moduleTimer.addEventListener("onTimer", new EventListener() {

View Full Code Here

    /**
     * !! Windows as NameSpaceContainer to prevent not unique id's error
     * from other dashboard module buttons or other used components.
     */
    Window win = new Window();
    win.setBorder("none");
    win.setSclass("OT-DashboardWindow");
    win.setParent(this);

    Panel pl = new Panel();
    pl.setBorder("normal");
    pl.setClosable(false);
    pl.setParent(win);
View Full Code Here

      @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);
    this.btnSendMsg.addEventListener("onClick", new EventListener() {

      @Override
      public void onEvent(Event event) throws Exception {
        // open a box for inserting the message
        Window win = (Window) Path.getComponent("/outerIndexWindow");
        final String str = InputMessageTextBox.show(win);
        EventQueues.lookup("testEventQueue", EventQueues.APPLICATION, true).publish(new Event("onTestEventQueue", null, str));
      }
    });
View Full Code Here

    int msgHeight = 260;

    // if null, create the MessageWindow
    if (msgWindow == null) {
      msgWindow = new Window();
      msgWindow.setId("msgWindow");
      msgWindow.setTitle("Messages");
      msgWindow.setSizable(true);
      msgWindow.setClosable(true);
      msgWindow.setWidth("400px");
View Full Code Here

   *
   * @param event
   * @throws InterruptedException
   */
  public void onClick$btnPrint(Event event) throws InterruptedException {
    final Window win = (Window) Path.getComponent("/outerIndexWindow");
    new ArticleSimpleDJReport(win);
  }
View Full Code Here

    box.invalidate();
  }

  private void addWindowChild(Box box) {
    int nextCount = box.getChildren().size();
    Window child = new Window();
    child.setBorder("normal");
    child.appendChild(new Label("Window-" + nextCount));
    box.appendChild(child);
    box.invalidate();
  }
View Full Code Here

   */
  private void createServerPushTimer() {

    this.moduleTimer = new Timer();
    // timer doesn't work without a page as parent
    Window win = (Window) Path.getComponent("/outerIndexWindow");
    this.moduleTimer.setPage(win.getPage());

    this.moduleTimer.setDelay(getDelay());
    this.moduleTimer.setRepeats(true);
    this.moduleTimer.addEventListener("onTimer", new EventListener() {

View Full Code Here

    /**
     * !! Windows as NameSpaceContainer to prevent not unique id's error
     * from other dashboard module buttons or other used components.
     */
    Window win = new Window();
    win.setBorder("none");
    win.setSclass("OT-DashboardWindow");
    win.setParent(this);

    Panel pl = new Panel();
    pl.setBorder("normal");
    pl.setClosable(false);
    pl.setParent(win);
View Full Code Here

    /**
     * !! Windows as NameSpaceContainer to prevent not unique id's error
     * from other dashboard module buttons or other used components.
     */
    Window win = new Window();
    win.setBorder("none");
    win.setSclass("OT-DashboardWindow");
    win.setParent(this);

    Panel pl = new Panel();
    pl.setBorder("normal");
    pl.setClosable(false);
    pl.setParent(win);
View Full Code Here

TOP

Related Classes of org.zkoss.zul.Window

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.