diff options
author | Derrell Lipman <derrell@samba.org> | 2006-10-06 15:40:18 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:20:40 -0500 |
commit | 10c06a1968dbf39d8a3790077a3537b8323f36ff (patch) | |
tree | f7389aac531dfe7c0d538879bdbd15cca33156e4 /swat/apps/qooxdoo-examples/test/Label_3.html | |
parent | 77fc14c0818498e277a79196fa4f6e15f4b607b1 (diff) | |
download | samba-10c06a1968dbf39d8a3790077a3537b8323f36ff.tar.gz samba-10c06a1968dbf39d8a3790077a3537b8323f36ff.tar.bz2 samba-10c06a1968dbf39d8a3790077a3537b8323f36ff.zip |
r19141: add a reasonable subset of the qooxdoo runtime environment, and example applications
(This used to be commit ff28ab7314ff1eebcd62f387678b816091af8121)
Diffstat (limited to 'swat/apps/qooxdoo-examples/test/Label_3.html')
-rw-r--r-- | swat/apps/qooxdoo-examples/test/Label_3.html | 177 |
1 files changed, 177 insertions, 0 deletions
diff --git a/swat/apps/qooxdoo-examples/test/Label_3.html b/swat/apps/qooxdoo-examples/test/Label_3.html new file mode 100644 index 0000000000..14ae31e166 --- /dev/null +++ b/swat/apps/qooxdoo-examples/test/Label_3.html @@ -0,0 +1,177 @@ +<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 qx.ui.basic.Label. Click on the third and fifth button like widget to test the reflow possibilities. + The debug log gives you information of the preferred dimensions.</p> + <p>Tests for qx.renderer.font.Font added</p> + </div> + + <script type="text/javascript"> + qx.core.Init.getInstance().defineMain(function() + { + var d = qx.ui.core.ClientDocument.getInstance(); + + var c1 = new qx.ui.basic.Label("Hello qooxdoo!"); + + c1.setLeft(20); + c1.setTop(48); + c1.setBorder(qx.renderer.border.BorderPresets.getInstance().black); + c1.setPadding(2, 4); + + c1.addEventListener("mouseover", function(e) { + this.setFont("20px bold"); + }); + + c1.addEventListener("mouseout", function(e) { + this.setFont(null); + }); + + + + var c2 = new qx.ui.basic.Label("<h1>Welcome to the qooxdoo universe</h1><p>Enjoy the new era of web interface development.</p>"); + + c2.setLeft(20); + c2.setTop(100); + c2.setBorder(qx.renderer.border.BorderPresets.getInstance().black); + c2.setPadding(8); + + + + + var c3 = new qx.ui.basic.Label("Delete temporary data", null, null, false); + + c3.setLeft(20); + c3.setTop(200); + c3.setBorder(qx.renderer.border.BorderPresets.getInstance().outset); + c3.setPadding(4, 6); + c3.setBackgroundColor(new qx.renderer.color.Color("white")); + + c3.addEventListener("click", function() + { + if (this.getHtml() == "Delete temporary data") + { + this.setHtml("Thank you"); + this.setColor("red"); + this.setFont("bold"); + } + else + { + this.setHtml("Delete temporary data"); + this.setColor(null); + this.setFont(null); + }; + }); + + + + + /* + var c4f = new qx.renderer.font.Font(16, "Times New Roman"); + c4f.setBold(true); + c4f.setItalic(true); + c4f.setUnderline(true); + */ + + var c4 = new qx.ui.basic.Label("Hello qooxdoo!"); + + c4.setLeft(20); + c4.setTop(250); + c4.setBorder(qx.renderer.border.BorderPresets.getInstance().black); + c4.setPadding(2, 4); + // c4.setFont(c4f); + + // implicit usage of qx.renderer.font.FontCache + c4.setFont("16px Times New Roman bold italic underline"); + + + + + + var c5 = new qx.ui.basic.Label("Delete temporary data", null, null, false); + + c5.setBorder(qx.renderer.border.BorderPresets.getInstance().outset); + c5.setPadding(4, 6); + c5.setBackgroundColor(new qx.renderer.color.Color("white")); + + // re-use instance from above + // c5.setFont("16px Times New Roman bold italic underline"); + + // this is also possible and will be automatically converted to a single space seperated string + c5.setFont(["16px", "Times New Roman", "bold", "italic", "underline"]); + + c5.addEventListener("click", function() { + this.getHtml() == "Delete temporary data" ? this.setHtml("Thank you<br/>All your personal data was just deleted.<br/>Have Fun!") : this.setHtml("Delete temporary data"); + }); + + + var c5w = new qx.ui.layout.CanvasLayout; + c5w.setBorder(qx.renderer.border.BorderPresets.getInstance().outset); + c5w.setPadding(8); + c5w.setLeft(20); + c5w.setTop(350); + c5w.setWidth("auto"); + c5w.setHeight("auto"); + + c5w.add(c5); + d.add(c5w); + + + + + var c6 = new qx.ui.basic.Label("This is a long label", 50); + + c6.setTop(450); + c6.setLeft(20); + c6.setBorder(qx.renderer.border.BorderPresets.getInstance().black); + + + var c7 = new qx.ui.basic.Label("This is a long label with long-words and more text", 100, null, false); + + c7.setTop(490); + c7.setLeft(20); + c7.setPadding(4); + c7.setBorder(qx.renderer.border.BorderPresets.getInstance().outset); + c7.setBackgroundColor("white"); + + c7.addEventListener("click", function(e) + { + switch(this.getWidth()) + { + case 50: + this.setWidth(100); + break; + + case 100: + this.setWidth(150); + break; + + case 150: + this.setWidth(200); + break; + + case 200: + this.setWidth("auto"); + break; + + case "auto": + this.setWidth(50); + break; + }; + }); + + d.add(c1, c2, c3, c4, c5w, c6, c7); + }); + </script> +</body> +</html>
\ No newline at end of file |