r20445: add README file indicating that the swat directory is no longer relevant
[samba.git] / swat / apps / qooxdoo-examples / test / GridLayout_8.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. Now with cells which are merged with others.</p>
16     <p>Added spacing in combination with spans.</p>
17   </div>
18
19   <script type="text/javascript">
20   qx.core.Init.getInstance().defineMain(function()
21   {
22     var gl = new qx.ui.layout.GridLayout;
23     
24     gl.setLocation(20, 48);
25     gl.setDimension("auto", "auto");
26     gl.setBorder(qx.renderer.border.BorderPresets.getInstance().outset);
27     gl.setPadding(2, 4);
28     gl.setColumnCount(4);
29     gl.setRowCount(2);
30     gl.setHorizontalSpacing(10);
31     gl.setVerticalSpacing(10);
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     // start-col, start-row, col-length, row-length
44     gl.debug("Merge: 1, 1, 2, 1");
45     gl.mergeCells(1, 1, 2, 1);   
46     
47     gl.debug("Span-Start (0, 1): " + gl.isSpanStart(0, 1));
48     gl.debug("Span-Start (0, 2): " + gl.isSpanStart(0, 2));
49     gl.debug("Span-Start (1, 1): " + gl.isSpanStart(1, 1));
50     gl.debug("Span-Start (1, 2): " + gl.isSpanStart(1, 2));
51     gl.debug("Span-Start (2, 1): " + gl.isSpanStart(2, 1));
52     gl.debug("Span-Start (2, 2): " + gl.isSpanStart(2, 2));
53     gl.debug("Span-Start (3, 1): " + gl.isSpanStart(3, 1));
54     gl.debug("Span-Start (3, 2): " + gl.isSpanStart(3, 2));
55     
56     gl.debug("Span-Cell (0, 1): " + gl.isSpanCell(0, 1));
57     gl.debug("Span-Cell (0, 2): " + gl.isSpanCell(0, 2));
58     gl.debug("Span-Cell (1, 1): " + gl.isSpanCell(1, 1));
59     gl.debug("Span-Cell (1, 2): " + gl.isSpanCell(1, 2));
60     gl.debug("Span-Cell (2, 1): " + gl.isSpanCell(2, 1));
61     gl.debug("Span-Cell (2, 2): " + gl.isSpanCell(2, 2));
62     gl.debug("Span-Cell (3, 1): " + gl.isSpanCell(3, 1));
63     gl.debug("Span-Cell (3, 2): " + gl.isSpanCell(3, 2));
64
65     gl.debug("Fill-Cell (0, 1): " + gl.isFillCell(0, 1));
66     gl.debug("Fill-Cell (0, 2): " + gl.isFillCell(0, 2));
67     gl.debug("Fill-Cell (1, 1): " + gl.isFillCell(1, 1));
68     gl.debug("Fill-Cell (1, 2): " + gl.isFillCell(1, 2));
69     gl.debug("Fill-Cell (2, 1): " + gl.isFillCell(2, 1));
70     gl.debug("Fill-Cell (2, 2): " + gl.isFillCell(2, 2));
71     gl.debug("Fill-Cell (3, 1): " + gl.isFillCell(3, 1));
72     gl.debug("Fill-Cell (3, 2): " + gl.isFillCell(3, 2));
73     
74     /*
75     // both should be impossible
76     gl.debug("Merge 1, 1, 2, 1");
77     gl.mergeCells(1, 1, 2, 1);
78
79     gl.debug("Merge 0, 0, 3, 4");
80     gl.mergeCells(0, 0, 3, 4);
81     */
82     
83     gl.debug("Merge 0, 0, 1, 2");
84     gl.mergeCells(0, 0, 1, 2);
85     
86     gl.debug("Merge 2, 0, 2, 1");
87     gl.mergeCells(2, 0, 2, 1);
88     
89     
90     
91     
92     var term1 = new qx.ui.basic.Terminator;
93     term1.setBackgroundColor("yellow");
94     gl.add(term1, 0, 0);
95     
96     var term2 = new qx.ui.basic.Terminator;
97     term2.setBackgroundColor("red");
98     gl.add(term2, 1, 0);
99     
100     var term3 = new qx.ui.basic.Terminator;
101     term3.setBackgroundColor("green");
102     gl.add(term3, 2, 0);
103
104     var term6 = new qx.ui.basic.Terminator;
105     term6.setBackgroundColor("olive");
106     gl.add(term6, 1, 1);    
107   
108     var term8 = new qx.ui.basic.Terminator;
109     term8.setBackgroundColor("navy");
110     gl.add(term8, 3, 1);            
111   });
112   </script> 
113
114 </body>
115 </html>