1505 |
void dispatchEventImpl(AWTEvent e) |
void dispatchEventImpl(AWTEvent e) |
1506 |
{ |
{ |
1507 |
// Give lightweight dispatcher a chance to handle it. |
// Give lightweight dispatcher a chance to handle it. |
1508 |
if (dispatcher != null |
if (eventTypeEnabled (e.id) |
1509 |
|
&& dispatcher != null |
1510 |
&& dispatcher.handleEvent (e)) |
&& dispatcher.handleEvent (e)) |
1511 |
return; |
return; |
1512 |
|
|
1587 |
{ |
{ |
1588 |
if (dispatcher == null) |
if (dispatcher == null) |
1589 |
dispatcher = new LightweightDispatcher (this); |
dispatcher = new LightweightDispatcher (this); |
|
dispatcher.enableEvents (component[i].eventMask); |
|
1590 |
} |
} |
1591 |
|
|
1592 |
|
|
1831 |
{ |
{ |
1832 |
private static final long serialVersionUID = 5184291520170872969L; |
private static final long serialVersionUID = 5184291520170872969L; |
1833 |
private Container nativeContainer; |
private Container nativeContainer; |
|
private Component focus; |
|
1834 |
private Cursor nativeCursor; |
private Cursor nativeCursor; |
1835 |
private long eventMask; |
private long eventMask; |
1836 |
|
|
1844 |
nativeContainer = c; |
nativeContainer = c; |
1845 |
} |
} |
1846 |
|
|
|
void enableEvents(long l) |
|
|
{ |
|
|
eventMask |= l; |
|
|
} |
|
|
|
|
1847 |
void acquireComponentForMouseEvent(MouseEvent me) |
void acquireComponentForMouseEvent(MouseEvent me) |
1848 |
{ |
{ |
1849 |
int x = me.getX (); |
int x = me.getX (); |
1943 |
|
|
1944 |
boolean handleEvent(AWTEvent e) |
boolean handleEvent(AWTEvent e) |
1945 |
{ |
{ |
|
if ((eventMask & e.getID()) == 0) |
|
|
return false; |
|
|
|
|
1946 |
if (e instanceof MouseEvent) |
if (e instanceof MouseEvent) |
1947 |
{ |
{ |
1948 |
MouseEvent me = (MouseEvent) e; |
MouseEvent me = (MouseEvent) e; |
1980 |
e.consume(); |
e.consume(); |
1981 |
} |
} |
1982 |
} |
} |
|
else if (e instanceof KeyEvent && focus != null) |
|
|
{ |
|
|
focus.processKeyEvent((KeyEvent) e); |
|
|
} |
|
1983 |
|
|
1984 |
return e.isConsumed(); |
return e.isConsumed(); |
1985 |
} |
} |