public class SynthesizerMonitor extends EngineMonitor
Synthesizer. Used for debugging and testing purposes.EngineMonitor.EngineMonitorEngineListener| Modifier and Type | Field and Description |
|---|---|
protected javax.swing.JLabel |
queueEmptyLabel
Label containing "queue empty"
|
protected javax.swing.JLabel |
queueNotEmptyLabel
Label containing "queue not empty"
|
protected javax.swing.JLabel |
queueSizeLabel
Label containing "queue size"
|
allocatedLabel, allocatingResourcesLabel, deallocatedLabel, deallocatingResourcesLabel, engine, engineListener, eventPanel, pausedLabel, resumedLabel, statePanel| Constructor and Description |
|---|
SynthesizerMonitor(Synthesizer synth)
Class constructor.
|
| Modifier and Type | Method and Description |
|---|---|
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 |
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 |
updateGUIComponents()
Checks the current state of the engine and makes sure the GUI
components reflect this state accurately.
|
appendBuffer, getEventPanel, updateEngineStateComponentsprotected javax.swing.JLabel queueEmptyLabel
protected javax.swing.JLabel queueNotEmptyLabel
protected javax.swing.JLabel queueSizeLabel
public SynthesizerMonitor(Synthesizer synth)
synth - the Synthesizer to monitorprotected EngineListener getEngineListener()
EngineMonitorgetEngineListener in class EngineMonitorpublic java.awt.Component getStatePanel()
getStatePanel in class EngineMonitorprotected void updateGUIComponents()
EngineMonitorupdateGUIComponents in class EngineMonitorprotected java.lang.String engineStateString(long state)
EngineMonitorString representing the
state.engineStateString in class EngineMonitorstate - the state to turn into a StringString representing the
stateprotected void handleEvent(EngineEvent e)
EngineMonitorhandleEvent in class EngineMonitore - the event from the engine