2007-12-05 Thomas Fitzsimmons <fitzsim@redhat.com>
* gnu/java/awt/peer/gtk/GdkGraphicsEnvironment.java, native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphicsEnvironment.c (isWindowUnderMouse): New method. * include/gnu_java_awt_peer_gtk_GdkGraphicsEnvironment.h: Regenerate. * gnu/java/awt/peer/gtk/GtkComponentPeer.java (getLocationOnScreen): Move WindowPeer section to... * gnu/java/awt/peer/gtk/GtkWindowPeer.java (getLocationOnScreen): New method. * gnu/java/awt/peer/gtk/GtkMouseInfoPeer.java (isWindowUnderMouse): Implement. * java/awt/Component.java (getMousePosition): New method. (getMousePositionHelper): Likewise. (mouseOverComponent): Likewise. * java/awt/Container.java (getMousePosition): New method. (mouseOverComponent): Likewise. * classpath/lib/java/awt/Component.class, classpath/lib/java/awt/Component$BltBufferStrategy.class, classpath/lib/java/awt/Container$GfxPaintAllVisitor.class, classpath/lib/java/awt/Component$AccessibleAWTComponent $AccessibleAWTFocusHandler.class, classpath/lib/java/awt/Component$FlipBufferStrategy.class, classpath/lib/java/awt/Container$GfxVisitor.class, classpath/lib/java/awt/Component$AccessibleAWTComponent $AccessibleAWTComponentHandler.class, classpath/lib/java/awt/Container$AccessibleAWTContainer $AccessibleContainerHandler.class, classpath/lib/java/awt/Container.class, classpath/lib/java/awt/Container$AccessibleAWTContainer.class, classpath/lib/java/awt/Container$GfxPrintAllVisitor.class, classpath/lib/java/awt/Component$AccessibleAWTComponent.class, classpath/lib/java/awt/Container$GfxPaintVisitor.class, classpath/lib/java/awt/Container$GfxPrintVisitor.class, classpath/lib/java/awt/Component$HeavyweightInLightweightListener.class, classpath/lib/gnu/java/awt/peer/gtk/GtkComponentPeer.class, classpath/lib/gnu/java/awt/peer/gtk/GdkGraphicsEnvironment.class, classpath/lib/gnu/java/awt/peer/gtk/GtkMouseInfoPeer.class, classpath/lib/gnu/java/awt/peer/gtk/GtkWindowPeer.class, classpath/lib/gnu/java/awt/peer/gtk/GtkComponentPeer $RepaintTimerTask.class: Regenerate. 2007-12-05 Thomas Fitzsimmons <fitzsim@redhat.com> * gnu/java/awt/peer/gtk/GdkGraphicsEnvironment.h: Regenerate. * gnu/java/awt/peer/gtk/GtkWindowPeer.h: Likewise. * java/awt/Component.h: Likewise. * java/awt/Container.h: Likewise. From-SVN: r130627
This commit is contained in:
parent
0ec479dcfb
commit
3898fe8e7c
34 changed files with 196 additions and 19 deletions
|
@ -1097,6 +1097,33 @@ public class Container extends Component
|
|||
return locate (x, y);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the mouse pointer position relative to this Container's
|
||||
* top-left corner. If allowChildren is false, the mouse pointer
|
||||
* must be directly over this container. If allowChildren is true,
|
||||
* the mouse pointer may be over this container or any of its
|
||||
* descendents.
|
||||
*
|
||||
* @param allowChildren true to allow descendents, false if pointer
|
||||
* must be directly over Container.
|
||||
*
|
||||
* @return relative mouse pointer position
|
||||
*
|
||||
* @throws HeadlessException if in a headless environment
|
||||
*/
|
||||
public Point getMousePosition(boolean allowChildren) throws HeadlessException
|
||||
{
|
||||
return super.getMousePositionHelper(allowChildren);
|
||||
}
|
||||
|
||||
boolean mouseOverComponent(Component component, boolean allowChildren)
|
||||
{
|
||||
if (allowChildren)
|
||||
return isAncestorOf(component);
|
||||
else
|
||||
return component == this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the component located at the specified point. This is done
|
||||
* by checking whether or not a child component claims to contain this
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue