Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 6
- 7 Authors:
- 8
- 9 ************************************************************************ */
- 10
- 11 /**
- 12 * This is the main application class of your custom application "test"
- 13 *
- 14 * @asset(test/*)
- 15 */
- 16 qx.Class.define("test.Application",
- 17 {
- 18 extend : qx.application.Standalone,
- 19
- 20
- 21
- 22 /*
- 23 *****************************************************************************
- 24 MEMBERS
- 25 *****************************************************************************
- 26 */
- 27
- 28 members :
- 29 {
- 30 /**
- 31 * This method contains the initial application code and gets called
- 32 * during startup of the application
- 33 *
- 34 * @lint ignoreDeprecated(alert)
- 35 */
- 36 main : function()
- 37 {
- 38 // Call super class
- 39 this.base(arguments);
- 40
- 41 // Create a button
- 42 var button1 = new qx.ui.form.Button("First Button", "test/test.png");
- 43
- 44 // Document is the application root
- 45 var doc = this.getRoot();
- 46
- 47 var modal = new qx.ui.window.Window("Text Window");
- 48
- 49 // Add button to document at fixed coordinates
- 50 doc.add(button1, {left: 100, top: 50});
- 51
- 52 // Add an event listener
- 53 button1.addListener("execute", function(e) {
- 54 modal.open();
- 55 });
- 56 }
- 57 }
- 58 });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement