X-Git-Url: http://git.osdn.jp/view?a=blobdiff_plain;f=0.6.x%2Fjs%2Fmain.js;h=8017f28182bf03b28e5b4d9599ed751985219e02;hb=a4b6249d16b938ce6fd1c7691f144ff99729056f;hp=6eb6d979ba5a8c368608ac608ae73601a30889cf;hpb=ea77d51a454c9bb5290df42ffe45b7b1477eab16;p=pettanr%2FclientJs.git diff --git a/0.6.x/js/main.js b/0.6.x/js/main.js index 6eb6d97..8017f28 100644 --- a/0.6.x/js/main.js +++ b/0.6.x/js/main.js @@ -1,39 +1,74 @@ -PageRoot( - Box({ - width : '10%', - height : '10%', - left : 5, - top : 1, +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 }), - Box({ - width : 5, - height : 5, - left : '10%', - bottom : '70%', - bgColor : 0xff0000 + 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, 1, 0, 0 ], + borderWidth : [ 0, 0, 0, 0 ], borderStyle : 'solid dotted', - padding : [ 2, 1.5 ], - sizing : 'border' + padding : [ 4, 1 ], + sizing : 'border', + gapY : 1 }, - Box({ + X.UI.Box({ width : '50%', height : 2, - left : '30%', + left : '25%', bgColor : 0x999999 }), - Text( 'Hello,world!' ), - Text( '----------------------------' ), - Text( 'PettanR team' ) + 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 ); + console.log( e.type + ' -----------' ); +};