|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.bluemarsh.jswat.ui.GraphicalCommandAdapter
Class GraphicalCommandAdapter adapts the input from a text field and sends that input to the CommandManager.
Field Summary | |
protected CommandManager |
commandManager
Where input is sent. |
protected java.lang.String |
inputBeforeScroll
The text in the command input field when the user started scrolling through the command history. |
protected javax.swing.JTextField |
inputField
Where input comes from. |
protected Log |
outputLog
Log to which we print the typed commands for reference. |
Constructor Summary | |
GraphicalCommandAdapter(javax.swing.JTextField input,
CommandManager cmdman,
Log log)
Constructs a GraphicalCommandAdapter that connects the given input field to the given command manager. |
Method Summary | |
void |
actionPerformed(java.awt.event.ActionEvent event)
Text field was activated by user. |
void |
keyPressed(java.awt.event.KeyEvent event)
Invoked when a key has been pressed in the input field. |
void |
keyReleased(java.awt.event.KeyEvent event)
Ignored. |
void |
keyTyped(java.awt.event.KeyEvent event)
Ignored. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected CommandManager commandManager
protected javax.swing.JTextField inputField
protected java.lang.String inputBeforeScroll
protected Log outputLog
Constructor Detail |
public GraphicalCommandAdapter(javax.swing.JTextField input, CommandManager cmdman, Log log)
input
- input field.cmdman
- CommandManager to send input to.log
- Log to print to.Method Detail |
public void actionPerformed(java.awt.event.ActionEvent event)
actionPerformed
in interface java.awt.event.ActionListener
event
- ActionEventpublic void keyPressed(java.awt.event.KeyEvent event)
keyPressed
in interface java.awt.event.KeyListener
event
- Key event.public void keyReleased(java.awt.event.KeyEvent event)
keyReleased
in interface java.awt.event.KeyListener
public void keyTyped(java.awt.event.KeyEvent event)
keyTyped
in interface java.awt.event.KeyListener
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |