edu.rice.cs.drjava.ui
Class InteractionsScriptController

java.lang.Object
  extended by edu.rice.cs.drjava.ui.InteractionsScriptController

public class InteractionsScriptController
extends Object

Controller for an interactions script.

Version:
$Id: InteractionsScriptController.java 5175 2010-01-20 08:46:32Z mgricken $

Field Summary
private  Action _closeScriptAction
          Action to end the script.
private  Action _executeInteractionAction
          Action to execute the current interaction.
private  InteractionsPane _interactionsPane
          Interactions pane.
private  InteractionsScriptModel _model
          Associated model.
private  Action _nextInteractionAction
          Action to go forward in the script.
private  InteractionsScriptPane _pane
          Associated view.
private  Action _prevInteractionAction
          Action to go back in the script.
 
Constructor Summary
InteractionsScriptController(InteractionsScriptModel model, Action closeAction, InteractionsPane interactionsPane)
          Builds a new interactions script pane and links it to the given model.
 
Method Summary
protected  void _setupAction(Action a, String name, String desc)
          Sets up fields on the given Action, such as the name and tooltip.
 InteractionsScriptPane getPane()
           
 void setActionsDisabled()
          Disables navigation actions
 void setActionsEnabled()
          Sets the navigation actions to be enabled, if appropriate.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_model

private InteractionsScriptModel _model
Associated model.


_pane

private InteractionsScriptPane _pane
Associated view.


_interactionsPane

private InteractionsPane _interactionsPane
Interactions pane.


_prevInteractionAction

private Action _prevInteractionAction
Action to go back in the script.


_nextInteractionAction

private Action _nextInteractionAction
Action to go forward in the script.


_executeInteractionAction

private Action _executeInteractionAction
Action to execute the current interaction.


_closeScriptAction

private Action _closeScriptAction
Action to end the script. (Defined in constructor.)

Constructor Detail

InteractionsScriptController

public InteractionsScriptController(InteractionsScriptModel model,
                                    Action closeAction,
                                    InteractionsPane interactionsPane)
Builds a new interactions script pane and links it to the given model.

Parameters:
model - the InteractionsScriptModel to use
closeAction - how to close this script.
Method Detail

setActionsEnabled

public void setActionsEnabled()
Sets the navigation actions to be enabled, if appropriate.


setActionsDisabled

public void setActionsDisabled()
Disables navigation actions


getPane

public InteractionsScriptPane getPane()
Returns:
the interactions script pane controlled by this controller.

_setupAction

protected void _setupAction(Action a,
                            String name,
                            String desc)
Sets up fields on the given Action, such as the name and tooltip.

Parameters:
a - Action to modify
name - Default name for the Action (for buttons)
desc - Short description of the Action (for tooltips)