equal
deleted
inserted
replaced
28 import java.util.EventObject; |
28 import java.util.EventObject; |
29 import java.awt.event.*; |
29 import java.awt.event.*; |
30 import java.awt.peer.ComponentPeer; |
30 import java.awt.peer.ComponentPeer; |
31 import java.awt.peer.LightweightPeer; |
31 import java.awt.peer.LightweightPeer; |
32 import java.lang.reflect.Field; |
32 import java.lang.reflect.Field; |
33 import java.util.logging.Logger; |
|
34 import java.util.logging.Level; |
|
35 import sun.awt.AWTAccessor; |
33 import sun.awt.AWTAccessor; |
|
34 import sun.util.logging.PlatformLogger; |
36 |
35 |
37 /** |
36 /** |
38 * The root event class for all AWT events. |
37 * The root event class for all AWT events. |
39 * This class and its subclasses supercede the original |
38 * This class and its subclasses supercede the original |
40 * java.awt.Event class. |
39 * java.awt.Event class. |
74 * @author Carl Quinn |
73 * @author Carl Quinn |
75 * @author Amy Fowler |
74 * @author Amy Fowler |
76 * @since 1.1 |
75 * @since 1.1 |
77 */ |
76 */ |
78 public abstract class AWTEvent extends EventObject { |
77 public abstract class AWTEvent extends EventObject { |
79 private static final Logger log = Logger.getLogger("java.awt.AWTEvent"); |
78 private static final PlatformLogger log = PlatformLogger.getLogger("java.awt.AWTEvent"); |
80 private byte bdata[]; |
79 private byte bdata[]; |
81 |
80 |
82 /** |
81 /** |
83 * The event's id. |
82 * The event's id. |
84 * @serial |
83 * @serial |
250 field = InputEvent.class. |
249 field = InputEvent.class. |
251 getDeclaredField("canAccessSystemClipboard"); |
250 getDeclaredField("canAccessSystemClipboard"); |
252 field.setAccessible(true); |
251 field.setAccessible(true); |
253 return field; |
252 return field; |
254 } catch (SecurityException e) { |
253 } catch (SecurityException e) { |
255 if (log.isLoggable(Level.FINE)) { |
254 if (log.isLoggable(PlatformLogger.FINE)) { |
256 log.log(Level.FINE, "AWTEvent.get_InputEvent_CanAccessSystemClipboard() got SecurityException ", e); |
255 log.fine("AWTEvent.get_InputEvent_CanAccessSystemClipboard() got SecurityException ", e); |
257 } |
256 } |
258 } catch (NoSuchFieldException e) { |
257 } catch (NoSuchFieldException e) { |
259 if (log.isLoggable(Level.FINE)) { |
258 if (log.isLoggable(PlatformLogger.FINE)) { |
260 log.log(Level.FINE, "AWTEvent.get_InputEvent_CanAccessSystemClipboard() got NoSuchFieldException ", e); |
259 log.fine("AWTEvent.get_InputEvent_CanAccessSystemClipboard() got NoSuchFieldException ", e); |
261 } |
260 } |
262 } |
261 } |
263 return null; |
262 return null; |
264 } |
263 } |
265 }); |
264 }); |
547 if (field != null) { |
546 if (field != null) { |
548 try { |
547 try { |
549 boolean b = field.getBoolean(this); |
548 boolean b = field.getBoolean(this); |
550 field.setBoolean(that, b); |
549 field.setBoolean(that, b); |
551 } catch(IllegalAccessException e) { |
550 } catch(IllegalAccessException e) { |
552 if (log.isLoggable(Level.FINE)) { |
551 if (log.isLoggable(PlatformLogger.FINE)) { |
553 log.log(Level.FINE, "AWTEvent.copyPrivateDataInto() got IllegalAccessException ", e); |
552 log.fine("AWTEvent.copyPrivateDataInto() got IllegalAccessException ", e); |
554 } |
553 } |
555 } |
554 } |
556 } |
555 } |
557 } |
556 } |
558 } |
557 } |
562 Field field = get_InputEvent_CanAccessSystemClipboard(); |
561 Field field = get_InputEvent_CanAccessSystemClipboard(); |
563 if (field != null) { |
562 if (field != null) { |
564 try { |
563 try { |
565 field.setBoolean(this, false); |
564 field.setBoolean(this, false); |
566 } catch(IllegalAccessException e) { |
565 } catch(IllegalAccessException e) { |
567 if (log.isLoggable(Level.FINE)) { |
566 if (log.isLoggable(PlatformLogger.FINE)) { |
568 log.log(Level.FINE, "AWTEvent.dispatched() got IllegalAccessException ", e); |
567 log.fine("AWTEvent.dispatched() got IllegalAccessException ", e); |
569 } |
568 } |
570 } |
569 } |
571 } |
570 } |
572 } |
571 } |
573 } |
572 } |