fdda.core.demonstration
Interface Demonstration

All Known Implementing Classes:
DemonstrationImpl

public interface Demonstration

Manages the demonstration of projects. Though currently only one project at a time can be demonstrated, the managing capabilities for more are available here. Also checks for state errors (e.g. stopping a demo that isn't started).

Author:
Jörg Rüdenauer

Method Summary
 Demonstrator getDemonstrator(Project project)
          Returns the demonstrator for a project.
 void pause(Project project)
          Pauses the demonstration of a project.
 void start(Project project, GraphicsControl graphicsControl)
          Starts the demonstration of a project.
 void stop(Project project)
          Stops the demonstration of a project.
 boolean wasDemonstrated(Project project)
          Returns whether a project has already been demonstrated
 

Method Detail

start

public void start(Project project,
                  GraphicsControl graphicsControl)
           throws WrongStateException
Starts the demonstration of a project.

Parameters:
project - the project
graphicsControl - object that controls the graphics of this project
Throws:
WrongStateException - if the project is already being demonstrated

pause

public void pause(Project project)
           throws WrongStateException
Pauses the demonstration of a project. If the demo is already paused, continues the demonstration (i.e. it works like a switch).

Parameters:
project - the project
Throws:
WrongStateException - if the project isn't being demonstrated

stop

public void stop(Project project)
          throws WrongStateException
Stops the demonstration of a project. Since the demonstration runs in another thread, it may not yet be stopped after this method returns. OTOH, at most the time for one cycle plus a small fixed time will run until the demo is stopped.

Parameters:
project - the project
Throws:
WrongStateException - if the project isn't being demonstrated

wasDemonstrated

public boolean wasDemonstrated(Project project)
Returns whether a project has already been demonstrated

Parameters:
project - the project
Returns:
true, iff the project has already been demonstrated

getDemonstrator

public Demonstrator getDemonstrator(Project project)
                             throws WrongStateException
Returns the demonstrator for a project.

Parameters:
project - the project
Returns:
the demonstrator
Throws:
WrongStateException - if the project wasn't demonstrated yet


API documentation for FDDA version 0.9. Generated on 17/02/2004 14:12.