449 |
* @return A component containing <code>(x,y)</code>, or |
* @return A component containing <code>(x,y)</code>, or |
450 |
* <code>null</code> |
* <code>null</code> |
451 |
* |
* |
452 |
* @see java.awt.Container#findComponentAt |
* @see java.awt.Container#findComponentAt(int, int) |
453 |
*/ |
*/ |
454 |
public static Component getDeepestComponentAt(Component parent, int x, int y) |
public static Component getDeepestComponentAt(Component parent, int x, int y) |
455 |
{ |
{ |
473 |
* @param p The point to convert |
* @param p The point to convert |
474 |
* @param c The component which the point is expressed in terms of |
* @param c The component which the point is expressed in terms of |
475 |
* |
* |
476 |
* @see convertPointFromScreen |
* @see #convertPointFromScreen |
477 |
*/ |
*/ |
478 |
public static void convertPointToScreen(Point p, Component c) |
public static void convertPointToScreen(Point p, Component c) |
479 |
{ |
{ |
568 |
* |
* |
569 |
* @see #convertPointToScreen |
* @see #convertPointToScreen |
570 |
* @see #convertPointFromScreen |
* @see #convertPointFromScreen |
571 |
* @see #convertPoint |
* @see #convertPoint(Component, int, int, Component) |
572 |
* @see #getRoot |
* @see #getRoot |
573 |
*/ |
*/ |
574 |
public static Rectangle convertRectangle(Component source, |
public static Rectangle convertRectangle(Component source, |
596 |
* component's coordinate space, and with the destination component as |
* component's coordinate space, and with the destination component as |
597 |
* its source |
* its source |
598 |
* |
* |
599 |
* @see #convertPoint |
* @see #convertPoint(Component, int, int, Component) |
600 |
*/ |
*/ |
601 |
public static MouseEvent convertMouseEvent(Component source, |
public static MouseEvent convertMouseEvent(Component source, |
602 |
MouseEvent sourceEvent, |
MouseEvent sourceEvent, |
938 |
} |
} |
939 |
|
|
940 |
/** |
/** |
941 |
* Calls {@link java.awt.EventQueue.invokeLater} with the |
* Calls {@link java.awt.EventQueue#invokeLater} with the |
942 |
* specified {@link Runnable}. |
* specified {@link Runnable}. |
943 |
*/ |
*/ |
944 |
public static void invokeLater(Runnable doRun) |
public static void invokeLater(Runnable doRun) |
947 |
} |
} |
948 |
|
|
949 |
/** |
/** |
950 |
* Calls {@link java.awt.EventQueue.invokeAndWait} with the |
* Calls {@link java.awt.EventQueue#invokeAndWait} with the |
951 |
* specified {@link Runnable}. |
* specified {@link Runnable}. |
952 |
*/ |
*/ |
953 |
public static void invokeAndWait(Runnable doRun) |
public static void invokeAndWait(Runnable doRun) |
958 |
} |
} |
959 |
|
|
960 |
/** |
/** |
961 |
* Calls {@link java.awt.EventQueue.isEventDispatchThread}. |
* Calls {@link java.awt.EventQueue#isDispatchThread()}. |
962 |
|
* |
963 |
|
* @return <code>true</code> if the current thread is the current AWT event |
964 |
|
* dispatch thread. |
965 |
*/ |
*/ |
966 |
public static boolean isEventDispatchThread() |
public static boolean isEventDispatchThread() |
967 |
{ |
{ |
1265 |
* Calculates the intersection of two rectangles. |
* Calculates the intersection of two rectangles. |
1266 |
* |
* |
1267 |
* @param x upper-left x coodinate of first rectangle |
* @param x upper-left x coodinate of first rectangle |
1268 |
* @param x upper-left y coodinate of first rectangle |
* @param y upper-left y coodinate of first rectangle |
1269 |
* @param w width of first rectangle |
* @param w width of first rectangle |
1270 |
* @param h height of first rectangle |
* @param h height of first rectangle |
1271 |
* @param rect a Rectangle object of the second rectangle |
* @param rect a Rectangle object of the second rectangle |
1272 |
* @throws a NullPointerException if rect is null. |
* @throws NullPointerException if rect is null. |
1273 |
* |
* |
1274 |
* @return a rectangle corresponding to the intersection of the |
* @return a rectangle corresponding to the intersection of the |
1275 |
* two rectangles. A zero rectangle is returned if the rectangles |
* two rectangles. A zero rectangle is returned if the rectangles |
1311 |
* Calculates the union of two rectangles. |
* Calculates the union of two rectangles. |
1312 |
* |
* |
1313 |
* @param x upper-left x coodinate of first rectangle |
* @param x upper-left x coodinate of first rectangle |
1314 |
* @param x upper-left y coodinate of first rectangle |
* @param y upper-left y coodinate of first rectangle |
1315 |
* @param w width of first rectangle |
* @param w width of first rectangle |
1316 |
* @param h height of first rectangle |
* @param h height of first rectangle |
1317 |
* @param rect a Rectangle object of the second rectangle |
* @param rect a Rectangle object of the second rectangle |
1318 |
* @throws a NullPointerException if rect is null. |
* @throws NullPointerException if rect is null. |
1319 |
* |
* |
1320 |
* @return a rectangle corresponding to the union of the |
* @return a rectangle corresponding to the union of the |
1321 |
* two rectangles. A rectangle encompassing both is returned if the |
* two rectangles. A rectangle encompassing both is returned if the |
1364 |
* maps should be returned, may be |
* maps should be returned, may be |
1365 |
* {@link JComponent#WHEN_IN_FOCUSED_WINDOW}, |
* {@link JComponent#WHEN_IN_FOCUSED_WINDOW}, |
1366 |
* {@link JComponent#WHEN_FOCUSED} or |
* {@link JComponent#WHEN_FOCUSED} or |
1367 |
* {@link JComponent#WHEN_ANCESTOR_OF_FOCUSED_COMPONENT |
* {@link JComponent#WHEN_ANCESTOR_OF_FOCUSED_COMPONENT} |
1368 |
* |
* |
1369 |
* @return |
* @return The input map. |
1370 |
*/ |
*/ |
1371 |
public static InputMap getUIInputMap(JComponent component, int cond) |
public static InputMap getUIInputMap(JComponent component, int cond) |
1372 |
{ |
{ |