32
33 import java.awt.*;
34 import java.awt.event.*;
35 import java.awt.dnd.DropTarget;
36
37 import java.lang.reflect.*;
38
39 import javax.accessibility.*;
40 import javax.swing.event.MenuDragMouseEvent;
41 import javax.swing.plaf.UIResource;
42 import javax.swing.text.View;
43 import java.security.AccessController;
44 import sun.security.action.GetPropertyAction;
45
46 import sun.awt.AppContext;
47
48 /**
49 * A collection of utility methods for Swing.
50 *
51 * @author unknown
52 */
53 public class SwingUtilities implements SwingConstants
54 {
55 // These states are system-wide, rather than AppContext wide.
56 private static boolean canAccessEventQueue = false;
57 private static boolean eventQueueTested = false;
58
59 /**
60 * Indicates if we should change the drop target when a
61 * {@code TransferHandler} is set.
62 */
63 private static boolean suppressDropSupport;
64
65 /**
66 * Indiciates if we've checked the system property for suppressing
67 * drop support.
68 */
69 private static boolean checkedSuppressDropSupport;
70
71
|
32
33 import java.awt.*;
34 import java.awt.event.*;
35 import java.awt.dnd.DropTarget;
36
37 import java.lang.reflect.*;
38
39 import javax.accessibility.*;
40 import javax.swing.event.MenuDragMouseEvent;
41 import javax.swing.plaf.UIResource;
42 import javax.swing.text.View;
43 import java.security.AccessController;
44 import sun.security.action.GetPropertyAction;
45
46 import sun.awt.AppContext;
47
48 /**
49 * A collection of utility methods for Swing.
50 *
51 * @author unknown
52 * @since 1.2
53 */
54 public class SwingUtilities implements SwingConstants
55 {
56 // These states are system-wide, rather than AppContext wide.
57 private static boolean canAccessEventQueue = false;
58 private static boolean eventQueueTested = false;
59
60 /**
61 * Indicates if we should change the drop target when a
62 * {@code TransferHandler} is set.
63 */
64 private static boolean suppressDropSupport;
65
66 /**
67 * Indiciates if we've checked the system property for suppressing
68 * drop support.
69 */
70 private static boolean checkedSuppressDropSupport;
71
72
|