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

Quick Search    Search Deep

org.dma.ihm.controller
Class Controller  view Controller download Controller.java

java.lang.Object
  extended byorg.dma.ihm.controller.Controller

public class Controller
extends java.lang.Object

The Controller class is the "main class" of the game. It is also the interface between the game and the gui part.


Field Summary
private static org.dma.ihm.controller.data.User currentStopBeforeGameDayUser
          Helper to cycle trough multiple users for ONE event
private static org.dma.ihm.gui.Desktop desktop
          Desktop of ihm
private static org.dma.ihm.game.Game game
          The Game thread
private  java.util.Vector listener
          Listeners on this controller
private static Resources resources
          The resources
private static org.dma.ihm.controller.data.Scenario scenario
          The Scenario of this game
private static Settings settings
          The user settings
private static org.dma.ihm.game.calendar.events.GameCalendarStopBeforeGamedayEvent stopBeforeGamedayEvent
          Helper to cycle trough multiple users for ONE event
private static java.util.Vector stopBeforeGameDayUsers
          Helper to cycle trough multiple users for ONE event
static java.lang.String TITLE_VERSION
          TitleVersion
 
Constructor Summary
private Controller()
          Constructor for the Controller object
 
Method Summary
private static void cycleTroughUserBeforeGameDay()
          Helper to cycle trough all users for a stop before game day event
private static void doGameCalendarDisplayGuiEvent(org.dma.ihm.game.calendar.events.GameCalendarDisplayGuiEvent e)
          Start the desktop for a single user and send some greetings ;-)
private static void doGameCalendarGameDayEvent(org.dma.ihm.game.calendar.events.GameCalendarGameDayEvent e)
          Dear Mr.
private static void doGameCalendarStopBeforeGameDayEvent(org.dma.ihm.game.calendar.events.GameCalendarStopBeforeGamedayEvent e)
          This is a special Event, called before all GameDays.
static void doStdGameCalendarLeaguePlayoffFinishedEvent(org.dma.ihm.game.league.std.events.StdGameCalendarLeaguePlayoffFinishedEvent event)
          Show online Message from the StdLeague that LeaguePlayoffs are finished
static void doStdGameCalendarPlayoffFinishedEvent(org.dma.ihm.game.league.std.events.StdGameCalendarPlayoffFinishedEvent event)
          Show online Message from the StdLeague that the playoffs are finished
static void doStdGameCalendarPlayoutFinishedEvent(org.dma.ihm.game.league.std.events.StdGameCalendarPlayoutFinishedEvent event)
          Show online Message from the StdLeague that the playouts are finished
static void exit()
          Exits game and saves the scenario
static void exportScenario()
          Description of the Method
static org.dma.ihm.gui.Desktop getDesktop()
          Returns the desktop of this game
static java.net.URL getGuiResource(java.lang.String file, java.lang.String extension)
          Gets the guiResource attribute of the Controller class
static org.dma.ihm.controller.data.Scenario getScenario()
          Returns the scenario of this game
static Settings getSettings()
          Gets the settings attribute of the Controller class
static java.lang.String getTranslation(java.lang.String key)
          Get Translation
static java.lang.String getUserSetting(java.lang.String key)
          User Setting lookup
static java.lang.String getUserSetting(java.lang.String key, java.lang.String defaultValue)
          User Setting lookup
static void init()
          Initialize the controller (and so the game)
private static void loadScenario()
          Load a scenario
static void log(java.lang.String msg)
          log message to file (would someone PLEASE take a look at log4j or jdk 1.4 !!!!)
static void newGame(org.dma.ihm.controller.data.io.ScenarioFile scenarioFile)
          Description of the Method
private static void saveScenario()
          Saves the scenario
static void showShortMessage(java.lang.String title, java.lang.String msg)
          Special method that displays a message on the desktop without stoping the game thread
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TITLE_VERSION

public static final java.lang.String TITLE_VERSION
TitleVersion

See Also:
Constant Field Values

game

private static org.dma.ihm.game.Game game
The Game thread


scenario

private static org.dma.ihm.controller.data.Scenario scenario
The Scenario of this game


settings

private static Settings settings
The user settings


resources

private static Resources resources
The resources


listener

private java.util.Vector listener
Listeners on this controller


desktop

private static org.dma.ihm.gui.Desktop desktop
Desktop of ihm


stopBeforeGameDayUsers

private static java.util.Vector stopBeforeGameDayUsers
Helper to cycle trough multiple users for ONE event


currentStopBeforeGameDayUser

private static org.dma.ihm.controller.data.User currentStopBeforeGameDayUser
Helper to cycle trough multiple users for ONE event


stopBeforeGamedayEvent

private static org.dma.ihm.game.calendar.events.GameCalendarStopBeforeGamedayEvent stopBeforeGamedayEvent
Helper to cycle trough multiple users for ONE event

Constructor Detail

Controller

private Controller()
Constructor for the Controller object

Method Detail

init

public static void init()
Initialize the controller (and so the game)


exportScenario

public static void exportScenario()
Description of the Method


newGame

public static void newGame(org.dma.ihm.controller.data.io.ScenarioFile scenarioFile)
Description of the Method


saveScenario

private static void saveScenario()
Saves the scenario


loadScenario

private static void loadScenario()
Load a scenario


getScenario

public static org.dma.ihm.controller.data.Scenario getScenario()
Returns the scenario of this game


getSettings

public static Settings getSettings()
Gets the settings attribute of the Controller class


getDesktop

public static org.dma.ihm.gui.Desktop getDesktop()
Returns the desktop of this game


getTranslation

public static java.lang.String getTranslation(java.lang.String key)
Get Translation


getUserSetting

public static java.lang.String getUserSetting(java.lang.String key)
User Setting lookup


getUserSetting

public static java.lang.String getUserSetting(java.lang.String key,
                                              java.lang.String defaultValue)
User Setting lookup


getGuiResource

public static java.net.URL getGuiResource(java.lang.String file,
                                          java.lang.String extension)
Gets the guiResource attribute of the Controller class


log

public static void log(java.lang.String msg)
log message to file (would someone PLEASE take a look at log4j or jdk 1.4 !!!!)


exit

public static void exit()
Exits game and saves the scenario


doGameCalendarGameDayEvent

private static void doGameCalendarGameDayEvent(org.dma.ihm.game.calendar.events.GameCalendarGameDayEvent e)
Dear Mr. Big-Shot-Prgrammer. Please start your fancy 3D, dolby surround game engine here !


showShortMessage

public static void showShortMessage(java.lang.String title,
                                    java.lang.String msg)
Special method that displays a message on the desktop without stoping the game thread


doGameCalendarDisplayGuiEvent

private static void doGameCalendarDisplayGuiEvent(org.dma.ihm.game.calendar.events.GameCalendarDisplayGuiEvent e)
Start the desktop for a single user and send some greetings ;-)


doStdGameCalendarLeaguePlayoffFinishedEvent

public static void doStdGameCalendarLeaguePlayoffFinishedEvent(org.dma.ihm.game.league.std.events.StdGameCalendarLeaguePlayoffFinishedEvent event)
Show online Message from the StdLeague that LeaguePlayoffs are finished


doStdGameCalendarPlayoffFinishedEvent

public static void doStdGameCalendarPlayoffFinishedEvent(org.dma.ihm.game.league.std.events.StdGameCalendarPlayoffFinishedEvent event)
Show online Message from the StdLeague that the playoffs are finished


doStdGameCalendarPlayoutFinishedEvent

public static void doStdGameCalendarPlayoutFinishedEvent(org.dma.ihm.game.league.std.events.StdGameCalendarPlayoutFinishedEvent event)
Show online Message from the StdLeague that the playouts are finished


doGameCalendarStopBeforeGameDayEvent

private static void doGameCalendarStopBeforeGameDayEvent(org.dma.ihm.game.calendar.events.GameCalendarStopBeforeGamedayEvent e)
This is a special Event, called before all GameDays. So Users could make changes.


cycleTroughUserBeforeGameDay

private static void cycleTroughUserBeforeGameDay()
Helper to cycle trough all users for a stop before game day event