summaryrefslogtreecommitdiff
path: root/webapps/swat/source/class/swat/module/statistics/Statistics.js
blob: 1618ab73c50bcba13033bc676b0ebe0f44ecec16 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/*
 * Copyright:
 *   (C) 2006 by Derrell Lipman
 *       All rights reserved
 *
 * License:
 *   LGPL 2.1: http://creativecommons.org/licenses/LGPL/2.1/
 */

/**
 * Swat statistics class
 */
qx.OO.defineClass("swat.module.statistics.Statistics",
                  swat.module.AbstractModule,
function()
{
  swat.module.AbstractModule.call(this);
});


/**
 * Create the module's finite state machine and graphical user interface.
 *
 * This function is called the first time a module is actually selected to
 * appear.  Creation of the module's actual FSM and GUI have been deferred
 * until they were actually needed (now) so we need to create them.
 *
 * @param module {swat.module.Module}
 *   The module descriptor for the module.
 */
qx.Proto.initialAppear = function(module)
{
  // Replace the existing (temporary) finite state machine with the real one
  swat.module.statistics.Fsm.getInstance().buildFsm(module);

  // Create the real gui
  swat.module.statistics.Gui.getInstance().buildGui(module);
};


/**
 * Singleton Instance Getter
 */
qx.Class.getInstance = qx.util.Return.returnInstance;