Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.dma.ihm.game
Class Game  view Game download Game.java

java.lang.Object
  extended byjava.lang.Thread
      extended byorg.dma.ihm.game.Game
All Implemented Interfaces:
java.lang.Runnable, java.io.Serializable

public class Game
extends java.lang.Thread
implements java.io.Serializable

The Game class extends Threads, and is responsible for the loop of events provided by the GameCalendar.


Nested Class Summary
 
Nested classes inherited from class java.lang.Thread
java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
private  java.util.Vector listener
          Listeners connected to the game class
private  boolean suspended
          Flag if thread is suspended
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
Game()
          Constructor for the Game object
 
Method Summary
 void addGameCalendarListener(org.dma.ihm.game.calendar.GameCalendarListener m)
          event-handling
 void moveOn()
          MoveOn method called by the controller
private  void processGameCalendarEvent(org.dma.ihm.game.calendar.events.GameCalendarEvent m)
          event-handling
 void run()
          Run method.
 void setSuspended()
          should only be used after a loadScenario()
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

listener

private java.util.Vector listener
Listeners connected to the game class


suspended

private volatile boolean suspended
Flag if thread is suspended

Constructor Detail

Game

public Game()
Constructor for the Game object

Method Detail

setSuspended

public void setSuspended()
should only be used after a loadScenario()


run

public void run()
Run method. A bit complicated, cause suspend() and resume() are depricated

Specified by:
run in interface java.lang.Runnable

moveOn

public void moveOn()
MoveOn method called by the controller


addGameCalendarListener

public void addGameCalendarListener(org.dma.ihm.game.calendar.GameCalendarListener m)
event-handling


processGameCalendarEvent

private void processGameCalendarEvent(org.dma.ihm.game.calendar.events.GameCalendarEvent m)
event-handling