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

    if (modalPreview != null) {
      modalPreview.removeHandler();
      modalPreview = null;
    }

    onHide();
    manager.unregister(this);
    if (removeFromParentOnHide) {
      removeFromParent();
    }

    if (modalPanel != null) {
      ModalPanel.push(modalPanel);
      modalPanel = null;
    }

    eventPreview.remove();
    notifyHide();

    if (restoreWindowScrolling != null) {
      com.google.gwt.dom.client.Document.get().enableScrolling(restoreWindowScrolling.booleanValue());
    }

    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 (container == null && restoreWindowScrolling != null) {
        com.google.gwt.dom.client.Document.get().enableScrolling(restoreWindowScrolling.booleanValue());
        restoreWindowScrolling = null;
      }
      maximized = false;
      fireEvent(Events.Restore, new WindowEvent(this));
    }
  }
View Full Code Here

          modalPanel.setBlink(blinkModal);
          modalPanel.show(this);
        }
      }

      fireEvent(Events.Activate, new WindowEvent(this));
    } else {
      if (modalPanel != null) {
        ModalPanel.push(modalPanel);
        modalPanel = null;
      }
      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());
    addStyleName(HideMode.VISIBILITY.value());
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());
            e.setEvent(ce.getEvent());
            if (type == Events.Hide || type == Events.BeforeHide) {
              if (textBox != null) {
                e.setValue(textBox.getValue());
              } else if (textArea != null) {
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.