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;
    }

    if (dragger != null) {
      dragger.cancelDrag();
    }

    hidden = true;

    if (!maximized) {
      restoreSize = getSize();
      restorePos = getPosition(true);
    }

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

    eventPreview.remove();
    notifyHide();
    fireEvent(Events.Hide, new WindowEvent(this, buttonPressed));
  }
View Full Code Here


      }
      if (resizable) {
        resizer.setEnabled(false);
      }

      fireEvent(Events.Maximize, new WindowEvent(this));
    } else {
      fitContainer();
    }
  }
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

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

        layer.sync(true);
      }
      if (isVisible()) {
        eventPreview.push();
      }
      fireEvent(Events.Activate, new WindowEvent(this));
    } else {
      hideShadow();
      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 (!hidden || !fireEvent(Events.BeforeShow, new WindowEvent(this))) {
      return;
    }
    // remove hide style, else layout fails
    removeStyleName(getHideMode().value());
    RootPanel.get().add(this);
View Full Code Here

    if (GXT.isAriaEnabled()) {
      Accessibility.setState(getElement(), "aria-hidden", "false");
    }

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

    toFront();
  }

  @Override
  protected ComponentEvent createComponentEvent(Event event) {
    return new WindowEvent(this, event);
  }
View Full Code Here

        return false;
      }

      @Override
      protected void onPreviewKeyPress(PreviewEvent pe) {
        WindowEvent we = new WindowEvent(Window.this, pe.getEvent());
        onKeyPress(we);
      }

    };
    eventPreview.getIgnoreList().add(getElement());
View Full Code Here

        }

        @Override
        protected ComponentEvent previewEvent(EventType type, ComponentEvent ce) {
          if (ce instanceof WindowEvent) {
            WindowEvent we = (WindowEvent) ce;
            MessageBoxEvent e = new MessageBoxEvent(MessageBox.this, this, we.getButtonClicked());
            if (type == Events.Hide || type == Events.BeforeHide) {
              if (textBox != null) {
                e.setValue(textBox.getValue());
              } else if (textArea != null) {
                e.setValue(textArea.getValue());
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.