Package java.awt

Examples of java.awt.Window.pack()


     * This default implementation packs the window, if any, owner of this panel
     */
    protected void updateLayout() {
        Window w = SwingUtilities.getWindowAncestor(tfpreview);
        if (w != null) {
            w.pack();
        }
    }

    /**
     * @return Returns the currentFont.
View Full Code Here


            invalidate();
            Container p = getParent();
            while (p != null) {
                if (p instanceof Window) {
                    Window w = (Window) p;
                    w.pack();
                    break;
                }
                p = p.getParent();
            }
        }
View Full Code Here

            jButtonDetails.setText(textHideDetails);
            jScrollPaneAreaLog.setVisible(true);
            d.height += 180;
        }
        w.setPreferredSize(d);
        w.pack();
    }//GEN-LAST:event_jButtonDetailsActionPerformed
   
    private void jButtonGenerateActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonGenerateActionPerformed
        try {
            Cursor hourglassCursor = new Cursor(Cursor.WAIT_CURSOR);
View Full Code Here

            Window window = SwingUtilities.getWindowAncestor(menu);
            if (window != null) {
                if (window instanceof ProcessDashboard)
                    ((ProcessDashboard)window).windowSizeRequirementsChanged();
                else
                    window.pack();
            }
        }

        if (selectedItem != null)
            selectedItem.setFont(plainFont);
View Full Code Here

    Window parent = SwingUtilities.getWindowAncestor(comp);
    LOGGER.debug("Changing look and feel to " + laf);
    try {
      UIManager.setLookAndFeel(laf);
      SwingUtilities.updateComponentTreeUI(parent);
      parent.pack();
      PropertiesManager.setProperty("laf", LookAndFeels.getName(laf));
    } catch (UnsupportedLookAndFeelException e1) {
      LOGGER.exception("Error setting look and feel", e1);
    }
View Full Code Here

      finally {
        Thread.currentThread().setContextClassLoader(contextClassLoader);
      }
    }
    f.setMinimumSize(new Dimension(640,240));
    f.pack();

  }

  public boolean isEnabled() {
    return enabled ;
View Full Code Here

//    }
//    GUIUtil.setDeepFont( panelLispGUI, fnt );
    AbstractWindowHandler.setDeepFont( panelLispGUI );
//    GUIUtil.makeCompactSpringGrid( panelLispGUI, numGadgets >> 1, 2, 4, 2, 4, 2 );  // #row #col initx inity padx pady
    ancestor = (Window) SwingUtilities.getAncestorOfClass( Window.class, this );
    if( ancestor != null ) ancestor.pack();
  }

  /**
   *  Subclasses should call this before
   *  they start to process. This will return
View Full Code Here

          view  = producer.getSettingsView( null );    // XXX shouldn't be null
//          GUIUtil.setDeepFont( view, fnt );
          AbstractWindowHandler.setDeepFont( view );
          pane.setViewportView( view );
          ancestor = (Window) SwingUtilities.getAncestorOfClass( Window.class, this );
          if( ancestor != null ) ancestor.pack();
        }
        catch( InstantiationException e1 ) {
          GUIUtil.displayError( this, e1, app.getResourceString( "errInitPlugIn" ));
        }
        catch( IllegalAccessException e2 ) {
View Full Code Here

        ggTransformX.setEnabled( b );
      }
      if( funcGUIX.isVisible() != b ) {
        funcGUIX.setVisible( b );
        ancestor = (Window) SwingUtilities.getAncestorOfClass( Window.class, this );
        if( ancestor != null ) ancestor.pack();
      }
    } else if( key.equals( KEY_APPLYY )) {
      b = value != null ? new Boolean( value ).booleanValue() : false;
      if( ggTransformY.isEnabled() != b ) {
        ggTransformY.setEnabled( b );
View Full Code Here

        ggTransformY.setEnabled( b );
      }
      if( funcGUIY.isVisible() != b ) {
        funcGUIY.setVisible( b );
        ancestor = (Window) SwingUtilities.getAncestorOfClass( Window.class, this );
        if( ancestor != null ) ancestor.pack();
      }

    } else if( key.equals( KEY_MODE )) {
      for( int i = 0; i < modes.length; i++ ) {
        if( modes[i].getKey().equals( value )) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.