Package com.extjs.gxt.ui.client.event

Examples of com.extjs.gxt.ui.client.event.WindowEvent


   * Hides the window.
   *
   * @param buttonPressed the button that was pressed or null
   */
  public void hide(Button buttonPressed) {
    if (hidden || !fireEvent(Events.BeforeHide, new WindowEvent(this, buttonPressed))) {
      return;
    }
    hidden = true;
   

    restoreSize = getSize();
    restorePos = getPosition(true);
   
    super.onHide();

    RootPanel.get().remove(this);
    if (modal) {
      modalPanel.hide();
    }
    fireEvent(Events.Hide, new WindowEvent(this, buttonPressed));
  }
View Full Code Here


      setSize(XDOM.getViewportSize().width, XDOM.getViewportSize().height);

      maxBtn.setVisible(false);
      restoreBtn.setVisible(true);

      fireEvent(Events.Maximize, new WindowEvent(this));
    }
  }
View Full Code Here

   * simply fires the minimize event since the behavior of minimizing a window
   * is application-specific. To implement custom minimize behavior, either the
   * minimize event can be handled or this method can be overridden.
   */
  public void minimize() {
    fireEvent(Events.Minimize, new WindowEvent(this));
  }
View Full Code Here

      setPosition(restorePos.x, restorePos.y);
      setSize(restoreSize.width, restoreSize.height);
      restorePos = null;
      restoreSize = null;
      maximized = false;
      fireEvent(Events.Restore, new WindowEvent(this));
    }
  }
View Full Code Here

  public void setActive(boolean active) {
    if (active) {
      if (!maximized) {

      }
      fireEvent(Events.Activate, new WindowEvent(this));
    } else {
      fireEvent(Events.Deactivate, new WindowEvent(this));
    }
  }
View Full Code Here

  /**
   * Shows the window, rendering it first if necessary, or activates it and
   * brings it to front if hidden.
   */
  public void show() {
    if (!fireEvent(Events.BeforeShow, new WindowEvent(this))) {
      return;
    }

    RootPanel.get().add(this);
    el().makePositionable(true);
View Full Code Here

        fly(focusWidget.getElement()).focus();
      }
    }

    layout();
    fireEvent(Events.Show, new WindowEvent(this));
  }
View Full Code Here

        }

        @Override
        protected ComponentEvent previewEvent(int type, ComponentEvent ce) {
          if (ce instanceof WindowEvent) {
            WindowEvent we = (WindowEvent) ce;
            MessageBoxEvent e = new MessageBoxEvent(MessageBox.this, this, we.buttonClicked);
            if (type == Events.Close || type == Events.BeforeClose) {
              if (textBox != null) {
                e.value = textBox.getValue();
              } else if (textArea != null) {
View Full Code Here

   * Closes the window.
   *
   * @param button the button that was pressed or null
   */
  public void close(Button button) {
    if (hidden || !fireEvent(Events.BeforeClose, new WindowEvent(this, button))) {
      return;
    }
    hidden = true;
    restoreSize = getSize();
    restorePos = getPosition(true);

    super.onHide();

    RootPanel.get().remove(this);
    if (modal) {
      ModalPanel.push(modalPanel);
    }
    if (layer != null) {
      layer.disableShadow();
    }

    if (resizer != null) {
      resizer.release();
    }

    WindowManager.get().unregister(this);
    fireEvent(Events.Close, new WindowEvent(this, button));
  }
View Full Code Here

   * Hides the window.
   *
   * @param buttonPressed the button that was pressed or null
   */
  public void hide(Button buttonPressed) {
    if (hidden || !fireEvent(Events.BeforeHide, new WindowEvent(this, buttonPressed))) {
      return;
    }
    hidden = true;

    restoreSize = getSize();
    restorePos = getPosition(true);

    super.onHide();

    if (eventPreview != null) {
      eventPreview.remove();
    }

    RootPanel.get().remove(this);
    if (modal) {
      ModalPanel.push(modalPanel);
    }
    fireEvent(Events.Hide, new WindowEvent(this, buttonPressed));
  }
View Full Code Here

TOP

Related Classes of com.extjs.gxt.ui.client.event.WindowEvent

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.