|
sdr 0.7 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.cscott.sdr.CommandInput
public class CommandInput
CommandInput
implements the communication between some mechanism
for inputting commands (voice recognition, keyboard input, file on disk,
etc) and the rest of the SDR system. In particular, we give the
CommandInput
to the input mechanisms, and our App
class will deal with polling it for commands and feeding them to the
choreography engine and then to the animation system.
Note that a command is actually a lazy list of possible commands, ordered from most-likely to least-likely. We'll try each possibility and take the first one that works.
Nested Class Summary | |
---|---|
static class |
CommandInput.InputMode
Representation of different input modes. |
static class |
CommandInput.PossibleCommand
A CommandInput.PossibleCommand is an Apply corresponding to
the most likely interpretation of the user's input. |
Constructor Summary | |
---|---|
CommandInput()
Create a CommandInput object to synchronize communication between input routines and the choreography engine. |
Method Summary | |
---|---|
void |
addCommand(CommandInput.PossibleCommand c)
Called by input methods (voice recognition, keyboard input, filer readers, etc) when they have another (set of) CommandInput.PossibleCommand (s) to issue. |
CommandInput.PossibleCommand |
getNextCommand()
Called by the main code to get the next command from the input method. |
void |
switchMode(CommandInput.InputMode mode)
Tell the input method that a new set of calls is valid. |
CommandInput.InputMode |
waitForMode()
Get a new input mode, waiting if necessary. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CommandInput()
Method Detail |
---|
public void addCommand(CommandInput.PossibleCommand c)
CommandInput.PossibleCommand
(s) to issue.
public CommandInput.PossibleCommand getNextCommand() throws InterruptedException
InterruptedException
public void switchMode(CommandInput.InputMode mode)
dp
parameter is null, then we are at the main menu, waiting
for a "square up" command.
public CommandInput.InputMode waitForMode()
|
sdr 0.7 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |