[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[cp-patches] FYI: added methods to javax.swing.SwingUtilities
From: |
Roman Kennke |
Subject: |
[cp-patches] FYI: added methods to javax.swing.SwingUtilities |
Date: |
Wed, 18 May 2005 10:29:42 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20021204 |
I added 2 methods to javax.swing.SwingUtilities:
2005-05-18 Roman Kennke <address@hidden>
* javax/swing/SwingUtilities
(getUIInputMap): Added method.
(getUIActionMap): Added method.
/Roman
Index: javax/swing/SwingUtilities.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/SwingUtilities.java,v
retrieving revision 1.23
diff -u -r1.23 SwingUtilities.java
--- javax/swing/SwingUtilities.java 12 Feb 2005 14:26:02 -0000 1.23
+++ javax/swing/SwingUtilities.java 18 May 2005 08:27:47 -0000
@@ -1319,4 +1319,33 @@
&& b.x >= a.x && b.x + b.width <= a.x + a.width && b.y >= a.y
&& b.y + b.height <= a.y + a.height;
}
+
+ /**
+ * Returns the InputMap that is provided by the ComponentUI of
+ * <code>component</code> for the specified condition.
+ *
+ * @param component the component for which the InputMap is returned
+ * @param cond the condition that specifies which of the three input
+ * maps should be returned, may be
+ * address@hidden JComponent#WHEN_IN_FOCUSED_WINDOW},
+ * address@hidden JComponent#WHEN_FOCUSED} or
+ * address@hidden JComponent#WHEN_ANCESTOR_OF_FOCUSED_COMPONENT
+ *
+ * @return
+ */
+ public static InputMap getUIInputMap(JComponent component, int cond)
+ {
+ return component.getInputMap(cond);
+ }
+
+ /**
+ * Returns the ActionMap that is provided by the ComponentUI of
+ * <code>component</code>.
+ *
+ * @param component the component for which the ActionMap is returned
+ */
+ public static InputMap getUIActionMap(JComponent component)
+ {
+ return component.getInputMap();
+ }
}
- [cp-patches] FYI: added methods to javax.swing.SwingUtilities,
Roman Kennke <=