sjm.examples.sling
Class SlingMediator
java.lang.Object
|
+--sjm.examples.sling.SlingMediator
- public class SlingMediator
- extends java.lang.Object
- implements java.awt.event.ActionListener, javax.swing.event.ChangeListener, java.lang.Runnable
This class supports a SlingIde object, handling the
interaction of the IDE's components.
|
Method Summary |
void |
actionPerformed(java.awt.event.ActionEvent e)
This method reacts, when the user presses one of the
IDE's buttons. |
protected void |
checkReserved(Assembly in,
Assembly out)
|
protected void |
checkResult(java.lang.String program,
Assembly in,
Assembly out)
|
protected CommandSequence |
command(Assembly out)
|
protected void |
go()
|
void |
initialize(javax.swing.JButton goSource,
javax.swing.JButton haltSource,
javax.swing.JButton clearSource,
javax.swing.JSlider s1,
javax.swing.JSlider s2,
javax.swing.JTextArea programArea,
javax.swing.JTextArea messageArea,
SlingPanel plotPanel)
Initialize this mediator with components from the a
Sling IDE. |
protected Command |
parse(java.lang.String program)
|
void |
run()
|
protected void |
setComputing(boolean computing)
|
void |
stateChanged(javax.swing.event.ChangeEvent e)
|
protected Assembly |
tryMatch(TokenAssembly ta)
|
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
goSource
protected javax.swing.JButton goSource
haltSource
protected javax.swing.JButton haltSource
clearSource
protected javax.swing.JButton clearSource
s1
protected javax.swing.JSlider s1
s2
protected javax.swing.JSlider s2
programArea
protected javax.swing.JTextArea programArea
messageArea
protected javax.swing.JTextArea messageArea
plotPanel
protected SlingPanel plotPanel
command
protected Command command
computeThread
protected java.lang.Thread computeThread
lastProgram
protected java.lang.String lastProgram
target
protected SlingTarget target
parser
protected SlingParser parser
SlingMediator
public SlingMediator()
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
- This method reacts, when the user presses one of the
IDE's buttons.
- Specified by:
- actionPerformed in interface java.awt.event.ActionListener
- Parameters:
ActionEvent - the event
checkReserved
protected void checkReserved(Assembly in,
Assembly out)
checkResult
protected void checkResult(java.lang.String program,
Assembly in,
Assembly out)
command
protected CommandSequence command(Assembly out)
go
protected void go()
initialize
public void initialize(javax.swing.JButton goSource,
javax.swing.JButton haltSource,
javax.swing.JButton clearSource,
javax.swing.JSlider s1,
javax.swing.JSlider s2,
javax.swing.JTextArea programArea,
javax.swing.JTextArea messageArea,
SlingPanel plotPanel)
- Initialize this mediator with components from the a
Sling IDE.
parse
protected Command parse(java.lang.String program)
run
public void run()
- Specified by:
- run in interface java.lang.Runnable
setComputing
protected void setComputing(boolean computing)
stateChanged
public void stateChanged(javax.swing.event.ChangeEvent e)
- Specified by:
- stateChanged in interface javax.swing.event.ChangeListener
tryMatch
protected Assembly tryMatch(TokenAssembly ta)