summaryrefslogtreecommitdiff
path: root/libjava/classpath/java/awt/Container.java
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/classpath/java/awt/Container.java')
-rw-r--r--libjava/classpath/java/awt/Container.java27
1 files changed, 27 insertions, 0 deletions
diff --git a/libjava/classpath/java/awt/Container.java b/libjava/classpath/java/awt/Container.java
index 83d9f7b78c5..e7622f2e839 100644
--- a/libjava/classpath/java/awt/Container.java
+++ b/libjava/classpath/java/awt/Container.java
@@ -1098,6 +1098,33 @@ public class Container extends Component
}
/**
+ * 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
* point. The first child component that does is returned. If no