Package net.sourceforge.squirrel_sql.fw.gui

Examples of net.sourceforge.squirrel_sql.fw.gui.CascadeInternalFramePositioner


  public void actionPerformed(ActionEvent evt)
  {
    if (_desktop != null && _app.getDesktopStyle().isInternalFrameStyle())
    {
      Dimension cs = null; // Size to set child windows to.
      CascadeInternalFramePositioner pos =
        new CascadeInternalFramePositioner();
      IWidget[] widgets =
        WidgetUtils.getOpenNonToolWindows(_desktop.getAllWidgets());
      for (int i = widgets.length - 1; i >= 0; --i)
      {
        JInternalFrame child = widgets[i].getInternalFrame();

        if (cs == null && child.getParent() != null)
        {
          cs = child.getParent().getSize();
          // Cast to int required as Dimension::setSize(double,double)
          // doesn't appear to do anything in JDK1.2.2.
          cs.setSize(
            (int) (cs.width * 0.8d),
            (int) (cs.height * 0.8d));
        }
        if (cs != null)
        {
          child.setSize(cs);
          pos.positionInternalFrame(child);
        }
      }
    }
  }
View Full Code Here

TOP

Related Classes of net.sourceforge.squirrel_sql.fw.gui.CascadeInternalFramePositioner

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.