fdda.core.impl
Class DemonstrationImpl

java.lang.Object
  |
  +--fdda.core.impl.DemonstrationImpl
All Implemented Interfaces:
Demonstration

public class DemonstrationImpl
extends Object
implements Demonstration

Implementation of the demonstration manager.

Author:
Jörg Rüdenauer

Constructor Summary
DemonstrationImpl()
          Constructor
 
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DemonstrationImpl

public DemonstrationImpl()
Constructor

Method Detail

start

public void start(Project project,
                  GraphicsControl graphicsControl)
           throws WrongStateException
Description copied from interface: Demonstration
Starts the demonstration of a project.

Specified by:
start in interface Demonstration
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
Description copied from interface: Demonstration
Pauses the demonstration of a project. If the demo is already paused, continues the demonstration (i.e. it works like a switch).

Specified by:
pause in interface Demonstration
Parameters:
project - the project
Throws:
WrongStateException - if the project isn't being demonstrated

stop

public void stop(Project project)
          throws WrongStateException
Description copied from interface: Demonstration
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.

Specified by:
stop in interface Demonstration
Parameters:
project - the project
Throws:
WrongStateException - if the project isn't being demonstrated

wasDemonstrated

public boolean wasDemonstrated(Project project)
Description copied from interface: Demonstration
Returns whether a project has already been demonstrated

Specified by:
wasDemonstrated in interface Demonstration
Parameters:
project - the project
Returns:
true, iff the project has already been demonstrated

getDemonstrator

public Demonstrator getDemonstrator(Project project)
                             throws WrongStateException
Description copied from interface: Demonstration
Returns the demonstrator for a project.

Specified by:
getDemonstrator in interface Demonstration
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.