SynthesizerMonitor
public class EngineMonitor
extends java.lang.Object
Engine
. Used for debugging and testing purposes.Modifier and Type | Class | Description |
---|---|---|
protected class |
EngineMonitor.EngineMonitorEngineListener |
Handles engine events from the engine.
|
Modifier and Type | Field | Description |
---|---|---|
protected javax.swing.JLabel |
allocatedLabel |
The label containing the string "allocated".
|
protected javax.swing.JLabel |
allocatingResourcesLabel |
The label containing the string "allocating resources".
|
protected javax.swing.JLabel |
deallocatedLabel |
The label containing the string "deallocated".
|
protected javax.swing.JLabel |
deallocatingResourcesLabel |
The label containing the string "deallocating resources".
|
protected Engine |
engine |
The
Engine to monitor. |
protected EngineListener |
engineListener |
The
EngineListener registered with the engine. |
protected EngineEventPanel |
eventPanel |
The panel used to post engine events.
|
protected javax.swing.JLabel |
pausedLabel |
The label containing the string "paused".
|
protected javax.swing.JLabel |
resumedLabel |
The label containing the string "resumed".
|
protected javax.swing.JPanel |
statePanel |
The panel containing the current engine states.
|
Constructor | Description |
---|---|
EngineMonitor(Engine eng) |
Class constructor.
|
Modifier and Type | Method | Description |
---|---|---|
protected void |
appendBuffer(java.lang.StringBuffer b,
java.lang.String s) |
Adds a
String to a buffer, with each
String being separated by a ":". |
protected java.lang.String |
engineStateString(long state) |
Returns a
String representing the
state . |
protected EngineListener |
getEngineListener() |
Creates the engine listener if necessary, and then returns it.
|
java.awt.Component |
getEventPanel() |
Gets the panel containing the area to post engine events in.
|
java.awt.Component |
getStatePanel() |
Gets the panel containing the labels for representing the
current engine state.
|
protected void |
handleEvent(EngineEvent e) |
Handles an event from the engine.
|
protected void |
updateEngineStateComponents() |
Checks the current state of the engine and makes sure the GUI
components reflect this state accurately.
|
protected void |
updateGUIComponents() |
Checks the current state of the engine and makes sure the GUI
components reflect this state accurately.
|
protected Engine engine
Engine
to monitor.protected EngineListener engineListener
EngineListener
registered with the engine.protected EngineEventPanel eventPanel
protected javax.swing.JPanel statePanel
protected javax.swing.JLabel deallocatedLabel
protected javax.swing.JLabel allocatingResourcesLabel
protected javax.swing.JLabel allocatedLabel
protected javax.swing.JLabel deallocatingResourcesLabel
protected javax.swing.JLabel pausedLabel
protected javax.swing.JLabel resumedLabel
public EngineMonitor(Engine eng)
eng
- the Engine
to watchprotected EngineListener getEngineListener()
public java.awt.Component getEventPanel()
public java.awt.Component getStatePanel()
protected void handleEvent(EngineEvent e)
e
- the event from the engineprotected void updateGUIComponents()
protected void updateEngineStateComponents()
protected java.lang.String engineStateString(long state)
String
representing the
state
.state
- the state to turn into a String
String
representing the
state
protected void appendBuffer(java.lang.StringBuffer b, java.lang.String s)
String
to a buffer, with each
String
being separated by a ":".b
- the buffer to which to append s
s
- the String
to append to b