r20445: add README file indicating that the swat directory is no longer relevant
[kai/samba.git] / swat.obsolete / apps / qooxdoo-examples / test / GridLayout_2.html
1 <html>
2 <head>
3   <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
4   <title>qooxdoo &raquo; Demo</title>
5   <link type="text/css" rel="stylesheet" href="../../resource/css/layout.css"/>
6   <!--[if IE]>
7   <link type="text/css" rel="stylesheet" href="../../resource/css/layout_ie.css"/>
8   <![endif]-->
9   <script type="text/javascript" src="../../script/qx.js"></script>
10 </head>
11 <body>
12   <script type="text/javascript" src="../../script/layout.js"></script>
13
14   <div id="demoDescription">
15     <p>Test for qx.ui.layout.GridLayout.</p>
16     <p>Added some own sizes and use more complex children.</p>
17     <p>The olive child has a width of 50% (which is related to the cell size here) and a horizontal alignment 'center'.</p>
18     <p>The navi child has a height of 20 pixel and is aligned to the bottom of the cell.</p>
19   </div>
20
21   <script type="text/javascript">
22   qx.core.Init.getInstance().defineMain(function()
23   {
24     var gl = new qx.ui.layout.GridLayout;
25
26     gl.setLocation(20, 48);
27     gl.setDimension(462, 128);
28     gl.setBorder(qx.renderer.border.BorderPresets.getInstance().outset);
29     gl.setPadding(2, 4);
30     gl.setColumnCount(4);
31     gl.setRowCount(2);
32
33     gl.setColumnWidth(0, 100);
34     gl.setColumnWidth(1, 200);
35     gl.setColumnWidth(2, 50);
36     gl.setColumnWidth(3, 100);
37
38     gl.setRowHeight(0, 40);
39     gl.setRowHeight(1, 80);
40
41     qx.ui.core.ClientDocument.getInstance().add(gl);
42
43
44
45
46
47     var term1 = new qx.ui.basic.Terminator;
48     term1.setBackgroundColor("yellow");
49     gl.add(term1, 0, 0);
50
51     var term2 = new qx.ui.form.Button("Hello World", "icon/22/colors.png");
52     gl.add(term2, 1, 0);
53
54     var term3 = new qx.ui.basic.Terminator;
55     term3.setBackgroundColor("green");
56     term3.setWidth(100);
57     term3.setHeight(100);
58     term3.setBorder("1px solid black");
59     gl.add(term3, 2, 0);
60
61     var term4 = new qx.ui.basic.Terminator;
62     term4.setBackgroundColor("blue");
63     gl.add(term4, 3, 0);
64
65     var term5 = new qx.ui.basic.Terminator;
66     term5.setBackgroundColor("fuchsia");
67     gl.add(term5, 0, 1);
68
69     var term6 = new qx.ui.basic.Terminator;
70     term6.setBackgroundColor("olive");
71     term6.setWidth("50%");
72     term6.setHorizontalAlign("center");
73     gl.add(term6, 1, 1);
74
75     var term7 = new qx.ui.basic.Terminator;
76     term7.setBackgroundColor("maroon");
77     gl.add(term7, 2, 1);
78
79     var term8 = new qx.ui.basic.Terminator;
80     term8.setBackgroundColor("navy");
81     term8.setHeight(20);
82     term8.setVerticalAlign("bottom");
83     gl.add(term8, 3, 1);
84   });
85   </script>
86
87 </body>
88 </html>