Package java.awt

Examples of java.awt.Window


   * @param e       the exception.
   */
  public static void showExceptionDialog
      (final Component parent, final String title, final String message, final Exception e)
  {
    final Window window = SwingUtil.getWindowAncestor(parent);
    ExceptionDialog defaultDialog;
    if (window instanceof Frame)
    {
      defaultDialog = new ExceptionDialog((Frame) window);
    }
View Full Code Here


  private static NumericInputDialog createDialog(final Component parent)
  {
    if (parent != null)
    {
      final Window window = SwingUtil.getWindowAncestor(parent);
      if (window instanceof Dialog)
      {
        return new NumericInputDialog((Dialog) window, true);
      }
      if (window instanceof Frame)
View Full Code Here

    }
    if (toolBar.getParent() != toolbarHolder)
    {
      // ha!, we detected that the toolbar is floating ...
      // Log.debug (currentToolbar.getParent());
      final Window w = SwingUtilities.windowForComponent(toolBar);
      if (w != null)
      {
        w.setVisible(false);
        w.dispose();
      }
    }
    toolBar.setVisible(false);
  }
View Full Code Here

        //for when the window is actually shown. It then adds a listen to store the location.
        splitter.addHierarchyListener(new HierarchyListener() {
            public void hierarchyChanged(HierarchyEvent e) {
                if (HierarchyEvent.SHOWING_CHANGED == (e.getChangeFlags() & HierarchyEvent.SHOWING_CHANGED)) {
                    splitter.removeHierarchyListener(this); //we only want the first one of these, so remove ourselves as a listener.
                    Window window = SwingUtilities.getWindowAncestor(splitter);
                    if (window != null) {
                        Dimension dimension = window.getSize();
                        int halfHeight = dimension.height / 2; //we'll just make ourselves half the height of the window
                        splitter.setDividerLocation(halfHeight);
                    }
                    PreferencesAssistant.restoreSettings(settings, splitter, SPLITTER_PREFERENCES_ID, SinglePaneUIInstance.class);
View Full Code Here

   *
   * @return the progress dialog.
   */
  protected ReportProgressDialog createProgressDialog()
  {
    final Window proxy = context.getWindow();
    if (proxy instanceof Frame)
    {
      return new ReportProgressDialog((Frame) proxy);
    }
    else if (proxy instanceof Dialog)
View Full Code Here

    if ("true".equals(ClassicEngineBoot.getInstance().getGlobalConfig().getConfigProperty
        ("org.pentaho.reporting.engine.classic.core.modules.gui.print.UseAlternatePageSetupDialog")))
    {
      final PageSetupDialog dialog;
      final Window proxy = getContext().getWindow();
      if (proxy instanceof Frame)
      {
        dialog = new PageSetupDialog(getContext(), (Frame) proxy);
      }
      else if (proxy instanceof Dialog)
View Full Code Here

  {
    if (allowOwnPeer == false)
    {
      return false;
    }
    final Window windowAncestor = ComponentDrawable.getWindowAncestor(component);
    return (windowAncestor != null && windowAncestor != peerSupply);
  }
View Full Code Here

      try
      {
        final Component component = getComponent();
        if (component instanceof Window)
        {
          final Window w = (Window) component;
          w.validate();
        }
        else if (isOwnPeerConnected())
        {
          final Window w = ComponentDrawable.getWindowAncestor(component);
          if (w != null)
          {
            w.validate();
          }
        }
        else
        {
          peerSupply.pack();
View Full Code Here

  {
    // At some point some parts of this should probably be XULified
    final PreviewDialog dialog;
    if (designTimeContext != null)
    {
      final Window window = designTimeContext.getParentWindow();
      if (window instanceof Dialog)
      {
        dialog = new PreviewDialog((Dialog) window);
      }
      else if (window instanceof Frame)
View Full Code Here

      wizardController.registerMainXULContainer(mainWizardContainer);

      final Document documentRoot = mainWizardContainer.getDocumentRoot();
      final XulDialog root = (XulDialog) documentRoot.getRootElement();
      final Window window = (Window) root.getRootObject();
      final DesignTimeContext designTimeContext = new DefaultWizardDesignTimeContext(wizardController.getEditorModel(), window);
      wizardController.setDesignTimeContext(designTimeContext);

      final XulRunner runner = new SwingXulRunner();
      runner.addContainer(mainWizardContainer);
View Full Code Here

TOP

Related Classes of java.awt.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.