Chapter 7 Text based user interfaces

In this chapter two further styles of user interface will be developed for the Tuttle class. The first interface to be presented is a text menu style of interface, where the Tuttle is controlled from a set of text menus displayed below the drawing area. The menu bar based pull-down menu, from the previous chapter, is not particularly suitable for controlling a tuttle, due to the constant mouse movements required to use it. The text menu style of interface has many of the advantages of a pull-down menu system, but allows the menus to be used from the keyboard without having to continually locate the mouse and use it to navigate the menus.

The second interface style which will be presented in this chapter is a command line system. In this interface style the user is presented with an empty text input area and is expected to learn and remember the commands, and their syntax, which the tuttle will respond to. This style of interface is the most difficult to learn but it can be the most powerful for an experienced user to operate. It is also the traditional style of interface for a Logo style turtle.

In order to implement these interfaces the Tuttle class from Chapter 4 will be extended to produce a TextTuttle class which will accept and process commands passed to it as Strings. The advantages of this refinement for the text menu style of interface may not be immediately obvious, however when the Tuttle hierarchy is further extended in the following chapter the advantages will become clearer.


7.1 The TextTuttle class

Table of Contents.




A Java GUI programmer's primer
Java GUI Programmers Primer, A
ISBN: 0139088490
EAN: 2147483647
Year: 1998
Pages: 85
Authors: Fintan Culwin

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net