|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.bluemarsh.jswat.ui.GraphicalInputAdapter
Class GraphicalInputAdapter is responsible for providing the input to a debuggee process through a text field. This class uses the ActionListener interface to catch text field action events. Unfortunately, this has two disadvantages:
Fortunately, Java's method for reading from standard input matches exactly the behavior we replicate. How convenient...
For this class to operate correctly it must be added as a session listener.
Field Summary | |
protected javax.swing.JTextField |
inputField
Text area displaying the messages. |
protected java.io.OutputStreamWriter |
inputWriter
Output stream writer to write to the debuggee's stdin. |
Constructor Summary | |
GraphicalInputAdapter()
Constructs a GraphicalInputAdapter with the default text field. |
Method Summary | |
void |
actionPerformed(java.awt.event.ActionEvent event)
Invoked when user hits Enter in the input text field. |
void |
activate(Session session)
Called when the Session is about to begin an active debugging session. |
void |
close(Session session)
Called when the Session is about to close down. |
void |
deactivate(Session session)
Called when the Session is about to end an active debugging session. |
javax.swing.JComponent |
getUI()
Returns a reference to the UI component. |
void |
init(Session session)
Called after the Session has added this listener to the Session listener list. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected javax.swing.JTextField inputField
protected java.io.OutputStreamWriter inputWriter
Constructor Detail |
public GraphicalInputAdapter()
Method Detail |
public void actionPerformed(java.awt.event.ActionEvent event)
actionPerformed
in interface java.awt.event.ActionListener
event
- Action event.public void activate(Session session)
activate
in interface SessionListener
session
- Session being activated.public void close(Session session)
close
in interface SessionListener
session
- Session being closed.public void deactivate(Session session)
deactivate
in interface SessionListener
session
- Session being deactivated.public javax.swing.JComponent getUI()
public void init(Session session)
init
in interface SessionListener
session
- Session adding this listener.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |