/[classpath]/classpath/java/awt/Window.java
ViewVC logotype

Diff of /classpath/java/awt/Window.java

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

revision 1.35.2.9 by gnu_andrew, Tue Aug 2 20:12:15 2005 UTC revision 1.35.2.10 by gnu_andrew, Sat Sep 10 15:31:45 2005 UTC
# Line 155  public class Window extends Container im Line 155  public class Window extends Container im
155              }              }
156          }          }
157        });        });
158        
159        GraphicsEnvironment g = GraphicsEnvironment.getLocalGraphicsEnvironment();
160        graphicsConfiguration = g.getDefaultScreenDevice().getDefaultConfiguration();
161    }    }
162    
163    Window(GraphicsConfiguration gc)    Window(GraphicsConfiguration gc)
# Line 619  public class Window extends Container im Line 622  public class Window extends Container im
622              || windowStateListener != null              || windowStateListener != null
623              || (eventMask & AWTEvent.WINDOW_EVENT_MASK) != 0))              || (eventMask & AWTEvent.WINDOW_EVENT_MASK) != 0))
624        processEvent(e);        processEvent(e);
625        else if (e.id == ComponentEvent.COMPONENT_RESIZED)
626          validate ();
627      else      else
628        super.dispatchEventImpl(e);        super.dispatchEventImpl(e);
629    }    }
# Line 741  public class Window extends Container im Line 746  public class Window extends Container im
746      if (activeWindow == this)      if (activeWindow == this)
747        return manager.getFocusOwner ();        return manager.getFocusOwner ();
748      else      else
749        return windowFocusOwner;        return null;
750      }
751    
752      /**
753       * Returns the child component of this window that would receive
754       * focus if this window were to become focused.  If the window
755       * already has the top-level focus, then this method returns the
756       * same component as getFocusOwner.  If no child component has
757       * requested focus within the window, then the initial focus owner
758       * is returned.  If this is a non-focusable window, this method
759       * returns null.
760       *
761       * @return the child component of this window that most recently had
762       * the focus, or <code>null</code>
763       * @since 1.4
764       */
765      public Component getMostRecentFocusOwner ()
766      {
767        return windowFocusOwner;
768    }    }
769    
770    /**    /**
# Line 1070  public class Window extends Container im Line 1093  public class Window extends Container im
1093      this.focusableWindowState = focusableWindowState;      this.focusableWindowState = focusableWindowState;
1094    }    }
1095    
   // setBoundsCallback is needed so that when a user moves a window,  
   // the Window's location can be updated without calling the peer's  
   // setBounds method.  When a user moves a window the peer window's  
   // location is updated automatically and the windowing system sends  
   // a message back to the application informing it of its updated  
   // dimensions.  We must update the AWT Window class with these new  
   // dimensions.  But we don't want to call the peer's setBounds  
   // method, because the peer's dimensions have already been updated.  
   // (Under X, having this method prevents Configure event loops when  
   // moving windows: Component.setBounds -> peer.setBounds ->  
   // postConfigureEvent -> Component.setBounds -> ...  In some cases  
   // Configure event loops cause windows to jitter back and forth  
   // continuously).  
   void setBoundsCallback (int x, int y, int w, int h)  
   {  
     if (this.x == x && this.y == y && width == w && height == h)  
       return;  
     invalidate();  
     boolean resized = width != w || height != h;  
     boolean moved = this.x != x || this.y != y;  
     this.x = x;  
     this.y = y;  
     width = w;  
     height = h;  
     if (resized && isShowing ())  
       {  
         ComponentEvent ce =  
           new ComponentEvent(this, ComponentEvent.COMPONENT_RESIZED);  
         getToolkit().getSystemEventQueue().postEvent(ce);  
       }  
     if (moved && isShowing ())  
       {  
         ComponentEvent ce =  
           new ComponentEvent(this, ComponentEvent.COMPONENT_MOVED);  
         getToolkit().getSystemEventQueue().postEvent(ce);  
       }  
   }  
   
1096    /**    /**
1097     * Generate a unique name for this window.     * Generate a unique name for this window.
1098     *     *

Legend:
Removed from v.1.35.2.9  
changed lines
  Added in v.1.35.2.10

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