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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
|
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>qooxdoo » Demo</title>
<link type="text/css" rel="stylesheet" href="../../resource/css/layout.css"/>
<!--[if IE]>
<link type="text/css" rel="stylesheet" href="../../resource/css/layout_ie.css"/>
<![endif]-->
<script type="text/javascript" src="../../script/qx.js"></script>
</head>
<body>
<script type="text/javascript" src="../../script/layout.js"></script>
<div id="demoDescription">
<p>Some tests for zIndex handling for different widgets.</p>
</div>
<script type="text/javascript">
qx.core.Init.getInstance().defineMain(function()
{
var d = qx.ui.core.ClientDocument.getInstance();
var btnaler = new qx.ui.form.Button("Open Alert", "icon/16/error.png");
btnaler.setLocation(450, 50);
qx.ui.core.ClientDocument.getInstance().add(btnaler);
var aler = new qx.ui.popup.PopupAtom("Attention", "icon/128/error.png");
aler.setLocation(40, 70);
aler.setBackgroundColor("yellow");
aler.setOpacity(0.5);
qx.ui.core.ClientDocument.getInstance().add(aler);
btnaler.addEventListener("execute", function(e)
{
aler.show();
});
var bar = new qx.ui.basic.Terminator;
bar.setLocation(0, 0);
bar.setWidth(50);
bar.setBottom(0);
bar.setBackgroundColor("black");
bar.setOpacity(0.5);
bar.setZIndex(1e7);
qx.ui.core.ClientDocument.getInstance().add(bar);
var w1 = new qx.ui.window.Window("Application Window");
w1.setSpace(20, 400, 48, 250);
d.add(w1);
var m1 = new qx.ui.menu.Menu;
var mb11 = new qx.ui.menu.MenuButton("Open");
var mb12 = new qx.ui.menu.MenuButton("Save");
var mb13 = new qx.ui.menu.MenuButton("Close");
var mb14 = new qx.ui.menu.MenuButton("Exit");
m1.add(mb11, mb12, mb13, mb14);
var m2 = new qx.ui.menu.Menu;
var mb21 = new qx.ui.menu.MenuButton("Cut");
var mb22 = new qx.ui.menu.MenuButton("Copy");
var mb23 = new qx.ui.menu.MenuButton("Paste");
m2.add(mb21, mb22, mb23);
var m3 = new qx.ui.menu.Menu;
var mb31 = new qx.ui.menu.MenuButton("Toolbars");
var mb32 = new qx.ui.menu.MenuButton("Options");
m3.add(mb31, mb32);
var m4 = new qx.ui.menu.Menu;
var mb41 = new qx.ui.menu.MenuButton("Help");
var mb42 = new qx.ui.menu.MenuButton("Info");
m4.add(mb41, mb42);
qx.ui.core.ClientDocument.getInstance().add(m1, m2, m3, m4);
var t1 = new qx.ui.toolbar.ToolBar;
t1.setLocation(0, 0);
t1.setRight(0);
var tb1 = new qx.ui.toolbar.ToolBarMenuButton("File", m1);
var tb2 = new qx.ui.toolbar.ToolBarMenuButton("Edit", m2);
var tb3 = new qx.ui.toolbar.ToolBarMenuButton("View", m3);
var tb4 = new qx.ui.toolbar.ToolBarMenuButton("Help", m4);
t1.add(tb1, tb2, tb3, tb4);
w1.add(t1);
var tt1 = new qx.ui.popup.ToolTip("File Menu Button");
var tt2 = new qx.ui.popup.ToolTip("Edit Menu Button");
var tt3 = new qx.ui.popup.ToolTip("View Menu Button");
var tt4 = new qx.ui.popup.ToolTip("Help Menu Button");
tb1.setToolTip(tt1);
tb2.setToolTip(tt2);
tb3.setToolTip(tt3);
tb4.setToolTip(tt4);
qx.ui.core.ClientDocument.getInstance().add(tt1, tt2, tt3, tt4);
var c1 = new qx.ui.form.ComboBox;
c1.setLocation(0, 35);
c1.getList().add(new qx.ui.form.ListItem("Item 1"));
c1.getList().add(new qx.ui.form.ListItem("Item 2"));
c1.getList().add(new qx.ui.form.ListItem("Item 3"));
c1.getList().add(new qx.ui.form.ListItem("Item 4"));
c1.getList().add(new qx.ui.form.ListItem("Item 5"));
w1.add(c1);
var square = new qx.ui.basic.Terminator;
square.setDimension(50, 50);
square.setLocation(0, 70);
square.setBackgroundColor("blue");
w1.add(square);
var p1 = new qx.ui.popup.PopupAtom("Hello World");
p1.setBorder(4, "solid", "red");
p1.setBackgroundColor("yellow");
p1.setLocation(0, 70);
p1.setAutoHide(false);
w1.add(p1);
var p2 = new qx.ui.popup.PopupAtom("Hello World");
p2.setBorder(4, "solid", "yellow");
p2.setBackgroundColor("red");
p2.setLocation(30, 70);
p2.setAutoHide(false);
w1.add(p2);
var btn1 = new qx.ui.form.Button("Show1");
btn1.setLocation(140, 70);
w1.add(btn1);
var btn2 = new qx.ui.form.Button("Hide1");
btn2.setLocation(190, 70);
w1.add(btn2);
btn1.addEventListener("execute", function(e) {
p1.show();
});
btn2.addEventListener("execute", function(e) {
p1.hide();
});
var btn3 = new qx.ui.form.Button("Show2");
btn3.setLocation(250, 70);
w1.add(btn3);
var btn4 = new qx.ui.form.Button("Hide2");
btn4.setLocation(300, 70);
w1.add(btn4);
btn3.addEventListener("execute", function(e) {
p2.show();
});
btn4.addEventListener("execute", function(e) {
p2.hide();
});
w1.open();
var w2 = new qx.ui.window.Window("Test 2");
w2.setDimension(400, 200);
w2.setLocation(200, 200);
qx.ui.core.ClientDocument.getInstance().add(w2);
w2.show();
});
</script>
</body>
</html>
|