summaryrefslogtreecommitdiff
path: root/swat/apps/qooxdoo-examples/example/Fields_1.html
diff options
context:
space:
mode:
Diffstat (limited to 'swat/apps/qooxdoo-examples/example/Fields_1.html')
-rw-r--r--swat/apps/qooxdoo-examples/example/Fields_1.html107
1 files changed, 107 insertions, 0 deletions
diff --git a/swat/apps/qooxdoo-examples/example/Fields_1.html b/swat/apps/qooxdoo-examples/example/Fields_1.html
new file mode 100644
index 0000000000..5fc0f73445
--- /dev/null
+++ b/swat/apps/qooxdoo-examples/example/Fields_1.html
@@ -0,0 +1,107 @@
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <title>qooxdoo &raquo; 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 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.getKeyCode());
+ });
+
+ d.add(t6);
+ });
+ </script>
+</body>
+</html>