Class KeyHandler
java.lang.Object
net.vincent.communidirect.KeyHandler
- All Implemented Interfaces:
ActionListener,EventListener
Listens for action events on the
Command text field
(e.g. the user pressing Enter) and delegates to the command
executor.-
Constructor Summary
ConstructorsConstructorDescriptionKeyHandler(CommuniDirect communiDirect) Creates a handler linked to the given application. -
Method Summary
Modifier and TypeMethodDescriptionvoidInvoked when the user submits a command.
-
Constructor Details
-
KeyHandler
Creates a handler linked to the given application.- Parameters:
communiDirect- the main application instance
-
-
Method Details
-
actionPerformed
Invoked when the user submits a command. Extracts the text from the sourceCommandfield and executes it.- Specified by:
actionPerformedin interfaceActionListener- Parameters:
e- the action event
-