1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
5 <!-- Generated by javadoc (build 1.5.0_09) on Sun Sep 02 23:07:09 BST 2007 -->
7 TextMenu (leJOS NXT API documentation)
10 <META NAME="keywords" CONTENT="lejos.nxt.TextMenu class">
12 <LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style">
14 <SCRIPT type="text/javascript">
15 function windowTitle()
17 parent.document.title="TextMenu (leJOS NXT API documentation)";
25 <BODY BGCOLOR="white" onload="windowTitle();">
28 <!-- ========= START OF TOP NAVBAR ======= -->
29 <A NAME="navbar_top"><!-- --></A>
30 <A HREF="#skip-navbar_top" title="Skip navigation links"></A>
31 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
33 <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
34 <A NAME="navbar_top_firstrow"><!-- --></A>
35 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
36 <TR ALIGN="center" VALIGN="top">
37 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
38 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
39 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
40 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
41 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
42 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
43 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
47 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
53 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
54 <A HREF="../../lejos/nxt/SoundSensor.html" title="class in lejos.nxt"><B>PREV CLASS</B></A>
55 <A HREF="../../lejos/nxt/TiltSensor.html" title="class in lejos.nxt"><B>NEXT CLASS</B></A></FONT></TD>
56 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
57 <A HREF="../../index.html?lejos/nxt/TextMenu.html" target="_top"><B>FRAMES</B></A>
58 <A HREF="TextMenu.html" target="_top"><B>NO FRAMES</B></A>
59 <SCRIPT type="text/javascript">
62 document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');
67 <A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>
74 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
75 SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
76 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
77 DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
80 <A NAME="skip-navbar_top"></A>
81 <!-- ========= END OF TOP NAVBAR ========= -->
84 <!-- ======== START OF CLASS DATA ======== -->
91 <A HREF="../../java/lang/Object.html" title="class in java.lang">java.lang.Object</A>
92 <IMG SRC="../../resources/inherit.gif" ALT="extended by "><B>lejos.nxt.TextMenu</B>
96 <DT><PRE>public class <B>TextMenu</B><DT>extends <A HREF="../../java/lang/Object.html" title="class in java.lang">Object</A></DL>
100 Displays a list of items. The select() method allows the user to scroll the list using the right and left keys to scroll forward and backward
101 through the list. The location of the list , and an optional title can be specified.
106 <DT><B>Author:</B></DT>
107 <DD>Roger Glassey Feb 20, 2007</DD>
112 <!-- =========== FIELD SUMMARY =========== -->
114 <A NAME="field_summary"><!-- --></A>
115 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
116 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
117 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
118 <B>Field Summary</B></FONT></TH>
120 <TR BGCOLOR="white" CLASS="TableRowColor">
121 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
122 <CODE>static <A HREF="../../java/lang/String.html" title="class in java.lang">String</A></CODE></FONT></TD>
123 <TD><CODE><B><A HREF="../../lejos/nxt/TextMenu.html#blank">blank</A></B></CODE>
126 a blank line</TD>
130 <!-- ======== CONSTRUCTOR SUMMARY ======== -->
132 <A NAME="constructor_summary"><!-- --></A>
133 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
134 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
135 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
136 <B>Constructor Summary</B></FONT></TH>
138 <TR BGCOLOR="white" CLASS="TableRowColor">
139 <TD><CODE><B><A HREF="../../lejos/nxt/TextMenu.html#TextMenu(java.lang.String[])">TextMenu</A></B>(<A HREF="../../java/lang/String.html" title="class in java.lang">String</A>[] items)</CODE>
142 This constructor sets location of the top row of the item list to row 0 of the display.</TD>
144 <TR BGCOLOR="white" CLASS="TableRowColor">
145 <TD><CODE><B><A HREF="../../lejos/nxt/TextMenu.html#TextMenu(java.lang.String[], int)">TextMenu</A></B>(<A HREF="../../java/lang/String.html" title="class in java.lang">String</A>[] items,
146 int topRow)</CODE>
149 This constructor allows specification location of the item list .</TD>
151 <TR BGCOLOR="white" CLASS="TableRowColor">
152 <TD><CODE><B><A HREF="../../lejos/nxt/TextMenu.html#TextMenu(java.lang.String[], int, java.lang.String)">TextMenu</A></B>(<A HREF="../../java/lang/String.html" title="class in java.lang">String</A>[] items,
154 <A HREF="../../java/lang/String.html" title="class in java.lang">String</A> title)</CODE>
157 This constuctor allows the specfication of a title (of up to 16 characters) and the location of the item list <br>
158 The title is displayed in the row above the item lise.</TD>
162 <!-- ========== METHOD SUMMARY =========== -->
164 <A NAME="method_summary"><!-- --></A>
165 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
166 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
167 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
168 <B>Method Summary</B></FONT></TH>
170 <TR BGCOLOR="white" CLASS="TableRowColor">
171 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
172 <CODE> void</CODE></FONT></TD>
173 <TD><CODE><B><A HREF="../../lejos/nxt/TextMenu.html#quit()">quit</A></B>()</CODE>
176 method to call from another thread to quit the menu</TD>
178 <TR BGCOLOR="white" CLASS="TableRowColor">
179 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
180 <CODE> int</CODE></FONT></TD>
181 <TD><CODE><B><A HREF="../../lejos/nxt/TextMenu.html#select()">select</A></B>()</CODE>
184 Allows the user to scroll through the items, using the right and left buttons (forward and back) The Enter key closes the menu <br>
185 and returns the index of the selected item.</TD>
187 <TR BGCOLOR="white" CLASS="TableRowColor">
188 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
189 <CODE> void</CODE></FONT></TD>
190 <TD><CODE><B><A HREF="../../lejos/nxt/TextMenu.html#setItems(java.lang.String[])">setItems</A></B>(<A HREF="../../java/lang/String.html" title="class in java.lang">String</A>[] items)</CODE>
193 set the array of items to be displayed</TD>
195 <TR BGCOLOR="white" CLASS="TableRowColor">
196 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
197 <CODE> void</CODE></FONT></TD>
198 <TD><CODE><B><A HREF="../../lejos/nxt/TextMenu.html#setTitle(java.lang.String)">setTitle</A></B>(<A HREF="../../java/lang/String.html" title="class in java.lang">String</A> title)</CODE>
201 set menu title.</TD>
204 <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
205 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
206 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
207 <TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="../../java/lang/Object.html" title="class in java.lang">Object</A></B></TH>
209 <TR BGCOLOR="white" CLASS="TableRowColor">
210 <TD><CODE><A HREF="../../java/lang/Object.html#equals(java.lang.Object)">equals</A>, <A HREF="../../java/lang/Object.html#getClass()">getClass</A>, <A HREF="../../java/lang/Object.html#hashCode()">hashCode</A>, <A HREF="../../java/lang/Object.html#notify()">notify</A>, <A HREF="../../java/lang/Object.html#notifyAll()">notifyAll</A>, <A HREF="../../java/lang/Object.html#toString()">toString</A>, <A HREF="../../java/lang/Object.html#wait()">wait</A>, <A HREF="../../java/lang/Object.html#wait(long)">wait</A></CODE></TD>
216 <!-- ============ FIELD DETAIL =========== -->
218 <A NAME="field_detail"><!-- --></A>
219 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
220 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
221 <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
222 <B>Field Detail</B></FONT></TH>
226 <A NAME="blank"><!-- --></A><H3>
229 public static <A HREF="../../java/lang/String.html" title="class in java.lang">String</A> <B>blank</B></PRE>
237 <!-- ========= CONSTRUCTOR DETAIL ======== -->
239 <A NAME="constructor_detail"><!-- --></A>
240 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
241 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
242 <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
243 <B>Constructor Detail</B></FONT></TH>
247 <A NAME="TextMenu(java.lang.String[])"><!-- --></A><H3>
250 public <B>TextMenu</B>(<A HREF="../../java/lang/String.html" title="class in java.lang">String</A>[] items)</PRE>
252 <DD>This constructor sets location of the top row of the item list to row 0 of the display.
257 <A NAME="TextMenu(java.lang.String[], int)"><!-- --></A><H3>
260 public <B>TextMenu</B>(<A HREF="../../java/lang/String.html" title="class in java.lang">String</A>[] items,
261 int topRow)</PRE>
263 <DD>This constructor allows specification location of the item list .
268 <A NAME="TextMenu(java.lang.String[], int, java.lang.String)"><!-- --></A><H3>
271 public <B>TextMenu</B>(<A HREF="../../java/lang/String.html" title="class in java.lang">String</A>[] items,
273 <A HREF="../../java/lang/String.html" title="class in java.lang">String</A> title)</PRE>
275 <DD>This constuctor allows the specfication of a title (of up to 16 characters) and the location of the item list <br>
276 The title is displayed in the row above the item lise.
279 <DT><B>Parameters:</B><DD><CODE>items</CODE> - - string array containing the menu items. No items beyond the first null will be displayed.</DL>
282 <!-- ============ METHOD DETAIL ========== -->
284 <A NAME="method_detail"><!-- --></A>
285 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
286 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
287 <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
288 <B>Method Detail</B></FONT></TH>
292 <A NAME="setTitle(java.lang.String)"><!-- --></A><H3>
295 public void <B>setTitle</B>(<A HREF="../../java/lang/String.html" title="class in java.lang">String</A> title)</PRE>
300 <DT><B>Parameters:</B><DD><CODE>title</CODE> - the new title</DL>
305 <A NAME="setItems(java.lang.String[])"><!-- --></A><H3>
308 public void <B>setItems</B>(<A HREF="../../java/lang/String.html" title="class in java.lang">String</A>[] items)</PRE>
310 <DD>set the array of items to be displayed
313 <DT><B>Parameters:</B><DD><CODE>items</CODE> - </DL>
318 <A NAME="select()"><!-- --></A><H3>
321 public int <B>select</B>()</PRE>
323 <DD>Allows the user to scroll through the items, using the right and left buttons (forward and back) The Enter key closes the menu <br>
324 and returns the index of the selected item. <br>
325 The menu display wraps items that scroll off the top will reappear on the bottom and vice versa.
329 <DT><B>Returns:</B><DD>the index of the selected item</DL>
334 <A NAME="quit()"><!-- --></A><H3>
337 public void <B>quit</B>()</PRE>
339 <DD>method to call from another thread to quit the menu
345 <!-- ========= END OF CLASS DATA ========= -->
349 <!-- ======= START OF BOTTOM NAVBAR ====== -->
350 <A NAME="navbar_bottom"><!-- --></A>
351 <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
352 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
354 <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
355 <A NAME="navbar_bottom_firstrow"><!-- --></A>
356 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
357 <TR ALIGN="center" VALIGN="top">
358 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
359 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
360 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
361 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
362 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
363 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
364 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
368 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
374 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
375 <A HREF="../../lejos/nxt/SoundSensor.html" title="class in lejos.nxt"><B>PREV CLASS</B></A>
376 <A HREF="../../lejos/nxt/TiltSensor.html" title="class in lejos.nxt"><B>NEXT CLASS</B></A></FONT></TD>
377 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
378 <A HREF="../../index.html?lejos/nxt/TextMenu.html" target="_top"><B>FRAMES</B></A>
379 <A HREF="TextMenu.html" target="_top"><B>NO FRAMES</B></A>
380 <SCRIPT type="text/javascript">
383 document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');
388 <A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>
395 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
396 SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
397 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
398 DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
401 <A NAME="skip-navbar_bottom"></A>
402 <!-- ======== END OF BOTTOM NAVBAR ======= -->