/[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.37 by mark, Sat Jul 31 16:39:15 2004 UTC revision 1.38 by mark, Sun Aug 8 13:01:35 2004 UTC
# Line 1882  class LightweightDispatcher implements S Line 1882  class LightweightDispatcher implements S
1882          && lastComponentEntered.isShowing()          && lastComponentEntered.isShowing()
1883          && lastComponentEntered != candidate)          && lastComponentEntered != candidate)
1884        {        {
1885          Point tp =          // Old candidate could have been removed from
1886            SwingUtilities.convertPoint(nativeContainer,          // the nativeContainer so we check first.
1887                                        x, y, lastComponentEntered);          if (SwingUtilities.isDescendingFrom(lastComponentEntered, nativeContainer))
1888          MouseEvent exited = new MouseEvent (lastComponentEntered,          {
1889                                              MouseEvent.MOUSE_EXITED,            Point tp =
1890                                              me.getWhen (),              SwingUtilities.convertPoint(nativeContainer,
1891                                              me.getModifiersEx (),                                          x, y, lastComponentEntered);
1892                                              tp.x, tp.y,            MouseEvent exited = new MouseEvent (lastComponentEntered,
1893                                              me.getClickCount (),                                                MouseEvent.MOUSE_EXITED,
1894                                              me.isPopupTrigger (),                                                me.getWhen (),
1895                                              me.getButton ());                                                me.getModifiersEx (),
1896          lastComponentEntered.dispatchEvent (exited);                                                tp.x, tp.y,
1897                                                  me.getClickCount (),
1898                                                  me.isPopupTrigger (),
1899                                                  me.getButton ());
1900              lastComponentEntered.dispatchEvent (exited);
1901            }
1902          lastComponentEntered = null;          lastComponentEntered = null;
1903        }        }
   
1904      // If we have a candidate, maybe enter it.      // If we have a candidate, maybe enter it.
1905      if (candidate != null)      if (candidate != null)
1906        {        {
# Line 1930  class LightweightDispatcher implements S Line 1934  class LightweightDispatcher implements S
1934        //   - MOUSE_RELEASED        //   - MOUSE_RELEASED
1935        //   - MOUSE_PRESSED: another button pressed while the first is held down        //   - MOUSE_PRESSED: another button pressed while the first is held down
1936        //   - MOUSE_DRAGGED        //   - MOUSE_DRAGGED
1937        mouseEventTarget = pressedComponent;        if (SwingUtilities.isDescendingFrom(pressedComponent, nativeContainer))
1938            mouseEventTarget = pressedComponent;
1939      else if (me.getID() == MouseEvent.MOUSE_CLICKED)      else if (me.getID() == MouseEvent.MOUSE_CLICKED)
1940        {        {
1941          // Don't dispatch CLICKED events whose target is not the same as the          // Don't dispatch CLICKED events whose target is not the same as the
# Line 1980  class LightweightDispatcher implements S Line 1985  class LightweightDispatcher implements S
1985                      pressedComponent = null;                      pressedComponent = null;
1986                    break;                    break;
1987                }                }
1988                  if (newEvt.isConsumed())
1989                    e.consume();
1990            }            }
1991        }        }
1992      else if (e instanceof KeyEvent && focus != null)      else if (e instanceof KeyEvent && focus != null)

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

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