"ontransition" :
function(fsm, event)
{
- // Make the "Loading" message go away. (We need to learn how to
- // remove it entirely. Just doing canvas.removeAll() leaves
- // something in the widget queue and we get spurious error
- // messages.)
- var children = module.canvas.getVisibleChildren();
- for (var child in children)
- {
- children[child].hide();
- }
-
// Call the module's initialAppear function to build FSM and GUI.
// That function should *replace* this state, State_Idle, to which
// we'll transition.
/**
* Build the initial graphical user interface.
*
- * In order to prevent long load times, as minimal as possible of an initial
- * GUI should be created. Generally, this is just a "Loading..." message.
+ * Generally, this is a no-op.
*
* @param module {Object}
* An object containing at least the following properties:
* The canvas on which to create the gui for this module
* name -
* The name of this module
- * class -
+ * clazz -
* The class for this module
*
*/
qx.Proto.buildInitialGui = function(module)
{
- // For now, just create the "Loading" text
- var o = new qx.ui.basic.Label("Loading module '" + module.name + "'...");
- o.set({
- top: 12,
- left: 20
- });
- o.setFont("bold");
- module.canvas.add(o);
+ // nothing to do
};
qx.Proto.finalize = function(module)
// Set the browser title as well
document.title =
"Swat: " + this.moduleName;
-
}
});
for (moduleName in moduleList)
{
// ... call the module's buildInitialFsm() function
- var module = moduleList[moduleName]["class"].getInstance();
+ var module = moduleList[moduleName]["clazz"].getInstance();
module.buildInitialFsm(moduleList[moduleName]);
}
};
for (moduleName in moduleList)
{
// ... call the module's buildInitialGui() function
- var module = moduleList[moduleName]["class"].getInstance();
+ var module = moduleList[moduleName]["clazz"].getInstance();
module.buildInitialGui(moduleList[moduleName]);
}
};
var moduleList = swat.main.Module.getList();
for (moduleName in moduleList)
{
- var module = moduleList[moduleName]["class"].getInstance();
+ var module = moduleList[moduleName]["clazz"].getInstance();
module.finalize(moduleList[moduleName]);
}
};
* The name of the module being registered. This is the name that will
* appear in the Modules menu.
*
- * @param class {class}
+ * @param clazz {clazz}
* The class which contains the module implementation. That class must
* extend swat.main.AbstractModule and implement a singleton interface
* that provides a public method called initialAppear() which takes this
* the module.
*/
qx.OO.defineClass("swat.main.Module", qx.core.Object,
-function(moduleName, class)
+function(moduleName, clazz)
{
qx.core.Object.call(this);
this.name = moduleName;
// Save this class name
- this.class = class;
+ this.clazz = clazz;
// Add this new module to the module list.
swat.main.Module._list[moduleName] = this;