diff options
Diffstat (limited to 'web-gui/live/source')
-rw-r--r-- | web-gui/live/source/class/live/Application.js | 128 | ||||
-rw-r--r-- | web-gui/live/source/class/live/test/DemoTest.js | 55 | ||||
-rw-r--r-- | web-gui/live/source/class/live/theme/Appearance.js | 18 | ||||
-rw-r--r-- | web-gui/live/source/class/live/theme/Color.js | 18 | ||||
-rw-r--r-- | web-gui/live/source/class/live/theme/Decoration.js | 18 | ||||
-rw-r--r-- | web-gui/live/source/class/live/theme/Font.js | 28 | ||||
-rw-r--r-- | web-gui/live/source/class/live/theme/Theme.js | 21 | ||||
-rw-r--r-- | web-gui/live/source/index.html | 9 | ||||
-rw-r--r-- | web-gui/live/source/resource/live/back.png | bin | 0 -> 98107 bytes | |||
-rw-r--r-- | web-gui/live/source/resource/live/network-offline.png | bin | 0 -> 2789 bytes | |||
-rw-r--r-- | web-gui/live/source/resource/live/network-online.png | bin | 0 -> 2779 bytes | |||
-rw-r--r-- | web-gui/live/source/translation/readme.txt | 3 |
12 files changed, 298 insertions, 0 deletions
diff --git a/web-gui/live/source/class/live/Application.js b/web-gui/live/source/class/live/Application.js new file mode 100644 index 0000000..193e506 --- /dev/null +++ b/web-gui/live/source/class/live/Application.js @@ -0,0 +1,128 @@ +/* ************************************************************************ + + Copyright: + + License: + + Authors: + +************************************************************************ */ + +/* ************************************************************************ + +#asset(live/*) + +************************************************************************ */ + +/** + * This is the main application class of your custom application "live" + */ +qx.Class.define("live.Application", +{ +extend : qx.application.Standalone, + +properties: { + online: { + init: false, + apply: "__applyOnline", + check: "Boolean" + } +}, + + +/* +***************************************************************************** + MEMBERS +***************************************************************************** +*/ + +members : +{ + __rpc: null, + __call: null, + __statusImageOn: null, + __statusImageOff: null, + __statusStack: null, + __label: null, + /** + * 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... + ------------------------------------------------------------------------- + */ + + // Document is the application root + var doc = this.getRoot(); + doc.setBackgroundColor("#ffffff"); + + var back = new qx.ui.basic.Image("live/back.png"); + back.setScale(true); + doc.add(back, {left:0, top: 0}); + + this.__label = new qx.ui.basic.Label("The Server is"); + doc.add(this.__label, {left:50, top: 50}); + this.__statusStack = new qx.ui.container.Stack(); + this.__statusStack.setAllowGrowX(false); + this.__statusStack.setAllowGrowY(false); + doc.add(this.__statusStack, {left:100, top: 100}); + this.__statusImageOn = new qx.ui.basic.Image("live/network-online.png"); + this.__statusStack.add(this.__statusImageOn); + this.__statusImageOff = new qx.ui.basic.Image("live/network-offline.png"); + this.__statusStack.add(this.__statusImageOff); + this.__statusStack.setSelection([this.__statusImageOff]); + + this.__rpc = new qx.io.remote.Rpc("http://localhost:8080/rpc", "com.pengutronix.jdb.Hello|/"); + + var timer = new qx.event.Timer(1000); + timer.addListener("interval", this.__tick, this); + timer.start(); + }, + __applyOnline: function(online) { + if (online) { + this.__statusStack.setSelection([this.__statusImageOn]); + this.__label.setValue("The Server is online."); + } + else { + this.__statusStack.setSelection([this.__statusImageOff]); + this.__label.setValue("The Server is offline."); + } + }, + __tick : function() + { + if (this.__call != null) { + this.__rpc.abort(this.__call); + this.setOnline(false); + } + this.__call = this.__rpc.callAsync( + qx.lang.Function.bind(this.__callback, this), + "com.pengutronix.jdb.Hello.HelloWorld"); + }, + __callback: function(ret, err, id) { + this.__call = null; + if (err != null) { + this.setOnline(false); + return; + } + this.setOnline(true); + } +} +}); diff --git a/web-gui/live/source/class/live/test/DemoTest.js b/web-gui/live/source/class/live/test/DemoTest.js new file mode 100644 index 0000000..0846cc7 --- /dev/null +++ b/web-gui/live/source/class/live/test/DemoTest.js @@ -0,0 +1,55 @@ +/* ************************************************************************ + + Copyright: + + License: + + Authors: + +************************************************************************ */ + +/** + * This class demonstrates how to define unit tests for your application. + * + * Execute <code>generate.py test</code> to generate a testrunner application + * and open it from <tt>test/index.html</tt> + * + * The methods that contain the tests are instance methods with a + * <code>test</code> prefix. You can create an arbitrary number of test + * classes like this one. They can be organized in a regular class hierarchy, + * i.e. using deeper namespaces and a corresponding file structure within the + * <tt>test</tt> folder. + */ +qx.Class.define("live.test.DemoTest", +{ + extend : qx.dev.unit.TestCase, + + members : + { + /* + --------------------------------------------------------------------------- + TESTS + --------------------------------------------------------------------------- + */ + + /** + * Here are some simple tests + */ + testSimple : function() + { + this.assertEquals(4, 3+1, "This should never fail!"); + this.assertFalse(false, "Can false be true?!"); + }, + + /** + * Here are some more advanced tests + */ + testAdvanced: function () + { + var a = 3; + var b = a; + this.assertIdentical(a, b, "A rose by any other name is still a rose"); + this.assertInRange(3, 1, 10, "You must be kidding, 3 can never be outside [1,10]!"); + } + } +}); diff --git a/web-gui/live/source/class/live/theme/Appearance.js b/web-gui/live/source/class/live/theme/Appearance.js new file mode 100644 index 0000000..0cd7600 --- /dev/null +++ b/web-gui/live/source/class/live/theme/Appearance.js @@ -0,0 +1,18 @@ +/* ************************************************************************ + + Copyright: + + License: + + Authors: + +************************************************************************ */ + +qx.Theme.define("live.theme.Appearance", +{ + extend : qx.theme.modern.Appearance, + + appearances : + { + } +});
\ No newline at end of file diff --git a/web-gui/live/source/class/live/theme/Color.js b/web-gui/live/source/class/live/theme/Color.js new file mode 100644 index 0000000..23114cc --- /dev/null +++ b/web-gui/live/source/class/live/theme/Color.js @@ -0,0 +1,18 @@ +/* ************************************************************************ + + Copyright: + + License: + + Authors: + +************************************************************************ */ + +qx.Theme.define("live.theme.Color", +{ + extend : qx.theme.modern.Color, + + colors : + { + } +});
\ No newline at end of file diff --git a/web-gui/live/source/class/live/theme/Decoration.js b/web-gui/live/source/class/live/theme/Decoration.js new file mode 100644 index 0000000..602f6c9 --- /dev/null +++ b/web-gui/live/source/class/live/theme/Decoration.js @@ -0,0 +1,18 @@ +/* ************************************************************************ + + Copyright: + + License: + + Authors: + +************************************************************************ */ + +qx.Theme.define("live.theme.Decoration", +{ + extend : qx.theme.modern.Decoration, + + decorations : + { + } +});
\ No newline at end of file diff --git a/web-gui/live/source/class/live/theme/Font.js b/web-gui/live/source/class/live/theme/Font.js new file mode 100644 index 0000000..7abc09e --- /dev/null +++ b/web-gui/live/source/class/live/theme/Font.js @@ -0,0 +1,28 @@ +/* ************************************************************************ + + Copyright: + + License: + + Authors: + +************************************************************************ */ + +qx.Theme.define("live.theme.Font", +{ + extend : qx.theme.modern.Font, + + fonts : + { + "default" : + { + size : (qx.bom.client.System.WINVISTA || qx.bom.client.System.WIN7) ? 25 : 22, + lineHeight : 1.4, + family : qx.bom.client.Platform.MAC ? [ "Lucida Grande" ] : + (qx.bom.client.System.WINVISTA || qx.bom.client.System.WIN7) ? + [ "Segoe UI", "Candara" ] : + [ "Tahoma", "Liberation Sans", "Arial", "sans-serif" ], + bold : true + } + } +}); diff --git a/web-gui/live/source/class/live/theme/Theme.js b/web-gui/live/source/class/live/theme/Theme.js new file mode 100644 index 0000000..438ea30 --- /dev/null +++ b/web-gui/live/source/class/live/theme/Theme.js @@ -0,0 +1,21 @@ +/* ************************************************************************ + + Copyright: + + License: + + Authors: + +************************************************************************ */ + +qx.Theme.define("live.theme.Theme", +{ + meta : + { + color : live.theme.Color, + decoration : live.theme.Decoration, + font : live.theme.Font, + icon : qx.theme.icon.Tango, + appearance : live.theme.Appearance + } +});
\ No newline at end of file diff --git a/web-gui/live/source/index.html b/web-gui/live/source/index.html new file mode 100644 index 0000000..be0060d --- /dev/null +++ b/web-gui/live/source/index.html @@ -0,0 +1,9 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> +<head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + <title>live</title> + <script type="text/javascript" src="script/live.js"></script> +</head> +<body></body> +</html> diff --git a/web-gui/live/source/resource/live/back.png b/web-gui/live/source/resource/live/back.png Binary files differnew file mode 100644 index 0000000..fd06541 --- /dev/null +++ b/web-gui/live/source/resource/live/back.png diff --git a/web-gui/live/source/resource/live/network-offline.png b/web-gui/live/source/resource/live/network-offline.png Binary files differnew file mode 100644 index 0000000..954c04b --- /dev/null +++ b/web-gui/live/source/resource/live/network-offline.png diff --git a/web-gui/live/source/resource/live/network-online.png b/web-gui/live/source/resource/live/network-online.png Binary files differnew file mode 100644 index 0000000..a4995ee --- /dev/null +++ b/web-gui/live/source/resource/live/network-online.png diff --git a/web-gui/live/source/translation/readme.txt b/web-gui/live/source/translation/readme.txt new file mode 100644 index 0000000..66975e6 --- /dev/null +++ b/web-gui/live/source/translation/readme.txt @@ -0,0 +1,3 @@ +This directory will contain translation (.po) files once you run the +'translation' job in your project. + |