Advertisement
Guest User

Qooxdoo Window Test

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