Java Doc for Timer.java in  » Swing-Library » wings3 » org » wings » util » 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 » Swing Library » wings3 » org.wings.util 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.wings.util.Timer

Timer
final public class Timer implements Serializable(Code)

author:
   Armin Haaf


Field Summary
 booleaneventQueued
    
 longexpirationTime
    
 TimernextTimer
    
 booleanrunning
    

Constructor Summary
public  Timer(long delay, ActionListener listener)
     Creates a Timer that will notify its listeners every delay milliseconds.

Method Summary
public  voidaddActionListener(ActionListener listener)
    
synchronized  voidcancelEvent()
    
protected  voidfireActionPerformed(ActionEvent e)
     Notify all listeners that have registered interest for notification on this event type.
public  longgetDelay()
     Returns the Timer's delay.
public  longgetInitialDelay()
     Returns the Timer's initial delay.
public static  booleangetLogTimers()
     Returns true if logging is enabled.
public  booleanisCoalesce()
     Returns true if the Timer coalesces multiple pending performCommand() messages.
public  booleanisRepeats()
     Returns true if the Timer will send a actionPerformed() message to its listeners multiple times.
public  booleanisRunning()
     Returns true if the Timer is running.
synchronized  voidpost()
    
public  voidremoveActionListener(ActionListener listener)
     Removes an ActionListener from the Timer.
public  voidrestart()
     Restarts a Timer, canceling any pending firings, and causing it to fire with its initial dely.
public  voidsetActionCommand(String command)
     Sets action command for this timer.
public  voidsetCoalesce(boolean flag)
     Sets whether the Timer coalesces multiple pending ActionEvent firings. A busy application may not be able to keep up with a Timer's message generation, causing multiple actionPerformed() message sends to be queued.
public  voidsetDelay(long delay)
    
public  voidsetInitialDelay(int initialDelay)
     Sets the Timer's initial delay.
public static  voidsetLogTimers(boolean flag)
     Enables or disables the timer log.
public  voidsetRepeats(boolean flag)
     If flag is false, instructs the Timer to send actionPerformed() to its listeners only once, and then stop.
public  voidstart()
     Starts the Timer, causing it to send actionPerformed() messages to its listeners.
public  voidstop()
     Stops a Timer, causing it to stop sending actionPerformed() messages to its Target.
 TimerQueuetimerQueue()
     Returns the timer queue.

Field Detail
eventQueued
boolean eventQueued(Code)



expirationTime
long expirationTime(Code)



nextTimer
Timer nextTimer(Code)



running
boolean running(Code)




Constructor Detail
Timer
public Timer(long delay, ActionListener listener)(Code)
Creates a Timer that will notify its listeners every delay milliseconds.
Parameters:
  delay - The number of milliseconds between listener notification
Parameters:
  listener - An initial listener
See Also:   Timer.setInitialDelay
See Also:   Timer.setRepeats




Method Detail
addActionListener
public void addActionListener(ActionListener listener)(Code)
Adds an actionListener to the Timer



cancelEvent
synchronized void cancelEvent()(Code)



fireActionPerformed
protected void fireActionPerformed(ActionEvent e)(Code)
Notify all listeners that have registered interest for notification on this event type. The event instance is lazily created using the parameters passed into the fire method.



getDelay
public long getDelay()(Code)
Returns the Timer's delay.
See Also:   Timer.setDelay



getInitialDelay
public long getInitialDelay()(Code)
Returns the Timer's initial delay.
See Also:   Timer.setDelay



getLogTimers
public static boolean getLogTimers()(Code)
Returns true if logging is enabled. true if logging is enabled
See Also:   Timer.setLogTimers



isCoalesce
public boolean isCoalesce()(Code)
Returns true if the Timer coalesces multiple pending performCommand() messages.
See Also:   Timer.setCoalesce



isRepeats
public boolean isRepeats()(Code)
Returns true if the Timer will send a actionPerformed() message to its listeners multiple times.
See Also:   Timer.setRepeats



isRunning
public boolean isRunning()(Code)
Returns true if the Timer is running.
See Also:   Timer.start



post
synchronized void post()(Code)



removeActionListener
public void removeActionListener(ActionListener listener)(Code)
Removes an ActionListener from the Timer.



restart
public void restart()(Code)
Restarts a Timer, canceling any pending firings, and causing it to fire with its initial dely.



setActionCommand
public void setActionCommand(String command)(Code)
Sets action command for this timer.



setCoalesce
public void setCoalesce(boolean flag)(Code)
Sets whether the Timer coalesces multiple pending ActionEvent firings. A busy application may not be able to keep up with a Timer's message generation, causing multiple actionPerformed() message sends to be queued. When processed, the application sends these messages one after the other, causing the Timer's listeners to receive a sequence of actionPerformed() messages with no delay between them. Coalescing avoids this situation by reducing multiple pending messages to a single message send. Timers coalesce their message sends by default.



setDelay
public void setDelay(long delay)(Code)
Sets the Timer's delay, the number of milliseconds between successive actionPerfomed() messages to its listeners
See Also:   Timer.setInitialDelay



setInitialDelay
public void setInitialDelay(int initialDelay)(Code)
Sets the Timer's initial delay. This will be used for the first "ringing" of the Timer only. Subsequent ringings will be spaced using the delay property.
See Also:   Timer.setDelay



setLogTimers
public static void setLogTimers(boolean flag)(Code)
Enables or disables the timer log. When enabled, a message is posted to System.out whenever the timer goes off.
Parameters:
  flag - true to enable logging
See Also:   Timer.getLogTimers



setRepeats
public void setRepeats(boolean flag)(Code)
If flag is false, instructs the Timer to send actionPerformed() to its listeners only once, and then stop.



start
public void start()(Code)
Starts the Timer, causing it to send actionPerformed() messages to its listeners.
See Also:   Timer.stop



stop
public void stop()(Code)
Stops a Timer, causing it to stop sending actionPerformed() messages to its Target.
See Also:   Timer.start



timerQueue
TimerQueue timerQueue()(Code)
Returns the timer queue.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(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.