edu.rice.cs.drjava.model.repl
Class InteractionsScriptModel

java.lang.Object
  extended by edu.rice.cs.drjava.model.repl.InteractionsScriptModel

public class InteractionsScriptModel
extends Object

Manages the execution of a Interactions History as a script of individual commands. Useful for presentations.

Version:
$Id: InteractionsScriptModel.java 4691 2008-12-02 23:33:27Z dlsmith $

Constructor Summary
InteractionsScriptModel(InteractionsModel model, List<String> interactions)
          Constructs a new interactions script using the given model and interactions.
 
Method Summary
 void executeInteraction()
          Executes the current interaction.
 boolean hasNextInteraction()
           
 boolean hasPrevInteraction()
           
 void nextInteraction()
          Enters the next interaction into the interactions pane.
 void prevInteraction()
          Enters the previous interaction into the interactions pane.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InteractionsScriptModel

public InteractionsScriptModel(InteractionsModel model,
                               List<String> interactions)
Constructs a new interactions script using the given model and interactions.

Parameters:
model - the interactions model
interactions - the interactions that make up the script.
Method Detail

nextInteraction

public void nextInteraction()
Enters the next interaction into the interactions pane. Should only run in the event thread.


prevInteraction

public void prevInteraction()
Enters the previous interaction into the interactions pane. Should only run in the event thread.


executeInteraction

public void executeInteraction()
Executes the current interaction. Should only run in the event thread. After this call, we have passed the current interaction.


hasNextInteraction

public boolean hasNextInteraction()
Returns:
true iff this script has another interaction to perform.

hasPrevInteraction

public boolean hasPrevInteraction()
Returns:
true iff this script has a previous interaction to perform.