/[classpath]/classpath/javax/swing/DefaultDesktopManager.java
ViewVC logotype

Diff of /classpath/javax/swing/DefaultDesktopManager.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.4 by mark, Sat Jun 26 16:06:48 2004 UTC revision 1.5 by mark, Thu Jul 22 19:45:39 2004 UTC
# Line 436  public class DefaultDesktopManager imple Line 436  public class DefaultDesktopManager imple
436                            int newWidth, int newHeight)                            int newWidth, int newHeight)
437    {    {
438      dragCache.setBounds(newX, newY, newWidth, newHeight);      dragCache.setBounds(newX, newY, newWidth, newHeight);
     dragCache = findMinimum(dragCache, component);  
439    
440      if (currentDragMode == JDesktopPane.OUTLINE_DRAG_MODE)      if (currentDragMode == JDesktopPane.OUTLINE_DRAG_MODE)
441        {        {
# Line 628  public class DefaultDesktopManager imple Line 627  public class DefaultDesktopManager imple
627    {    {
628      return frame.getWasIcon();      return frame.getWasIcon();
629    } // wasIcon()    } // wasIcon()
   
   /**  
    * This is a helper method that determines the minimum size a  
    * JInternalFrame can be resized to.  
    *  
    * @param r The desired size.  
    * @param c The JComponent to find a minimum size for.  
    *  
    * @return The minimum size a JInternalFrame can be resized to.  
    */  
   private Rectangle findMinimum(Rectangle r, JComponent c)  
   {  
     if (r != null && c != null)  
       {  
         Dimension d = c.getPreferredSize();  
         if (d != null)  
           {  
             r.width = Math.max(d.width, r.width);  
             r.height = Math.max(d.height, r.height);  
           }  
       }  
     return r;  
   }  
630  } // DefaultDesktopManager  } // DefaultDesktopManager

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26