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

Diff of /classpath/java/awt/Container.java

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

revision 1.38 by mark, Sun Aug 8 13:01:35 2004 UTC revision 1.39 by mark, Sat Sep 4 17:14:00 2004 UTC
# Line 1505  public class Container extends Component Line 1505  public class Container extends Component
1505    void dispatchEventImpl(AWTEvent e)    void dispatchEventImpl(AWTEvent e)
1506    {    {
1507      // Give lightweight dispatcher a chance to handle it.      // Give lightweight dispatcher a chance to handle it.
1508      if (dispatcher != null      if (eventTypeEnabled (e.id)
1509            && dispatcher != null
1510          && dispatcher.handleEvent (e))          && dispatcher.handleEvent (e))
1511        return;        return;
1512    
# Line 1586  public class Container extends Component Line 1587  public class Container extends Component
1587                    {                    {
1588                      if (dispatcher == null)                      if (dispatcher == null)
1589                        dispatcher = new LightweightDispatcher (this);                        dispatcher = new LightweightDispatcher (this);
                     dispatcher.enableEvents (component[i].eventMask);  
1590                    }                        }    
1591                        
1592    
# Line 1831  class LightweightDispatcher implements S Line 1831  class LightweightDispatcher implements S
1831  {  {
1832    private static final long serialVersionUID = 5184291520170872969L;    private static final long serialVersionUID = 5184291520170872969L;
1833    private Container nativeContainer;    private Container nativeContainer;
   private Component focus;  
1834    private Cursor nativeCursor;    private Cursor nativeCursor;
1835    private long eventMask;    private long eventMask;
1836        
# Line 1845  class LightweightDispatcher implements S Line 1844  class LightweightDispatcher implements S
1844      nativeContainer = c;      nativeContainer = c;
1845    }    }
1846    
   void enableEvents(long l)  
   {  
     eventMask |= l;  
   }  
   
1847    void acquireComponentForMouseEvent(MouseEvent me)    void acquireComponentForMouseEvent(MouseEvent me)
1848    {    {
1849      int x = me.getX ();      int x = me.getX ();
# Line 1949  class LightweightDispatcher implements S Line 1943  class LightweightDispatcher implements S
1943    
1944    boolean handleEvent(AWTEvent e)    boolean handleEvent(AWTEvent e)
1945    {    {
     if ((eventMask & e.getID()) == 0)  
       return false;  
   
1946      if (e instanceof MouseEvent)      if (e instanceof MouseEvent)
1947        {        {
1948          MouseEvent me = (MouseEvent) e;          MouseEvent me = (MouseEvent) e;
# Line 1989  class LightweightDispatcher implements S Line 1980  class LightweightDispatcher implements S
1980                  e.consume();                  e.consume();
1981            }            }
1982        }        }
     else if (e instanceof KeyEvent && focus != null)  
       {  
         focus.processKeyEvent((KeyEvent) e);  
       }  
1983            
1984      return e.isConsumed();      return e.isConsumed();
1985    }    }

Legend:
Removed from v.1.38  
changed lines
  Added in v.1.39

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