Commit d440f642 by Tom Tromey Committed by Tom Tromey

* java/awt/Container.java: Typo and indentation fixes.

From-SVN: r76004
parent b54a2715
2004-01-16 Tom Tromey <tromey@redhat.com> 2004-01-16 Tom Tromey <tromey@redhat.com>
* java/awt/Container.java: Typo and indentation fixes.
* java/lang/natClassLoader.cc: Moved VMClassLoader methods... * java/lang/natClassLoader.cc: Moved VMClassLoader methods...
* java/lang/natVMClassLoader.cc: ...here. New file. * java/lang/natVMClassLoader.cc: ...here. New file.
* Makefile.in: Rebuilt. * Makefile.in: Rebuilt.
......
/* Container.java -- parent container class in AWT /* Container.java -- parent container class in AWT
Copyright (C) 1999, 2000, 2002, 2003 Free Software Foundation Copyright (C) 1999, 2000, 2002, 2003, 2004 Free Software Foundation
This file is part of GNU Classpath. This file is part of GNU Classpath.
...@@ -1516,7 +1516,7 @@ public class Container extends Component ...@@ -1516,7 +1516,7 @@ public class Container extends Component
(ACCESSIBLE_CHILD_PROPERTY, e.getChild(), null); (ACCESSIBLE_CHILD_PROPERTY, e.getChild(), null);
} }
} // class AccessibleContainerHandler } // class AccessibleContainerHandler
} // class AccessibleAWTPanel } // class AccessibleAWTContainer
} // class Container } // class Container
/** /**
...@@ -1562,26 +1562,26 @@ class LightweightDispatcher implements Serializable ...@@ -1562,26 +1562,26 @@ class LightweightDispatcher implements Serializable
Component candidate = mouseEventTarget; Component candidate = mouseEventTarget;
boolean candidate_is_container_with_children = boolean candidate_is_container_with_children =
((candidate != null) ((candidate != null)
&& (candidate instanceof Container) && (candidate instanceof Container)
&& (((Container)candidate).getComponentCount () > 0)); && (((Container)candidate).getComponentCount () > 0));
boolean candidate_does_not_contain_point = boolean candidate_does_not_contain_point =
((candidate != null) ((candidate != null)
&& (! candidate.contains (x - candidate.getX (), && (! candidate.contains (x - candidate.getX (),
y - candidate.getY ()))); y - candidate.getY ())));
if (candidate == null if (candidate == null
|| candidate_is_container_with_children || candidate_is_container_with_children
|| candidate_does_not_contain_point) || candidate_does_not_contain_point)
{ {
// Try to reacquire. // Try to reacquire.
candidate = nativeContainer.findComponentAt (x, y); candidate = nativeContainer.findComponentAt (x, y);
} }
if (mouseEventTarget != null if (mouseEventTarget != null
&& mouseEventTarget != candidate) && mouseEventTarget != candidate)
{ {
int nx = x - mouseEventTarget.getX (); int nx = x - mouseEventTarget.getX ();
int ny = y - mouseEventTarget.getY (); int ny = y - mouseEventTarget.getY ();
MouseEvent exited = new MouseEvent (mouseEventTarget, MouseEvent exited = new MouseEvent (mouseEventTarget,
...@@ -1594,15 +1594,15 @@ class LightweightDispatcher implements Serializable ...@@ -1594,15 +1594,15 @@ class LightweightDispatcher implements Serializable
me.getButton ()); me.getButton ());
mouseEventTarget.dispatchEvent (exited); mouseEventTarget.dispatchEvent (exited);
mouseEventTarget = null; mouseEventTarget = null;
} }
if (candidate != null) if (candidate != null)
{ {
// Possibly set new state. // Possibly set new state.
if (candidate.isLightweight() if (candidate.isLightweight()
&& candidate != nativeContainer && candidate != nativeContainer
&& candidate != mouseEventTarget) && candidate != mouseEventTarget)
{ {
mouseEventTarget = candidate; mouseEventTarget = candidate;
...@@ -1620,16 +1620,16 @@ class LightweightDispatcher implements Serializable ...@@ -1620,16 +1620,16 @@ class LightweightDispatcher implements Serializable
me.getButton ()); me.getButton ());
mouseEventTarget.dispatchEvent (entered); mouseEventTarget.dispatchEvent (entered);
} }
} }
} }
boolean handleEvent (AWTEvent e) boolean handleEvent (AWTEvent e)
{ {
if ((eventMask & e.getID ()) == 0) if ((eventMask & e.getID ()) == 0)
return false; return false;
if (e instanceof MouseEvent) if (e instanceof MouseEvent)
{ {
MouseEvent me = (MouseEvent) e; MouseEvent me = (MouseEvent) e;
acquireComponentForMouseEvent (me); acquireComponentForMouseEvent (me);
...@@ -1640,11 +1640,11 @@ class LightweightDispatcher implements Serializable ...@@ -1640,11 +1640,11 @@ class LightweightDispatcher implements Serializable
mouseEventTarget.dispatchEvent (me); mouseEventTarget.dispatchEvent (me);
me.setSource (oldSource); me.setSource (oldSource);
} }
} }
else if (e instanceof KeyEvent && focus != null) else if (e instanceof KeyEvent && focus != null)
{ {
focus.processKeyEvent ((KeyEvent) e); focus.processKeyEvent ((KeyEvent) e);
} }
return e.isConsumed(); return e.isConsumed();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment