summaryrefslogtreecommitdiff
path: root/swat.obsolete/apps/qooxdoo-examples/test/DockLayout_5.html
blob: 382db255e2b89c9c5c28109e3384576527ebd849 (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
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
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <title>qooxdoo &raquo; 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">
    Same as the previous one, but additional added multiple children to the box layout.
  </div>

  <script type="text/javascript">
  qx.core.Init.getInstance().defineMain(function()
  {
    var d = qx.ui.core.ClientDocument.getInstance();

    var dl1 = new qx.ui.layout.DockLayout;
    
    dl1.setTop(48);
    dl1.setLeft(20);
    dl1.setRight(335);
    dl1.setBottom(48);
    
    dl1.setBorder(qx.renderer.border.BorderPresets.getInstance().black);
    dl1.setBackgroundColor("white");
    
    d.add(dl1);
    
    
    
    var t1 = new qx.ui.layout.HorizontalBoxLayout;
    t1.setHeight("20%");
    t1.setBackgroundColor("red");
    t1.setWidth(null);
    t1.setVerticalChildrenAlign("middle");
    t1.setHorizontalChildrenAlign("center");
    t1.setSpacing(4);
    t1.add(new qx.ui.basic.Image("icon/16/clock.png"));
    t1.add(new qx.ui.basic.Label("Hello World"));
    t1.add(new qx.ui.basic.Image("icon/48/colors.png"));
    dl1.addTop(t1);

    var t2 = new qx.ui.layout.HorizontalBoxLayout;
    t2.setWidth("20%");
    t2.setBackgroundColor("yellow");
    t2.setHeight(null);
    t2.setVerticalChildrenAlign("middle");
    t2.setHorizontalChildrenAlign("center");
    t2.setSpacing(4);
    t2.add(new qx.ui.basic.Image("icon/16/clock.png"));
    t2.add(new qx.ui.basic.Label("Hello World"));
    t2.add(new qx.ui.basic.Image("icon/48/colors.png"));
    dl1.addLeft(t2);
    
    var t3 = new qx.ui.layout.HorizontalBoxLayout;
    t3.setHeight("20%");
    t3.setBackgroundColor("blue");
    t3.setWidth(null);
    t3.setVerticalChildrenAlign("middle");
    t3.setHorizontalChildrenAlign("center");
    t3.setSpacing(4);
    t3.add(new qx.ui.basic.Image("icon/16/clock.png"));
    t3.add(new qx.ui.basic.Label("Hello World"));
    t3.add(new qx.ui.basic.Image("icon/48/colors.png"));
    dl1.addBottom(t3);

    var t4 = new qx.ui.layout.HorizontalBoxLayout;
    t4.setWidth("20%");
    t4.setBackgroundColor("green");
    t4.setHeight(null);
    t4.setVerticalChildrenAlign("middle");
    t4.setHorizontalChildrenAlign("center");
    t4.setSpacing(4);
    t4.add(new qx.ui.basic.Image("icon/16/clock.png"));
    t4.add(new qx.ui.basic.Label("Hello World"));
    t4.add(new qx.ui.basic.Image("icon/48/colors.png"));
    dl1.addRight(t4);    
    
    
    
    
    var dl2 = new qx.ui.layout.DockLayout;
    dl2.setBorder(qx.renderer.border.BorderPresets.getInstance().black);
    dl1.add(dl2);
    
    
    
    
    


    var t5 = new qx.ui.layout.HorizontalBoxLayout;
    t5.setHeight("20%");
    t5.setBackgroundColor("fuchsia");
    t5.setWidth(null);
    t5.setVerticalChildrenAlign("middle");
    t5.setHorizontalChildrenAlign("center");
    t5.setSpacing(4);
    t5.add(new qx.ui.basic.Image("icon/16/clock.png"));
    t5.add(new qx.ui.basic.Label("Hello World"));
    t5.add(new qx.ui.basic.Image("icon/48/colors.png"));
    dl2.addTop(t5);

    var t6 = new qx.ui.layout.HorizontalBoxLayout;
    t6.setWidth("20%");
    t6.setBackgroundColor("orange");
    t6.setHeight(null);
    t6.setVerticalChildrenAlign("middle");
    t6.setHorizontalChildrenAlign("center");
    t6.setSpacing(4);
    t6.add(new qx.ui.basic.Image("icon/16/clock.png"));
    t6.add(new qx.ui.basic.Label("Hello World"));
    t6.add(new qx.ui.basic.Image("icon/48/colors.png"));
    dl2.addLeft(t6);
    
    var t7 = new qx.ui.layout.HorizontalBoxLayout;
    t7.setHeight("20%");
    t7.setBackgroundColor("aqua");
    t7.setWidth(null);
    t7.setVerticalChildrenAlign("middle");
    t7.setHorizontalChildrenAlign("center");
    t7.setSpacing(4);
    t7.add(new qx.ui.basic.Image("icon/16/clock.png"));
    t7.add(new qx.ui.basic.Label("Hello World"));
    t7.add(new qx.ui.basic.Image("icon/48/colors.png"));
    dl2.addBottom(t7);

    var t8 = new qx.ui.layout.HorizontalBoxLayout;
    t8.setWidth("20%");
    t8.setBackgroundColor("lime");
    t8.setHeight(null);
    t8.setVerticalChildrenAlign("middle");
    t8.setHorizontalChildrenAlign("center");
    t8.setSpacing(4);
    t8.add(new qx.ui.basic.Image("icon/16/clock.png"));
    t8.add(new qx.ui.basic.Label("Hello World"));
    t8.add(new qx.ui.basic.Image("icon/48/colors.png"));
    dl2.addRight(t8); 
    
    
    

    
    var hb1 = new qx.ui.layout.HorizontalBoxLayout;
    
    hb1.setBackgroundColor("silver");
    hb1.setVerticalChildrenAlign("middle");
    hb1.setHorizontalChildrenAlign("center");
    hb1.setBorder(qx.renderer.border.BorderPresets.getInstance().black);
    hb1.setWidth(null);
    hb1.setHeight(null);
    hb1.add(new qx.ui.basic.Image("icon/64/clock.png"));
    
    dl2.add(hb1);
  });
  </script>
</body>
</html>