1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
\r
5 <!-- Generated by javadoc (build 1.4.2_16) on Mon Mar 09 18:20:29 CET 2009 -->
\r
7 TextSynthesizer.OutputHandler (FreeTTS 1.2)
\r
10 <META NAME="keywords" CONTENT="com.sun.speech.engine.synthesis.text.TextSynthesizer.OutputHandler class">
\r
12 <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../../stylesheet.css" TITLE="Style">
\r
14 <SCRIPT type="text/javascript">
\r
15 function windowTitle()
\r
17 parent.document.title="TextSynthesizer.OutputHandler (FreeTTS 1.2)";
\r
23 <BODY BGCOLOR="white" onload="windowTitle();">
\r
26 <!-- ========= START OF TOP NAVBAR ======= -->
\r
27 <A NAME="navbar_top"><!-- --></A>
28 <A HREF="#skip-navbar_top" title="Skip navigation links"></A>
29 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
\r
31 <TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
\r
32 <A NAME="navbar_top_firstrow"><!-- --></A>
33 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
\r
34 <TR ALIGN="center" VALIGN="top">
\r
35 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
\r
36 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
\r
37 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
\r
38 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
\r
39 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
\r
40 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
\r
41 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
\r
45 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
\r
51 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
\r
52 <A HREF="../../../../../../com/sun/speech/engine/synthesis/text/TextSynthesizer.html" title="class in com.sun.speech.engine.synthesis.text"><B>PREV CLASS</B></A>
\r
53 <A HREF="../../../../../../com/sun/speech/engine/synthesis/text/TextSynthesizerModeDesc.html" title="class in com.sun.speech.engine.synthesis.text"><B>NEXT CLASS</B></A></FONT></TD>
\r
54 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
\r
55 <A HREF="../../../../../../index.html" target="_top"><B>FRAMES</B></A>
\r
56 <A HREF="TextSynthesizer.OutputHandler.html" target="_top"><B>NO FRAMES</B></A>
\r
57 <SCRIPT type="text/javascript">
\r
60 document.writeln('<A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
\r
65 <A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>
\r
71 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
\r
72 SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
\r
73 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
\r
74 DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
\r
77 <A NAME="skip-navbar_top"></A>
78 <!-- ========= END OF TOP NAVBAR ========= -->
\r
81 <!-- ======== START OF CLASS DATA ======== -->
\r
84 com.sun.speech.engine.synthesis.text</FONT>
\r
86 Class TextSynthesizer.OutputHandler</H2>
\r
89 <IMG SRC="../../../../../../resources/inherit.gif" ALT="extended by">java.lang.Thread
\r
90 <IMG SRC="../../../../../../resources/inherit.gif" ALT="extended by"><B>com.sun.speech.engine.synthesis.text.TextSynthesizer.OutputHandler</B>
\r
93 <DT><B>All Implemented Interfaces:</B> <DD>java.lang.Runnable</DD>
\r
96 <DT><B>Enclosing class:</B><DD><A HREF="../../../../../../com/sun/speech/engine/synthesis/text/TextSynthesizer.html" title="class in com.sun.speech.engine.synthesis.text">TextSynthesizer</A></DD>
\r
100 <DT>public class <B>TextSynthesizer.OutputHandler</B><DT>extends java.lang.Thread</DL>
\r
103 The output device for a <code>TextSynthesizer</code>. Sends
104 all text to standard out.
\r
111 <!-- ======== NESTED CLASS SUMMARY ======== -->
\r
114 <!-- =========== FIELD SUMMARY =========== -->
\r
116 <A NAME="field_summary"><!-- --></A>
117 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
\r
118 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
\r
119 <TD COLSPAN=2><FONT SIZE="+2">
\r
120 <B>Field Summary</B></FONT></TD>
\r
122 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
123 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
124 <CODE>protected static int</CODE></FONT></TD>
\r
125 <TD><CODE><B><A HREF="../../../../../../com/sun/speech/engine/synthesis/text/TextSynthesizer.OutputHandler.html#CANCEL">CANCEL</A></B></CODE>
\r
128 </TD>
\r
130 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
131 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
132 <CODE>protected static int</CODE></FONT></TD>
\r
133 <TD><CODE><B><A HREF="../../../../../../com/sun/speech/engine/synthesis/text/TextSynthesizer.OutputHandler.html#CANCEL_ALL">CANCEL_ALL</A></B></CODE>
\r
136 </TD>
\r
138 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
139 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
140 <CODE>protected static int</CODE></FONT></TD>
\r
141 <TD><CODE><B><A HREF="../../../../../../com/sun/speech/engine/synthesis/text/TextSynthesizer.OutputHandler.html#CANCEL_COMPLETE">CANCEL_COMPLETE</A></B></CODE>
\r
144 </TD>
\r
146 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
147 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
148 <CODE>protected int</CODE></FONT></TD>
\r
149 <TD><CODE><B><A HREF="../../../../../../com/sun/speech/engine/synthesis/text/TextSynthesizer.OutputHandler.html#command">command</A></B></CODE>
\r
152 For the item at the top of the queue, the output command reflects
153 whether item should be PAUSE, RESUME, CANCEL.</TD>
\r
155 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
156 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
157 <CODE>protected java.lang.Object</CODE></FONT></TD>
\r
158 <TD><CODE><B><A HREF="../../../../../../com/sun/speech/engine/synthesis/text/TextSynthesizer.OutputHandler.html#commandLock">commandLock</A></B></CODE>
\r
161 Object on which accesses to the command must synchronize.</TD>
\r
163 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
164 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
165 <CODE>protected java.lang.Object</CODE></FONT></TD>
\r
166 <TD><CODE><B><A HREF="../../../../../../com/sun/speech/engine/synthesis/text/TextSynthesizer.OutputHandler.html#currentItemLock">currentItemLock</A></B></CODE>
\r
169 Object to lock on for setting the current item.</TD>
\r
171 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
172 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
173 <CODE>protected boolean</CODE></FONT></TD>
\r
174 <TD><CODE><B><A HREF="../../../../../../com/sun/speech/engine/synthesis/text/TextSynthesizer.OutputHandler.html#done">done</A></B></CODE>
\r
177 </TD>
\r
179 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
180 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
181 <CODE>protected static int</CODE></FONT></TD>
\r
182 <TD><CODE><B><A HREF="../../../../../../com/sun/speech/engine/synthesis/text/TextSynthesizer.OutputHandler.html#PAUSE">PAUSE</A></B></CODE>
\r
185 </TD>
\r
187 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
188 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
189 <CODE>protected java.util.Vector</CODE></FONT></TD>
\r
190 <TD><CODE><B><A HREF="../../../../../../com/sun/speech/engine/synthesis/text/TextSynthesizer.OutputHandler.html#queue">queue</A></B></CODE>
\r
193 Internal speech output queue that will contain a set of
194 TextSynthesizerQueueItems.</TD>
\r
196 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
197 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
198 <CODE>protected static int</CODE></FONT></TD>
\r
199 <TD><CODE><B><A HREF="../../../../../../com/sun/speech/engine/synthesis/text/TextSynthesizer.OutputHandler.html#RESUME">RESUME</A></B></CODE>
\r
202 </TD>
\r
205 <A NAME="fields_inherited_from_class_java.lang.Thread"><!-- --></A>
206 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
\r
207 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
\r
208 <TD><B>Fields inherited from class java.lang.Thread</B></TD>
\r
210 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
211 <TD><CODE>MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY</CODE></TD>
\r
215 <!-- ======== CONSTRUCTOR SUMMARY ======== -->
\r
217 <A NAME="constructor_summary"><!-- --></A>
218 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
\r
219 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
\r
220 <TD COLSPAN=2><FONT SIZE="+2">
\r
221 <B>Constructor Summary</B></FONT></TD>
\r
223 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
224 <TD><CODE><B><A HREF="../../../../../../com/sun/speech/engine/synthesis/text/TextSynthesizer.OutputHandler.html#TextSynthesizer.OutputHandler()">TextSynthesizer.OutputHandler</A></B>()</CODE>
\r
227 Class constructor.</TD>
\r
231 <!-- ========== METHOD SUMMARY =========== -->
\r
233 <A NAME="method_summary"><!-- --></A>
234 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
\r
235 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
\r
236 <TD COLSPAN=2><FONT SIZE="+2">
\r
237 <B>Method Summary</B></FONT></TD>
\r
239 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
240 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
241 <CODE> void</CODE></FONT></TD>
\r
242 <TD><CODE><B><A HREF="../../../../../../com/sun/speech/engine/synthesis/text/TextSynthesizer.OutputHandler.html#appendQueue(com.sun.speech.engine.synthesis.text.TextSynthesizerQueueItem)">appendQueue</A></B>(<A HREF="../../../../../../com/sun/speech/engine/synthesis/text/TextSynthesizerQueueItem.html" title="class in com.sun.speech.engine.synthesis.text">TextSynthesizerQueueItem</A> item)</CODE>
\r
245 Adds an item to be spoken to the output queue.</TD>
\r
247 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
248 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
249 <CODE>protected void</CODE></FONT></TD>
\r
250 <TD><CODE><B><A HREF="../../../../../../com/sun/speech/engine/synthesis/text/TextSynthesizer.OutputHandler.html#cancelAllItems()">cancelAllItems</A></B>()</CODE>
\r
253 Cancels all items.</TD>
\r
255 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
256 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
257 <CODE>protected void</CODE></FONT></TD>
\r
258 <TD><CODE><B><A HREF="../../../../../../com/sun/speech/engine/synthesis/text/TextSynthesizer.OutputHandler.html#cancelItem()">cancelItem</A></B>()</CODE>
\r
261 Cancels the current item.</TD>
\r
263 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
264 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
265 <CODE>protected void</CODE></FONT></TD>
\r
266 <TD><CODE><B><A HREF="../../../../../../com/sun/speech/engine/synthesis/text/TextSynthesizer.OutputHandler.html#cancelItem(int)">cancelItem</A></B>(int cancelType)</CODE>
\r
269 Cancels all or just the current item.</TD>
\r
271 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
272 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
273 <CODE>protected void</CODE></FONT></TD>
\r
274 <TD><CODE><B><A HREF="../../../../../../com/sun/speech/engine/synthesis/text/TextSynthesizer.OutputHandler.html#cancelItem(java.lang.Object)">cancelItem</A></B>(java.lang.Object source)</CODE>
\r
277 Cancels the given item.</TD>
\r
279 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
280 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
281 <CODE> java.util.Enumeration</CODE></FONT></TD>
\r
282 <TD><CODE><B><A HREF="../../../../../../com/sun/speech/engine/synthesis/text/TextSynthesizer.OutputHandler.html#enumerateQueue()">enumerateQueue</A></B>()</CODE>
\r
285 Returns the current queue.</TD>
\r
287 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
288 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
289 <CODE>protected <A HREF="../../../../../../com/sun/speech/engine/synthesis/text/TextSynthesizerQueueItem.html" title="class in com.sun.speech.engine.synthesis.text">TextSynthesizerQueueItem</A></CODE></FONT></TD>
\r
290 <TD><CODE><B><A HREF="../../../../../../com/sun/speech/engine/synthesis/text/TextSynthesizer.OutputHandler.html#getQueueItem()">getQueueItem</A></B>()</CODE>
\r
293 Returns, but does not remove, the first item on the queue.</TD>
\r
295 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
296 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
297 <CODE>protected boolean</CODE></FONT></TD>
\r
298 <TD><CODE><B><A HREF="../../../../../../com/sun/speech/engine/synthesis/text/TextSynthesizer.OutputHandler.html#isCommand(java.lang.String, int)">isCommand</A></B>(java.lang.String engineText,
299 int index)</CODE>
\r
302 Determines if the next thing in line is a command.</TD>
\r
304 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
305 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
306 <CODE> boolean</CODE></FONT></TD>
\r
307 <TD><CODE><B><A HREF="../../../../../../com/sun/speech/engine/synthesis/text/TextSynthesizer.OutputHandler.html#isQueueEmpty()">isQueueEmpty</A></B>()</CODE>
\r
310 Determines if the queue is empty.</TD>
\r
312 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
313 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
314 <CODE>protected boolean</CODE></FONT></TD>
\r
315 <TD><CODE><B><A HREF="../../../../../../com/sun/speech/engine/synthesis/text/TextSynthesizer.OutputHandler.html#isWhitespace(java.lang.String, int)">isWhitespace</A></B>(java.lang.String engineText,
316 int index)</CODE>
\r
319 Determines if there is whitespace at the current index.</TD>
\r
321 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
322 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
323 <CODE>protected int</CODE></FONT></TD>
\r
324 <TD><CODE><B><A HREF="../../../../../../com/sun/speech/engine/synthesis/text/TextSynthesizer.OutputHandler.html#outputItem(com.sun.speech.engine.synthesis.text.TextSynthesizerQueueItem)">outputItem</A></B>(<A HREF="../../../../../../com/sun/speech/engine/synthesis/text/TextSynthesizerQueueItem.html" title="class in com.sun.speech.engine.synthesis.text">TextSynthesizerQueueItem</A> item)</CODE>
\r
327 Starts outputting the item. </TD>
\r
329 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
330 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
331 <CODE>protected void</CODE></FONT></TD>
\r
332 <TD><CODE><B><A HREF="../../../../../../com/sun/speech/engine/synthesis/text/TextSynthesizer.OutputHandler.html#pauseItem()">pauseItem</A></B>()</CODE>
\r
335 Pauses the output.</TD>
\r
337 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
338 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
339 <CODE>protected int</CODE></FONT></TD>
\r
340 <TD><CODE><B><A HREF="../../../../../../com/sun/speech/engine/synthesis/text/TextSynthesizer.OutputHandler.html#processCommand(com.sun.speech.engine.synthesis.text.TextSynthesizerQueueItem, java.lang.String, int)">processCommand</A></B>(<A HREF="../../../../../../com/sun/speech/engine/synthesis/text/TextSynthesizerQueueItem.html" title="class in com.sun.speech.engine.synthesis.text">TextSynthesizerQueueItem</A> item,
341 java.lang.String engineText,
342 int index)</CODE>
\r
345 Attempts to process a command starting at the next character
346 in the synthesizer text. </TD>
\r
348 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
349 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
350 <CODE>protected int</CODE></FONT></TD>
\r
351 <TD><CODE><B><A HREF="../../../../../../com/sun/speech/engine/synthesis/text/TextSynthesizer.OutputHandler.html#processNormalText(com.sun.speech.engine.synthesis.text.TextSynthesizerQueueItem, java.lang.String, int)">processNormalText</A></B>(<A HREF="../../../../../../com/sun/speech/engine/synthesis/text/TextSynthesizerQueueItem.html" title="class in com.sun.speech.engine.synthesis.text">TextSynthesizerQueueItem</A> item,
352 java.lang.String engineText,
353 int index)</CODE>
\r
356 Processes next set of characters in output up to whitespace
357 or next '/' that could indicate the start of a command.</TD>
\r
359 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
360 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
361 <CODE>protected int</CODE></FONT></TD>
\r
362 <TD><CODE><B><A HREF="../../../../../../com/sun/speech/engine/synthesis/text/TextSynthesizer.OutputHandler.html#processWhitespace(java.lang.String, int)">processWhitespace</A></B>(java.lang.String engineText,
363 int index)</CODE>
\r
366 Processes whitespace at the current index in the synthesizer text.
369 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
370 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
371 <CODE>protected void</CODE></FONT></TD>
\r
372 <TD><CODE><B><A HREF="../../../../../../com/sun/speech/engine/synthesis/text/TextSynthesizer.OutputHandler.html#resumeItem()">resumeItem</A></B>()</CODE>
\r
375 Resumes the output.</TD>
\r
377 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
378 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
379 <CODE> void</CODE></FONT></TD>
\r
380 <TD><CODE><B><A HREF="../../../../../../com/sun/speech/engine/synthesis/text/TextSynthesizer.OutputHandler.html#run()">run</A></B>()</CODE>
\r
383 Controls output of text until terminate is called.</TD>
\r
385 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
386 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
387 <CODE> void</CODE></FONT></TD>
\r
388 <TD><CODE><B><A HREF="../../../../../../com/sun/speech/engine/synthesis/text/TextSynthesizer.OutputHandler.html#terminate()">terminate</A></B>()</CODE>
\r
391 Stops execution of the Thread.</TD>
\r
394 <A NAME="methods_inherited_from_class_java.lang.Thread"><!-- --></A>
395 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
\r
396 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
\r
397 <TD><B>Methods inherited from class java.lang.Thread</B></TD>
\r
399 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
400 <TD><CODE>activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield</CODE></TD>
\r
403 <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
404 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
\r
405 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
\r
406 <TD><B>Methods inherited from class java.lang.Object</B></TD>
\r
408 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
409 <TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait</CODE></TD>
\r
415 <!-- ============ FIELD DETAIL =========== -->
\r
417 <A NAME="field_detail"><!-- --></A>
418 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
\r
419 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
\r
420 <TD COLSPAN=1><FONT SIZE="+2">
\r
421 <B>Field Detail</B></FONT></TD>
\r
425 <A NAME="done"><!-- --></A><H3>
\r
428 protected boolean <B>done</B></PRE>
\r
435 <A NAME="queue"><!-- --></A><H3>
\r
438 protected java.util.Vector <B>queue</B></PRE>
\r
440 <DD>Internal speech output queue that will contain a set of
441 TextSynthesizerQueueItems.
\r
444 <DT><B>See Also:</B><DD><A HREF="../../../../../../com/sun/speech/engine/synthesis/BaseSynthesizerQueueItem.html" title="class in com.sun.speech.engine.synthesis"><CODE>BaseSynthesizerQueueItem</CODE></A></DL>
\r
448 <A NAME="currentItemLock"><!-- --></A><H3>
\r
449 currentItemLock</H3>
\r
451 protected java.lang.Object <B>currentItemLock</B></PRE>
\r
453 <DD>Object to lock on for setting the current item.
\r
460 <A NAME="command"><!-- --></A><H3>
\r
463 protected int <B>command</B></PRE>
\r
465 <DD>For the item at the top of the queue, the output command reflects
466 whether item should be PAUSE, RESUME, CANCEL.
\r
473 <A NAME="PAUSE"><!-- --></A><H3>
\r
476 protected static final int <B>PAUSE</B></PRE>
\r
479 <DT><B>See Also:</B><DD><A HREF="../../../../../../constant-values.html#com.sun.speech.engine.synthesis.text.TextSynthesizer.OutputHandler.PAUSE">Constant Field Values</A></DL>
\r
483 <A NAME="RESUME"><!-- --></A><H3>
\r
486 protected static final int <B>RESUME</B></PRE>
\r
489 <DT><B>See Also:</B><DD><A HREF="../../../../../../constant-values.html#com.sun.speech.engine.synthesis.text.TextSynthesizer.OutputHandler.RESUME">Constant Field Values</A></DL>
\r
493 <A NAME="CANCEL"><!-- --></A><H3>
\r
496 protected static final int <B>CANCEL</B></PRE>
\r
499 <DT><B>See Also:</B><DD><A HREF="../../../../../../constant-values.html#com.sun.speech.engine.synthesis.text.TextSynthesizer.OutputHandler.CANCEL">Constant Field Values</A></DL>
\r
503 <A NAME="CANCEL_ALL"><!-- --></A><H3>
\r
506 protected static final int <B>CANCEL_ALL</B></PRE>
\r
509 <DT><B>See Also:</B><DD><A HREF="../../../../../../constant-values.html#com.sun.speech.engine.synthesis.text.TextSynthesizer.OutputHandler.CANCEL_ALL">Constant Field Values</A></DL>
\r
513 <A NAME="CANCEL_COMPLETE"><!-- --></A><H3>
\r
514 CANCEL_COMPLETE</H3>
\r
516 protected static final int <B>CANCEL_COMPLETE</B></PRE>
\r
519 <DT><B>See Also:</B><DD><A HREF="../../../../../../constant-values.html#com.sun.speech.engine.synthesis.text.TextSynthesizer.OutputHandler.CANCEL_COMPLETE">Constant Field Values</A></DL>
\r
523 <A NAME="commandLock"><!-- --></A><H3>
\r
526 protected java.lang.Object <B>commandLock</B></PRE>
\r
528 <DD>Object on which accesses to the command must synchronize.
\r
534 <!-- ========= CONSTRUCTOR DETAIL ======== -->
\r
536 <A NAME="constructor_detail"><!-- --></A>
537 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
\r
538 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
\r
539 <TD COLSPAN=1><FONT SIZE="+2">
\r
540 <B>Constructor Detail</B></FONT></TD>
\r
544 <A NAME="TextSynthesizer.OutputHandler()"><!-- --></A><H3>
\r
545 TextSynthesizer.OutputHandler</H3>
\r
547 public <B>TextSynthesizer.OutputHandler</B>()</PRE>
\r
549 <DD>Class constructor.
\r
553 <!-- ============ METHOD DETAIL ========== -->
\r
555 <A NAME="method_detail"><!-- --></A>
556 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
\r
557 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
\r
558 <TD COLSPAN=1><FONT SIZE="+2">
\r
559 <B>Method Detail</B></FONT></TD>
\r
563 <A NAME="terminate()"><!-- --></A><H3>
\r
566 public void <B>terminate</B>()</PRE>
\r
568 <DD>Stops execution of the Thread.
\r
576 <A NAME="enumerateQueue()"><!-- --></A><H3>
\r
577 enumerateQueue</H3>
\r
579 public java.util.Enumeration <B>enumerateQueue</B>()</PRE>
\r
581 <DD>Returns the current queue.
\r
585 <DT><B>Returns:</B><DD>the current queue</DL>
\r
590 <A NAME="isQueueEmpty()"><!-- --></A><H3>
\r
593 public boolean <B>isQueueEmpty</B>()</PRE>
\r
595 <DD>Determines if the queue is empty.
\r
599 <DT><B>Returns:</B><DD><code>true</code> if the queue is empty</DL>
\r
604 <A NAME="appendQueue(com.sun.speech.engine.synthesis.text.TextSynthesizerQueueItem)"><!-- --></A><H3>
\r
607 public void <B>appendQueue</B>(<A HREF="../../../../../../com/sun/speech/engine/synthesis/text/TextSynthesizerQueueItem.html" title="class in com.sun.speech.engine.synthesis.text">TextSynthesizerQueueItem</A> item)</PRE>
\r
609 <DD>Adds an item to be spoken to the output queue.
\r
612 <DT><B>Parameters:</B><DD><CODE>item</CODE> - the item to be added</DL>
\r
617 <A NAME="cancelItem()"><!-- --></A><H3>
\r
620 protected void <B>cancelItem</B>()</PRE>
\r
622 <DD>Cancels the current item.
\r
630 <A NAME="cancelAllItems()"><!-- --></A><H3>
\r
631 cancelAllItems</H3>
\r
633 protected void <B>cancelAllItems</B>()</PRE>
\r
635 <DD>Cancels all items.
\r
643 <A NAME="cancelItem(int)"><!-- --></A><H3>
\r
646 protected void <B>cancelItem</B>(int cancelType)</PRE>
\r
648 <DD>Cancels all or just the current item.
\r
651 <DT><B>Parameters:</B><DD><CODE>cancelType</CODE> - <code>CANCEL</code> or <code>CANCEL_ALL</code></DL>
\r
656 <A NAME="cancelItem(java.lang.Object)"><!-- --></A><H3>
\r
659 protected void <B>cancelItem</B>(java.lang.Object source)</PRE>
\r
661 <DD>Cancels the given item.
\r
664 <DT><B>Parameters:</B><DD><CODE>source</CODE> - the item to cancel</DL>
\r
669 <A NAME="pauseItem()"><!-- --></A><H3>
\r
672 protected void <B>pauseItem</B>()</PRE>
\r
674 <DD>Pauses the output.
\r
682 <A NAME="resumeItem()"><!-- --></A><H3>
\r
685 protected void <B>resumeItem</B>()</PRE>
\r
687 <DD>Resumes the output.
\r
695 <A NAME="run()"><!-- --></A><H3>
\r
698 public void <B>run</B>()</PRE>
\r
700 <DD>Controls output of text until terminate is called.
\r
703 <DT><B>See Also:</B><DD><A HREF="../../../../../../com/sun/speech/engine/synthesis/text/TextSynthesizer.OutputHandler.html#terminate()"><CODE>terminate()</CODE></A></DL>
\r
708 <A NAME="getQueueItem()"><!-- --></A><H3>
\r
711 protected <A HREF="../../../../../../com/sun/speech/engine/synthesis/text/TextSynthesizerQueueItem.html" title="class in com.sun.speech.engine.synthesis.text">TextSynthesizerQueueItem</A> <B>getQueueItem</B>()</PRE>
\r
713 <DD>Returns, but does not remove, the first item on the queue.
\r
717 <DT><B>Returns:</B><DD>the first item on the queue</DL>
\r
722 <A NAME="outputItem(com.sun.speech.engine.synthesis.text.TextSynthesizerQueueItem)"><!-- --></A><H3>
\r
725 protected int <B>outputItem</B>(<A HREF="../../../../../../com/sun/speech/engine/synthesis/text/TextSynthesizerQueueItem.html" title="class in com.sun.speech.engine.synthesis.text">TextSynthesizerQueueItem</A> item)</PRE>
\r
727 <DD>Starts outputting the item. Returns the current command.
\r
730 <DT><B>Parameters:</B><DD><CODE>item</CODE> - to be output
731 <DT><B>Returns:</B><DD>the current command</DL>
\r
736 <A NAME="isCommand(java.lang.String, int)"><!-- --></A><H3>
\r
739 protected boolean <B>isCommand</B>(java.lang.String engineText,
740 int index)</PRE>
\r
742 <DD>Determines if the next thing in line is a command.
\r
745 <DT><B>Parameters:</B><DD><CODE>engineText</CODE> - the text containing embedded commands<DD><CODE>index</CODE> - the current index
746 <DT><B>Returns:</B><DD><code>true</code> if the next thing in line is a command</DL>
\r
751 <A NAME="processCommand(com.sun.speech.engine.synthesis.text.TextSynthesizerQueueItem, java.lang.String, int)"><!-- --></A><H3>
\r
752 processCommand</H3>
\r
754 protected int <B>processCommand</B>(<A HREF="../../../../../../com/sun/speech/engine/synthesis/text/TextSynthesizerQueueItem.html" title="class in com.sun.speech.engine.synthesis.text">TextSynthesizerQueueItem</A> item,
755 java.lang.String engineText,
756 int index)</PRE>
\r
758 <DD>Attempts to process a command starting at the next character
759 in the synthesizer text. Returns the new index.
\r
762 <DT><B>Parameters:</B><DD><CODE>item</CODE> - the current queue item<DD><CODE>engineText</CODE> - the text containing embedded commands<DD><CODE>index</CODE> - the current index
763 <DT><B>Returns:</B><DD>the new index</DL>
\r
768 <A NAME="isWhitespace(java.lang.String, int)"><!-- --></A><H3>
\r
771 protected boolean <B>isWhitespace</B>(java.lang.String engineText,
772 int index)</PRE>
\r
774 <DD>Determines if there is whitespace at the current index.
\r
777 <DT><B>Parameters:</B><DD><CODE>engineText</CODE> - the text containing embedded commands<DD><CODE>index</CODE> - the current index
778 <DT><B>Returns:</B><DD><code>true</code> if there is whitespace at the
784 <A NAME="processWhitespace(java.lang.String, int)"><!-- --></A><H3>
\r
785 processWhitespace</H3>
\r
787 protected int <B>processWhitespace</B>(java.lang.String engineText,
788 int index)</PRE>
\r
790 <DD>Processes whitespace at the current index in the synthesizer text.
791 If next character is not whitespace, does nothing.
792 If next character is whitespace, displays it and pauses
793 briefly to simulate the speaking rate.
\r
796 <DT><B>Parameters:</B><DD><CODE>engineText</CODE> - the text containing embedded commands<DD><CODE>index</CODE> - the current index
797 <DT><B>Returns:</B><DD>the new index</DL>
\r
802 <A NAME="processNormalText(com.sun.speech.engine.synthesis.text.TextSynthesizerQueueItem, java.lang.String, int)"><!-- --></A><H3>
\r
803 processNormalText</H3>
\r
805 protected int <B>processNormalText</B>(<A HREF="../../../../../../com/sun/speech/engine/synthesis/text/TextSynthesizerQueueItem.html" title="class in com.sun.speech.engine.synthesis.text">TextSynthesizerQueueItem</A> item,
806 java.lang.String engineText,
807 int index)</PRE>
\r
809 <DD>Processes next set of characters in output up to whitespace
810 or next '/' that could indicate the start of a command.
\r
813 <DT><B>Parameters:</B><DD><CODE>item</CODE> - the current queue item<DD><CODE>engineText</CODE> - the text containing embedded commands<DD><CODE>index</CODE> - the current index
814 <DT><B>Returns:</B><DD>the new index</DL>
\r
817 <!-- ========= END OF CLASS DATA ========= -->
\r
821 <!-- ======= START OF BOTTOM NAVBAR ====== -->
\r
822 <A NAME="navbar_bottom"><!-- --></A>
823 <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
824 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
\r
826 <TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
\r
827 <A NAME="navbar_bottom_firstrow"><!-- --></A>
828 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
\r
829 <TR ALIGN="center" VALIGN="top">
\r
830 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
\r
831 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
\r
832 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
\r
833 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
\r
834 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
\r
835 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
\r
836 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
\r
840 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
\r
846 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
\r
847 <A HREF="../../../../../../com/sun/speech/engine/synthesis/text/TextSynthesizer.html" title="class in com.sun.speech.engine.synthesis.text"><B>PREV CLASS</B></A>
\r
848 <A HREF="../../../../../../com/sun/speech/engine/synthesis/text/TextSynthesizerModeDesc.html" title="class in com.sun.speech.engine.synthesis.text"><B>NEXT CLASS</B></A></FONT></TD>
\r
849 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
\r
850 <A HREF="../../../../../../index.html" target="_top"><B>FRAMES</B></A>
\r
851 <A HREF="TextSynthesizer.OutputHandler.html" target="_top"><B>NO FRAMES</B></A>
\r
852 <SCRIPT type="text/javascript">
\r
855 document.writeln('<A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
\r
860 <A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>
\r
866 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
\r
867 SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
\r
868 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
\r
869 DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
\r
872 <A NAME="skip-navbar_bottom"></A>
873 <!-- ======== END OF BOTTOM NAVBAR ======= -->
\r