UiBinder小试牛刀
2009-11-20 22:36 小寇子 阅读(786) 评论(0) 收藏 举报Interface implemented by classes that generate DOM or Widget structures from ui.xml template files, and which inject portions of the generated UI into the fields of an owner.
The generated UiBinder implementation will be based on an xml file resource in the same package as the owner class, with the same name and a "ui.xml" suffix. For example, a UI owned by class bar.baz.Foo will be sought in /bar/baz/Foo.ui.xml. (To use a different template file, put the UiTemplate annotation on your UiBinder interface declaration to point the code generator at it.)
实现UiBinder的类必须与xml的资源文件在同一包下,并且名字必须跟ui.xml前的名字一样.
例如:一个被类bar.baz.Foo拥有的UI,会在/bar/baz/Foo.ui.xml里寻找.想用一个其他的模板文件,需要把UiTemplate注释加到你的UiBinder接口的声明里来指向它.(应该是想指定一个名字不相同的ui.xml模板的时候用)
| U | createAndBindUi(O owner) Creates and returns the root object of the UI, and fills any fields of owner tagged with UiField. |
UiFactory
UiField
UiHandler
UiTemplate
浙公网安备 33010602011771号