<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc on Tue Jun 29 05:57:42 GMT+01:00 1999 -->
<TITLE>
Swing 1.1 API Specification: Class  Timer
</TITLE>
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style">
</HEAD>
<BODY BGCOLOR="white">

<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_top"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" ID="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="../../overview-summary.html"><FONT ID="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="package-summary.html"><FONT ID="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" ID="NavBarCell1Rev"> &nbsp;<FONT ID="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="class-use/Timer.html"><FONT ID="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="package-tree.html"><FONT ID="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="../../deprecated-list.html"><FONT ID="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="../../index-files/index-1.html"><FONT ID="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="../../help-doc.html"><FONT ID="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
Swing 1.1</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" ID="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../javax/swing/SwingUtilities.html"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../javax/swing/ToolTipManager.html"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" ID="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="Timer.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" ID="NavBarCell3"><FONT SIZE="-2">
  SUMMARY: &nbsp;INNER&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" ID="NavBarCell3"><FONT SIZE="-2">
DETAIL: &nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->

<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
javax.swing</FONT>
<BR>
Class  Timer</H2>
<PRE>
java.lang.Object
  |
  +--<B>javax.swing.Timer</B>
</PRE>
<HR>
<DL>
<DT>public class <B>Timer</B><DT>extends java.lang.Object<DT>implements java.io.Serializable</DL>

<P>
Object subclass that causes an action to occur at a predefined rate.  For
 example, an animation object can use a Timer as the trigger for drawing its
 next frame.  Each Timer has a list of ActionListeners and a delay (
 the time between <b>actionPerfomed()</b> calls).  When
 delay milliseconds have passed, a Timer sends the <b>actionPerformed()</b>
 message to its listeners.  This cycle repeats until
 <b>stop()</b> is called, or halts immediately if the Jimer is configured
 to send its message just once.<p>
 Using a Timer involves first creating it, then starting it using
 the <b>start()</b> method.
 <p>
 <strong>Warning:</strong>
 Serialized objects of this class will not be compatible with 
 future Swing releases.  The current serialization support is appropriate
 for short term storage or RMI between applications running the same
 version of Swing.  A future release of Swing will provide support for
 long term persistence.
<P>
<DL>
<DT><B>See Also: </B><DD><A HREF="../../serialized-form.html#javax.swing.Timer">Serialized Form</A></DL>
<HR>

<P>
<!-- ======== INNER CLASS SUMMARY ======== -->


<!-- =========== FIELD SUMMARY =========== -->

<A NAME="field_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" ID="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Field Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;<A HREF="../../javax/swing/event/EventListenerList.html">EventListenerList</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../javax/swing/Timer.html#listenerList">listenerList</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
</TABLE>
&nbsp;
<!-- ======== CONSTRUCTOR SUMMARY ======== -->

<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" ID="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD><CODE><B><A HREF="../../javax/swing/Timer.html#Timer(int, java.awt.event.ActionListener)">Timer</A></B>(int&nbsp;delay,
      java.awt.event.ActionListener&nbsp;listener)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a Timer that will notify its listeners every
 <i>delay</i> milliseconds.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->

<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" ID="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Method Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../javax/swing/Timer.html#addActionListener(java.awt.event.ActionListener)">addActionListener</A></B>(java.awt.event.ActionListener&nbsp;listener)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds an actionListener to the Timer</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../javax/swing/Timer.html#fireActionPerformed(java.awt.event.ActionEvent)">fireActionPerformed</A></B>(java.awt.event.ActionEvent&nbsp;e)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Notify all listeners that have registered interest for
 notification on this event type.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../javax/swing/Timer.html#getDelay()">getDelay</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the Timer's delay.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../javax/swing/Timer.html#getInitialDelay()">getInitialDelay</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the Timer's initial delay.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../javax/swing/Timer.html#getLogTimers()">getLogTimers</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns true if logging is enabled.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../javax/swing/Timer.html#isCoalesce()">isCoalesce</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns <b>true</b> if the Timer coalesces multiple pending
 <b>performCommand()</b> messages.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../javax/swing/Timer.html#isRepeats()">isRepeats</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns <b>true</b> if the Timer will send a <b>actionPerformed()</b>
 message to its listeners multiple times.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../javax/swing/Timer.html#isRunning()">isRunning</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns <b>true</b> if the Timer is running.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../javax/swing/Timer.html#removeActionListener(java.awt.event.ActionListener)">removeActionListener</A></B>(java.awt.event.ActionListener&nbsp;listener)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Removes an ActionListener from the Timer.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../javax/swing/Timer.html#restart()">restart</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Restarts a Timer, canceling any pending firings, and causing
 it to fire with its initial dely.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../javax/swing/Timer.html#setCoalesce(boolean)">setCoalesce</A></B>(boolean&nbsp;flag)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets whether the Timer coalesces multiple pending ActionEvent firings.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../javax/swing/Timer.html#setDelay(int)">setDelay</A></B>(int&nbsp;delay)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the Timer's delay, the number of milliseconds between successive
 <b>actionPerfomed()</b> messages to its listeners</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../javax/swing/Timer.html#setInitialDelay(int)">setInitialDelay</A></B>(int&nbsp;initialDelay)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the Timer's initial delay.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../javax/swing/Timer.html#setLogTimers(boolean)">setLogTimers</A></B>(boolean&nbsp;flag)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Enables or disables the timer log.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../javax/swing/Timer.html#setRepeats(boolean)">setRepeats</A></B>(boolean&nbsp;flag)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If <b>flag</b> is <b>false</b>, instructs the Timer to send
 <b>actionPerformed()</b> to its listeners only once, and then stop.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../javax/swing/Timer.html#start()">start</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Starts the Timer, causing it to send <b>actionPerformed()</b> messages
 to its listeners.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../javax/swing/Timer.html#stop()">stop</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Stops a Timer, causing it to stop sending <b>actionPerformed()</b>
 messages to its Target.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" ID="TableSubHeadingColor">
<TD><B>Methods inherited from class java.lang.Object</B></TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD><CODE>clone, 
equals, 
finalize, 
getClass, 
hashCode, 
notify, 
notifyAll, 
toString, 
wait, 
wait, 
wait</CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>

<!-- ============ FIELD DETAIL =========== -->

<A NAME="field_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" ID="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Field Detail</B></FONT></TD>
</TR>
</TABLE>

<A NAME="listenerList"><!-- --></A><H3>
listenerList</H3>
<PRE>
protected <A HREF="../../javax/swing/event/EventListenerList.html">EventListenerList</A> <B>listenerList</B></PRE>
<DL>
</DL>

<!-- ========= CONSTRUCTOR DETAIL ======== -->

<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" ID="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TD>
</TR>
</TABLE>

<A NAME="Timer(int, java.awt.event.ActionListener)"><!-- --></A><H3>
Timer</H3>
<PRE>
public <B>Timer</B>(int&nbsp;delay,
             java.awt.event.ActionListener&nbsp;listener)</PRE>
<DL>
<DD>Creates a Timer that will notify its listeners every
 <i>delay</i> milliseconds.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>delay</CODE> - The number of milliseconds between listener notification<DD><CODE>listener</CODE> - An initial listener<DT><B>See Also: </B><DD><A HREF="../../javax/swing/Timer.html#setInitialDelay(int)"><CODE>setInitialDelay(int)</CODE></A>, 
<A HREF="../../javax/swing/Timer.html#setRepeats(boolean)"><CODE>setRepeats(boolean)</CODE></A></DL>
</DD>
</DL>

<!-- ============ METHOD DETAIL ========== -->

<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" ID="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B></FONT></TD>
</TR>
</TABLE>

<A NAME="addActionListener(java.awt.event.ActionListener)"><!-- --></A><H3>
addActionListener</H3>
<PRE>
public void <B>addActionListener</B>(java.awt.event.ActionListener&nbsp;listener)</PRE>
<DL>
<DD>Adds an actionListener to the Timer<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="removeActionListener(java.awt.event.ActionListener)"><!-- --></A><H3>
removeActionListener</H3>
<PRE>
public void <B>removeActionListener</B>(java.awt.event.ActionListener&nbsp;listener)</PRE>
<DL>
<DD>Removes an ActionListener from the Timer.<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="fireActionPerformed(java.awt.event.ActionEvent)"><!-- --></A><H3>
fireActionPerformed</H3>
<PRE>
protected void <B>fireActionPerformed</B>(java.awt.event.ActionEvent&nbsp;e)</PRE>
<DL>
<DD>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.<DD><DL>
<DT><B>See Also: </B><DD><A HREF="../../javax/swing/event/EventListenerList.html"><CODE>EventListenerList</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="setLogTimers(boolean)"><!-- --></A><H3>
setLogTimers</H3>
<PRE>
public static void <B>setLogTimers</B>(boolean&nbsp;flag)</PRE>
<DL>
<DD>Enables or disables the timer log. When enabled, a message
 is posted to System.out whenever the timer goes off.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>flag</CODE> - true to enable logging<DT><B>See Also: </B><DD><A HREF="../../javax/swing/Timer.html#getLogTimers()"><CODE>getLogTimers()</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="getLogTimers()"><!-- --></A><H3>
getLogTimers</H3>
<PRE>
public static boolean <B>getLogTimers</B>()</PRE>
<DL>
<DD>Returns true if logging is enabled.<DD><DL>
<DT><B>Returns:</B><DD>true if logging is enabled<DT><B>See Also: </B><DD><A HREF="../../javax/swing/Timer.html#setLogTimers(boolean)"><CODE>setLogTimers(boolean)</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="setDelay(int)"><!-- --></A><H3>
setDelay</H3>
<PRE>
public void <B>setDelay</B>(int&nbsp;delay)</PRE>
<DL>
<DD>Sets the Timer's delay, the number of milliseconds between successive
 <b>actionPerfomed()</b> messages to its listeners<DD><DL>
<DT><B>See Also: </B><DD><A HREF="../../javax/swing/Timer.html#setInitialDelay(int)"><CODE>setInitialDelay(int)</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="getDelay()"><!-- --></A><H3>
getDelay</H3>
<PRE>
public int <B>getDelay</B>()</PRE>
<DL>
<DD>Returns the Timer's delay.<DD><DL>
<DT><B>See Also: </B><DD><A HREF="../../javax/swing/Timer.html#setDelay(int)"><CODE>setDelay(int)</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="setInitialDelay(int)"><!-- --></A><H3>
setInitialDelay</H3>
<PRE>
public void <B>setInitialDelay</B>(int&nbsp;initialDelay)</PRE>
<DL>
<DD>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.<DD><DL>
<DT><B>See Also: </B><DD><A HREF="../../javax/swing/Timer.html#setDelay(int)"><CODE>setDelay(int)</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="getInitialDelay()"><!-- --></A><H3>
getInitialDelay</H3>
<PRE>
public int <B>getInitialDelay</B>()</PRE>
<DL>
<DD>Returns the Timer's initial delay.<DD><DL>
<DT><B>See Also: </B><DD><A HREF="../../javax/swing/Timer.html#setDelay(int)"><CODE>setDelay(int)</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="setRepeats(boolean)"><!-- --></A><H3>
setRepeats</H3>
<PRE>
public void <B>setRepeats</B>(boolean&nbsp;flag)</PRE>
<DL>
<DD>If <b>flag</b> is <b>false</b>, instructs the Timer to send
 <b>actionPerformed()</b> to its listeners only once, and then stop.<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="isRepeats()"><!-- --></A><H3>
isRepeats</H3>
<PRE>
public boolean <B>isRepeats</B>()</PRE>
<DL>
<DD>Returns <b>true</b> if the Timer will send a <b>actionPerformed()</b>
 message to its listeners multiple times.<DD><DL>
<DT><B>See Also: </B><DD><A HREF="../../javax/swing/Timer.html#setRepeats(boolean)"><CODE>setRepeats(boolean)</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="setCoalesce(boolean)"><!-- --></A><H3>
setCoalesce</H3>
<PRE>
public void <B>setCoalesce</B>(boolean&nbsp;flag)</PRE>
<DL>
<DD>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
 <b>actionPerformed()</b> 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 <b>actionPerformed()</b>
 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.<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="isCoalesce()"><!-- --></A><H3>
isCoalesce</H3>
<PRE>
public boolean <B>isCoalesce</B>()</PRE>
<DL>
<DD>Returns <b>true</b> if the Timer coalesces multiple pending
 <b>performCommand()</b> messages.<DD><DL>
<DT><B>See Also: </B><DD><A HREF="../../javax/swing/Timer.html#setCoalesce(boolean)"><CODE>setCoalesce(boolean)</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="start()"><!-- --></A><H3>
start</H3>
<PRE>
public void <B>start</B>()</PRE>
<DL>
<DD>Starts the Timer, causing it to send <b>actionPerformed()</b> messages
 to its listeners.<DD><DL>
<DT><B>See Also: </B><DD><A HREF="../../javax/swing/Timer.html#stop()"><CODE>stop()</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="isRunning()"><!-- --></A><H3>
isRunning</H3>
<PRE>
public boolean <B>isRunning</B>()</PRE>
<DL>
<DD>Returns <b>true</b> if the Timer is running.<DD><DL>
<DT><B>See Also: </B><DD><A HREF="../../javax/swing/Timer.html#start()"><CODE>start()</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="stop()"><!-- --></A><H3>
stop</H3>
<PRE>
public void <B>stop</B>()</PRE>
<DL>
<DD>Stops a Timer, causing it to stop sending <b>actionPerformed()</b>
 messages to its Target.<DD><DL>
<DT><B>See Also: </B><DD><A HREF="../../javax/swing/Timer.html#start()"><CODE>start()</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="restart()"><!-- --></A><H3>
restart</H3>
<PRE>
public void <B>restart</B>()</PRE>
<DL>
<DD>Restarts a Timer, canceling any pending firings, and causing
 it to fire with its initial dely.<DD><DL>
</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>

<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_bottom"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" ID="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="../../overview-summary.html"><FONT ID="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="package-summary.html"><FONT ID="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" ID="NavBarCell1Rev"> &nbsp;<FONT ID="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="class-use/Timer.html"><FONT ID="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="package-tree.html"><FONT ID="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="../../deprecated-list.html"><FONT ID="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="../../index-files/index-1.html"><FONT ID="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="../../help-doc.html"><FONT ID="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
Swing 1.1</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" ID="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../javax/swing/SwingUtilities.html"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../javax/swing/ToolTipManager.html"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" ID="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="Timer.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" ID="NavBarCell3"><FONT SIZE="-2">
  SUMMARY: &nbsp;INNER&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" ID="NavBarCell3"><FONT SIZE="-2">
DETAIL: &nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->

<HR>
<font size="-1"><a href="http://java.sun.com/cgi-bin/bugreport.cgi">Submit a bug or feature</a><br>Java is a trademark or registered trademark of Sun Microsystems,  Inc. in the US and other countries.<br>Copyright 1993-1998 Sun Microsystems, Inc. 901 San Antonio Road,<br>Palo Alto, California, 94303, U.S.A.  All Rights Reserved.</font>
</BODY>
</HTML>
