35 |
obligated to do so. If you do not wish to do so, delete this |
obligated to do so. If you do not wish to do so, delete this |
36 |
exception statement from your version. */ |
exception statement from your version. */ |
37 |
|
|
|
package javax.swing; |
|
38 |
|
|
39 |
import java.awt.*; |
package javax.swing; |
40 |
|
|
41 |
|
import java.awt.Component; |
42 |
|
import java.awt.Container; |
43 |
|
import java.awt.EventQueue; |
44 |
|
import java.awt.Font; |
45 |
|
import java.awt.FontMetrics; |
46 |
|
import java.awt.Graphics; |
47 |
|
import java.awt.Insets; |
48 |
|
import java.awt.Point; |
49 |
|
import java.awt.Rectangle; |
50 |
|
import java.awt.Toolkit; |
51 |
|
import java.awt.Window; |
52 |
|
import java.awt.event.KeyEvent; |
53 |
|
import java.awt.event.MouseEvent; |
54 |
|
import java.lang.reflect.InvocationTargetException; |
55 |
|
import javax.accessibility.Accessible; |
56 |
|
import javax.accessibility.AccessibleStateSet; |
57 |
|
|
58 |
public class SwingUtilities |
public class SwingUtilities implements SwingConstants |
59 |
|
{ |
60 |
|
public static FontMetrics getFontMetrics (Font font) |
61 |
{ |
{ |
|
|
|
|
public static FontMetrics getFontMetrics ( Font font ) { |
|
62 |
return Toolkit.getDefaultToolkit().getFontMetrics(font); |
return Toolkit.getDefaultToolkit().getFontMetrics(font); |
63 |
} |
} |
64 |
|
|
65 |
|
public static JRootPane getRootPane (Component a) |
|
static JRootPane getRootPane(Component a) |
|
66 |
{ |
{ |
67 |
if (a instanceof JRootPane) |
if (a instanceof JRootPane) |
68 |
return (JRootPane) a; |
return (JRootPane) a; |
77 |
return null; |
return null; |
78 |
} |
} |
79 |
|
|
80 |
static void updateComponentTreeUI(JFrame comp) |
public static void updateComponentTreeUI(JFrame comp) |
81 |
{ |
{ |
82 |
} |
} |
83 |
|
|
84 |
static public String layoutCompoundLabel(JComponent c, |
public static String layoutCompoundLabel(JComponent c, |
85 |
FontMetrics fm, |
FontMetrics fm, |
86 |
String text, |
String text, |
87 |
Icon i, |
Icon i, |