r20445: add README file indicating that the swat directory is no longer relevant
[samba.git] / swat.obsolete / apps / qooxdoo-examples / test / Font_1.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>Testing qx.renderer.font.Font object for QxLabels inside QxAtoms.</p>
16   </div>
17
18   <script type="text/javascript">
19   qx.core.Init.getInstance().defineMain(function()
20   {
21     var f1 = new qx.ui.layout.CanvasLayout;
22    
23     var a1 = new qx.ui.basic.Atom("Hello World");
24     
25     var b1 = new qx.ui.form.Button("Serif, 16px");
26     var b2 = new qx.ui.form.Button("Serif, 24px");
27     var b3 = new qx.ui.form.Button("Sans Serif, 16px");
28     var b4 = new qx.ui.form.Button("Sans Serif, 24px");
29     
30     b1.addEventListener("execute", function() {
31       a1.getLabelObject().setFont("16px serif");
32     });
33     
34     b2.addEventListener("execute", function() {
35       a1.getLabelObject().setFont("24px serif");
36     });
37
38     b3.addEventListener("execute", function() {
39       a1.getLabelObject().setFont("16px sans-serif");
40     });
41
42     b4.addEventListener("execute", function() {
43       a1.getLabelObject().setFont("24px sans-serif");
44     });
45
46     f1.setDimension("auto", "auto");
47     f1.setLocation(20, 48);
48     f1.setBorder("1px solid red");
49     
50     a1.setLocation(0, 0);
51     a1.getLabelObject().setFont("16px serif");
52     
53     b1.setLocation(200, 48);
54     b2.setLocation(200, 78);
55     b3.setLocation(200, 108);
56     b4.setLocation(200, 138);
57     
58     f1.add(a1);
59     qx.ui.core.ClientDocument.getInstance().add(f1, b1, b2, b3, b4);    
60   });
61   </script>
62 </body>
63 </html>