3037 return true;
3038 }
3039 return (wto != wfrom);
3040 }
3041
3042 private static boolean isTemporary(Component to, Component from) {
3043 Window wto = SunToolkit.getContainingWindow(to);
3044 Window wfrom = SunToolkit.getContainingWindow(from);
3045 if (wto == null && wfrom == null) {
3046 return false;
3047 }
3048 if (wto == null) {
3049 return true;
3050 }
3051 if (wfrom == null) {
3052 return false;
3053 }
3054 return (wto != wfrom);
3055 }
3056
3057 static Component getHeavyweight(Component comp) {
3058 if (comp == null || comp.getPeer() == null) {
3059 return null;
3060 } else if (comp.getPeer() instanceof LightweightPeer) {
3061 return comp.getNativeContainer();
3062 } else {
3063 return comp;
3064 }
3065 }
3066
3067 static Field proxyActive;
3068 // Accessor to private field isProxyActive of KeyEvent
3069 private static boolean isProxyActiveImpl(KeyEvent e) {
3070 if (proxyActive == null) {
3071 proxyActive = AccessController.doPrivileged(new PrivilegedAction<Field>() {
3072 public Field run() {
3073 Field field = null;
3074 try {
3075 field = KeyEvent.class.getDeclaredField("isProxyActive");
3076 if (field != null) {
|
3037 return true;
3038 }
3039 return (wto != wfrom);
3040 }
3041
3042 private static boolean isTemporary(Component to, Component from) {
3043 Window wto = SunToolkit.getContainingWindow(to);
3044 Window wfrom = SunToolkit.getContainingWindow(from);
3045 if (wto == null && wfrom == null) {
3046 return false;
3047 }
3048 if (wto == null) {
3049 return true;
3050 }
3051 if (wfrom == null) {
3052 return false;
3053 }
3054 return (wto != wfrom);
3055 }
3056
3057 @SuppressWarnings("deprecation")
3058 static Component getHeavyweight(Component comp) {
3059 if (comp == null || comp.getPeer() == null) {
3060 return null;
3061 } else if (comp.getPeer() instanceof LightweightPeer) {
3062 return comp.getNativeContainer();
3063 } else {
3064 return comp;
3065 }
3066 }
3067
3068 static Field proxyActive;
3069 // Accessor to private field isProxyActive of KeyEvent
3070 private static boolean isProxyActiveImpl(KeyEvent e) {
3071 if (proxyActive == null) {
3072 proxyActive = AccessController.doPrivileged(new PrivilegedAction<Field>() {
3073 public Field run() {
3074 Field field = null;
3075 try {
3076 field = KeyEvent.class.getDeclaredField("isProxyActive");
3077 if (field != null) {
|