-
Notifications
You must be signed in to change notification settings - Fork 2
/
Application.js
92 lines (73 loc) · 2.19 KB
/
Application.js
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
/**
* qx.Application
*
* Application class - loaded at bootstrap time.
*
* This class prepares the default (transparent) standalone root
* and forwards the calls to the qx.main(), qx.close(), qx.terminate() and qx.finalize().
*
*/
qx.Class.define("qx.Application",
{
extend: qx.application.Standalone,
members:
{
main: function () {
// call super class.
this.base(arguments);
if (qx && qx.main)
qx.main.call(this);
},
close: function () {
// call super class.
this.base(arguments);
if (qx && qx.close)
return qx.close.call(this);
},
finalize: function () {
// call super class.
this.base(arguments);
if (qx && qx.finalize)
qx.finalize.call(this);
},
terminate: function () {
// call super class.
this.base(arguments);
if (qx && qx.terminate)
qx.terminate.call(this);
},
/**
* Sets the value of the specified option.
*
* @param option {String} Name of the option to set.
* @param value {Object} New value of the option.
*/
setOption: function (option, value) {
qx.core.Environment.getChecks()[option] = undefined;
qx.core.Environment.invalidateCacheKey(option);
qx.core.Environment.add(option, value);
},
/**
* Returns the application's routing.
*
* @return {qx.application.Routing} The application's routing.
*/
getRouting: function () {
if (!this.__routing) {
this.__routing = new qx.application.Routing();
}
return this.__routing;
},
__routing: null,
/**
* Creates the application's root widget. Override this function to create
* your own root widget.
*
* @return {qx.ui.root.Application} The application's root widget.
*/
_createRootWidget: function () {
return new qx.ui.root.Application(document);
},
}
});