diff options
Diffstat (limited to 'webapps/qooxdoo-0.6.5-sdk/frontend/application/sample/source/html/example/Fields_1.html')
-rw-r--r-- | webapps/qooxdoo-0.6.5-sdk/frontend/application/sample/source/html/example/Fields_1.html | 107 |
1 files changed, 107 insertions, 0 deletions
diff --git a/webapps/qooxdoo-0.6.5-sdk/frontend/application/sample/source/html/example/Fields_1.html b/webapps/qooxdoo-0.6.5-sdk/frontend/application/sample/source/html/example/Fields_1.html new file mode 100644 index 0000000000..fe002cc516 --- /dev/null +++ b/webapps/qooxdoo-0.6.5-sdk/frontend/application/sample/source/html/example/Fields_1.html @@ -0,0 +1,107 @@ +<html> +<head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + <title>qooxdoo » Demo » Sample</title> + <link type="text/css" rel="stylesheet" href="../../css/layout.css"/> + <!--[if IE]> + <link type="text/css" rel="stylesheet" href="../../css/layout_ie.css"/> + <![endif]--> + <script type="text/javascript" src="../../script/sample.js"></script> +</head> +<body> + <script type="text/javascript" src="../../script/layout.js"></script> + + <div id="demoDescription"> + <p>Some tests for some of the most used properties of qx.ui.core.Widget (coordinates, dimensions, backgroundColor, opacity, ...).</p> + <p>Also here are the first test of some widgets which extend qx.ui.core.Widget: qx.ui.form.TextField and qx.ui.form.PasswordField. These extended + widgets also interacts like the basic QxWidgets with the qx.event.handler.FocusHandler.</p> + </div> + + <script type="text/javascript"> + qx.core.Init.getInstance().defineMain(function() + { + var d = qx.ui.core.ClientDocument.getInstance(); + + function textChange(e) { + this.debug("Text changed: " + e.getData()); + } + + var t1 = new qx.ui.form.TextField; + t1.setValue("textfield"); + t1.setTop(48); + t1.setLeft(20); + + t1.addEventListener("changeValue", textChange); + t1.addEventListener("input", function(e) { + this.debug("Input: " + e.getData()); + }); + + d.add(t1); + + + + + var t2 = new qx.ui.form.PasswordField; + t2.setValue("passwordfield"); + t2.setTop(80); + t2.setLeft(20); + + t2.addEventListener("changeValue", textChange); + + d.add(t2); + + + var t3 = new qx.ui.form.TextArea; + t3.setValue("textarea"); + t3.setTop(110); + t3.setLeft(20); + t3.setWidth(300); + t3.setHeight(60); + + t3.addEventListener("changeValue", textChange); + + d.add(t3); + + + var t4 = new qx.ui.form.TextField; + t4.setValue("textfield"); + t4.setTop(200); + t4.setLeft(20); + t4.setWidth(200); + t4.setMaxLength(100); + t4.setReadOnly(true); + + t4.addEventListener("changeValue", textChange); + + d.add(t4); + + + var t5 = new qx.ui.form.TextField; + t5.setValue("You are foo!"); + t5.setTop(240); + t5.setLeft(20); + + t5.addEventListener("changeValue", textChange); + + d.add(t5); + + + + var t6 = new qx.ui.form.TextField; + t6.setTop(270); + t6.setLeft(20); + + t6.addEventListener("changeText", textChange); + t6.addEventListener("input", function(e) { + this.debug("Input: " + e.getData()); + }); + + t6.addEventListener("keydown", function(e) { + this.debug("Keypress: " + e.getKeyIdentifier()); + }); + + d.add(t6); + }); + </script> +</body> +</html> |