Java Doc for EventQueue.java in  » 6.0-JDK-Modules » j2me » java » awt » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » 6.0 JDK Modules » j2me » java.awt 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   java.awt.EventQueue

EventQueue
public class EventQueue (Code)
EventQueue is a platform-independent class that queues events, both from the underlying peer classes and from trusted application classes. There is only one EventQueue for each AppContext.
author:
   Thomas Ball
author:
   Fred Ecks
author:
   David Mendenhall
version:
   1.67, 02/11/00
since:
   1.1


Field Summary
final static  intNUM_PRIORITIES
    
 Queue[]queues
    

Constructor Summary
public  EventQueue()
    

Method Summary
final  voidchangeKeyEventFocus(Object newSource)
    
protected  voiddispatchEvent(AWTEvent event)
     Dispatch an event.
public static  AWTEventgetCurrentEvent()
     Returns the the event currently being dispatched by the EventQueue associated with the calling thread.
final  EventDispatchThreadgetDispatchThread()
    
public static  longgetMostRecentEventTime()
    
public  AWTEventgetNextEvent()
     Remove an event from the EventQueue and return it.
 AWTEventgetNextEvent(int id)
    
public static  voidinvokeAndWait(Runnable runnable)
     Causes runnable to have its run() method called in the dispatch thread of the EventQueue.
public static  voidinvokeLater(Runnable runnable)
     Causes runnable to have its run() method called in the dispatch thread of the EventQueue.
public static  booleanisDispatchThread()
     Returns true if the calling thread is the current AWT EventQueue's dispatch thread.
public  AWTEventpeekEvent()
     Return the first event on the EventQueue without removing it.
public  AWTEventpeekEvent(int id)
     Return the first event with the specified id, if any.
Parameters:
  id - the id of the type of event desired.
protected  voidpop()
     Stop dispatching events using this EventQueue instance.
public  voidpostEvent(AWTEvent theEvent)
     Post a 1.1-style event to the EventQueue.
final  voidpostEventPrivate(AWTEvent theEvent)
     Post a 1.1-style event to the EventQueue.
public  voidpush(EventQueue newEventQueue)
     Replace the existing EventQueue with the specified one.
final  voidremoveEvents(Class type, int id)
    
final  voidremoveSourceEvents(Object source)
    
final  voidremoveSourceEvents(Object source, boolean removeAllEvents)
    
static  voidsetCurrentEventAndMostRecentTime(AWTEvent e)
    

Field Detail
NUM_PRIORITIES
final static int NUM_PRIORITIES(Code)



queues
Queue[] queues(Code)




Constructor Detail
EventQueue
public EventQueue()(Code)




Method Detail
changeKeyEventFocus
final void changeKeyEventFocus(Object newSource)(Code)



dispatchEvent
protected void dispatchEvent(AWTEvent event)(Code)
Dispatch an event. The manner in which the event is dispatched depends upon the type of the event and the type of the event's source object:

Event Type Source Type Dispatched To
ActiveEvent Any event.dispatch()
Other Component source.dispatchEvent(AWTEvent)
Other MenuComponent source.dispatchEvent(AWTEvent)
Other Other No action (ignored)


Parameters:
  theEvent - an instance of java.awt.AWTEvent, or asubclass of it.



getCurrentEvent
public static AWTEvent getCurrentEvent()(Code)
Returns the the event currently being dispatched by the EventQueue associated with the calling thread. This is useful if a method needs access to the event, but was not designed to receive a reference to it as an argument. Note that this method should only be invoked from an application's event dispatching thread. If this method is invoked from another thread, null will be returned. the event currently being dispatched, or null if this method isinvoked on a thread other than an event dispatching thread
since:
   1.4



getDispatchThread
final EventDispatchThread getDispatchThread()(Code)



getMostRecentEventTime
public static long getMostRecentEventTime()(Code)



getNextEvent
public AWTEvent getNextEvent() throws InterruptedException(Code)
Remove an event from the EventQueue and return it. This method will block until an event has been posted by another thread. the next AWTEvent
exception:
  InterruptedException - if another thread has interrupted this thread.



getNextEvent
AWTEvent getNextEvent(int id) throws InterruptedException(Code)



invokeAndWait
public static void invokeAndWait(Runnable runnable) throws InterruptedException, InvocationTargetException(Code)
Causes runnable to have its run() method called in the dispatch thread of the EventQueue. This will happen after all pending events are processed. The call blocks until this has happened. This method will throw an Error if called from the event dispatcher thread.
Parameters:
  runnable - the Runnable whose run() method should be executedsynchronously on the EventQueue
exception:
  InterruptedException - if another thread hasinterrupted this thread
exception:
  InvocationTargetException - if an exception is thrownwhen running runnable
See Also:   EventQueue.invokeLater
since:
   1.2



invokeLater
public static void invokeLater(Runnable runnable)(Code)
Causes runnable to have its run() method called in the dispatch thread of the EventQueue. This will happen after all pending events are processed.
Parameters:
  runnable - the Runnable whose run() method should be executedsynchronously on the EventQueue
See Also:   EventQueue.invokeAndWait
since:
   1.2



isDispatchThread
public static boolean isDispatchThread()(Code)
Returns true if the calling thread is the current AWT EventQueue's dispatch thread. Use this call the ensure that a given task is being executed (or not being) on the current AWT EventDispatchThread. true if running on the current AWT EventQueue's dispatch thread.



peekEvent
public AWTEvent peekEvent()(Code)
Return the first event on the EventQueue without removing it. the first event



peekEvent
public AWTEvent peekEvent(int id)(Code)
Return the first event with the specified id, if any.
Parameters:
  id - the id of the type of event desired. the first event of the specified id



pop
protected void pop() throws EmptyStackException(Code)
Stop dispatching events using this EventQueue instance. Any pending events are transferred to the previous EventQueue for processing by it. if no previous push was made on this EventQueue.
See Also:   java.awt.EventQueue.push



postEvent
public void postEvent(AWTEvent theEvent)(Code)
Post a 1.1-style event to the EventQueue. If there is an existing event on the queue with the same ID and event source, the source Component's coalesceEvents method will be called.
Parameters:
  theEvent - an instance of java.awt.AWTEvent, or asubclass of it.



postEventPrivate
final void postEventPrivate(AWTEvent theEvent)(Code)
Post a 1.1-style event to the EventQueue. If there is an existing event on the queue with the same ID and event source, the source Component's coalesceEvents method will be called.
Parameters:
  theEvent - an instance of java.awt.AWTEvent, or asubclass of it.



push
public void push(EventQueue newEventQueue)(Code)
Replace the existing EventQueue with the specified one. Any pending events are transferred to the new EventQueue for processing by it.
Parameters:
  an - EventQueue (or subclass thereof) instance to be used.
See Also:   java.awt.EventQueue.pop



removeEvents
final void removeEvents(Class type, int id)(Code)



removeSourceEvents
final void removeSourceEvents(Object source)(Code)



removeSourceEvents
final void removeSourceEvents(Object source, boolean removeAllEvents)(Code)



setCurrentEventAndMostRecentTime
static void setCurrentEventAndMostRecentTime(AWTEvent e)(Code)



Methods inherited from java.lang.Object
public boolean equals(Object obj)(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.