summaryrefslogtreecommitdiffstats
path: root/web-gui/calculator/source/class/calculator/Application.js
diff options
context:
space:
mode:
Diffstat (limited to 'web-gui/calculator/source/class/calculator/Application.js')
-rw-r--r--web-gui/calculator/source/class/calculator/Application.js75
1 files changed, 75 insertions, 0 deletions
diff --git a/web-gui/calculator/source/class/calculator/Application.js b/web-gui/calculator/source/class/calculator/Application.js
new file mode 100644
index 0000000..b0dfb02
--- /dev/null
+++ b/web-gui/calculator/source/class/calculator/Application.js
@@ -0,0 +1,75 @@
+/* ************************************************************************
+
+ Copyright:
+
+ License:
+
+ Authors:
+
+************************************************************************ */
+
+/* ************************************************************************
+
+#asset(calculator/*)
+
+************************************************************************ */
+
+/**
+ * This is the main application class of your custom application "calculator"
+ */
+qx.Class.define("calculator.Application",
+{
+ extend : qx.application.Standalone,
+
+
+
+ /*
+ *****************************************************************************
+ MEMBERS
+ *****************************************************************************
+ */
+
+ members :
+ {
+ /**
+ * This method contains the initial application code and gets called
+ * during startup of the application
+ *
+ * @lint ignoreDeprecated(alert)
+ */
+ main : function()
+ {
+ // Call super class
+ this.base(arguments);
+
+ // Enable logging in debug variant
+ if (qx.core.Variant.isSet("qx.debug", "on"))
+ {
+ // support native logging capabilities, e.g. Firebug for Firefox
+ qx.log.appender.Native;
+ // support additional cross-browser console. Press F7 to toggle visibility
+ qx.log.appender.Console;
+ }
+
+ /*
+ -------------------------------------------------------------------------
+ Below is your actual application code...
+ -------------------------------------------------------------------------
+ */
+
+ // Create a button
+ var button1 = new qx.ui.form.Button("First Button", "calculator/test.png");
+
+ // Document is the application root
+ var doc = this.getRoot();
+
+ // Add button to document at fixed coordinates
+ doc.add(button1, {left: 100, top: 50});
+
+ // Add an event listener
+ button1.addListener("execute", function(e) {
+ alert("Hello World!");
+ });
+ }
+ }
+});