OSDN Git Service

Version 0.6.57, fixed NS of X.UI & X.Class for __proto__.
[pettanr/clientJs.git] / 0.6.x / js / main.js
1 root = X.UI.PageRoot(\r
2         X.UI.Box({\r
3                 width   : '10%',\r
4                 height  : '10%',\r
5                 left    : 5,\r
6                 top     : 1,\r
7                 bgColor : 0x0000ff\r
8         }),\r
9         X.UI.Box({\r
10                 width       : 5,\r
11                 height      : 5,\r
12                 left        : '10%',\r
13                 bottom      : '70%',\r
14                 bgColor     : 0xff0000\r
15         }),\r
16         X.UI.VBox(\r
17                 {\r
18                         width       : '50%',\r
19                         left        : '49%',\r
20                         top         : 5,\r
21                         bottom      : 5,\r
22                         bgColor     : 0x666666,\r
23                         borderColor : 0x111111,\r
24                         borderWidth : [ 0, 0, 0, 0 ],\r
25                         borderStyle : 'solid dotted',\r
26                         padding     : [ 4, 1 ],\r
27                         sizing      : 'border'\r
28                 },\r
29                 X.UI.Box({\r
30                         width       : '50%',\r
31                         height      : 2,\r
32                         left        : '25%',\r
33                         bgColor     : 0x999999\r
34                 }),\r
35                 X.UI.Text( 'Hello, world!', { width : '100%' } ),\r
36                 X.UI.Text( '----------------------------', { width : '100%' } ),\r
37                 text = X.UI.Text( 'PettanR-team. rrrrrrrrrr', { width : '100%' } )\r
38                         .listen( X.UI.Event.TAP, _onClick )\r
39         )\r
40 );\r
41 _root = X.Class._getPrivate( root );\r
42 _text = X.Class._getPrivate( text );\r
43 \r
44 function _onClick( e ){\r
45         alert( e.type );\r
46 };\r