|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectlij.monitor.Monitor
public class Monitor
A GUI for monitoring the internal state of the interpreter.
Field Summary | |
---|---|
private boolean |
active
|
private javax.swing.JFrame |
frame
|
private static int |
HEIGHT
|
private Interpreter |
interpreter
|
private PanelAgents |
panelAgents
|
private PanelLetterBox |
panelLetterBox
|
private PanelLog |
panelLog
|
private static int |
WIDTH
|
Constructor Summary | |
---|---|
Monitor(Interpreter _interpreter)
Constructor. |
Method Summary | |
---|---|
void |
letterAdded(Letter letter)
Notifies that a new Letter has been added in the message queue. |
void |
letterRemoved(Letter letter)
Notifies that a Letter has been removed from the message queue. |
void |
log(java.lang.String source,
java.lang.String text)
Writes a new log message. |
void |
setActive(boolean _active)
Activates or deactivates the monitor. |
private void |
setupFrame()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final int WIDTH
private static final int HEIGHT
private javax.swing.JFrame frame
private PanelAgents panelAgents
private PanelLetterBox panelLetterBox
private PanelLog panelLog
private Interpreter interpreter
private boolean active
Constructor Detail |
---|
public Monitor(Interpreter _interpreter)
_interpreter
- A pointer to the Interpreter object.Method Detail |
---|
private void setupFrame()
public void setActive(boolean _active)
_active
- The new active state.public void letterAdded(Letter letter)
letter
- The newly arrived letter.public void letterRemoved(Letter letter)
letter
- The newly removed letter.public void log(java.lang.String source, java.lang.String text)
source
- The source of the message.text
- The message String.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |