X-Git-Url: http://git.osdn.jp/view?a=blobdiff_plain;f=0.6.x%2Fjs%2Fmain.js;h=ab5a5b78b25be06937943b16adbd7ddc30ffc69b;hb=d0b73629913a4a570785b212abffccfdf7bd3116;hp=843ba40a339a0b8512f7437646526ddeab5599ab;hpb=d4a9a51a78712817a3a4bbfd9a09e9ddccc9aaf0;p=pettanr%2FclientJs.git diff --git a/0.6.x/js/main.js b/0.6.x/js/main.js index 843ba40..ab5a5b7 100644 --- a/0.6.x/js/main.js +++ b/0.6.x/js/main.js @@ -1,31 +1,73 @@ - -PageRoot( - VBox({ - width : '30%', - height : 10, - left : '10%', - top : 12, - bgColor : 0xcccccc +root = X.UI.PageRoot( + X.UI.HBox( + { + //width : '50%', + height : '50%', + bgColor : 0x44ffff + }, + X.UI.Text( 'HTML4', { width : 3 } ), + X.UI.Text( 'Ruby on Rails' ), + X.UI.Text( 'js' ), + X.UI.Text( 'SVG' ), + X.UI.Text( 'heroku' ), + X.UI.Text( 'flash' ) + ), + X.UI.Box({ + width : '25%', + height : '25%', + left : '25%', + top : '50%', + bgColor : 0x0000ff }), - VBox({ - width : '50%', - height : 10, - left : '30%', - bottom : 12, - bgColor : 0x999999 + X.UI.Box({ + width : '25%', + height : '25%', + left : 0, + bottom : 0, + bgColor : 0xff0000 }), - VBox( + X.UI.VBox( { - width : '50%', - left : '49%', + width : '40%', + left : '55%', top : 5, bottom : 5, bgColor : 0x666666, borderColor : 0x111111, - borderWidth : [ 0.5, 1, 5 ], + borderWidth : [ 0, 0, 0, 0 ], borderStyle : 'solid dotted', - sizing : 'border' + padding : [ 4, 1 ], + sizing : 'border', + gapY : 1 }, - Text( 'Hello,world' ) + X.UI.Box({ + width : '50%', + height : 2, + left : '25%', + bgColor : 0x999999 + }), + X.UI.Text( 'Hello, world!' ), + X.UI.Text( '----------------------------' ), + text = X.UI.Text( 'PettanR-team. rrrrrrrrrr' ) + .listen( X.UI.Event.TAP, _onClick ), + X.UI.HBox( + { + width : '100%', + gapX : 2, + bgColor : 0xff77ff + }, + X.UI.Text( 'HTML4', { width : 2 } ), + X.UI.Text( 'Ruby on Rails', { width : 2 } ), + X.UI.Text( 'js' ), + X.UI.Text( 'SVG' ), + X.UI.Text( 'heroku' ), + X.UI.Text( 'flash' ) + ) ) -); \ No newline at end of file +); +_root = X.Class._getPrivate( root ); +_text = X.Class._getPrivate( text ); + +function _onClick( e ){ + alert( e.type ); +};