zk框架 官方文档翻译1

来源:互联网 发布:卡尔曼滤波原理和算法 编辑:程序博客网 时间:2024/06/07 11:53

1.What is ZK

    ZK is a UI framework that enables you to build amazing web and mobile applications without having to learn JavaScript or AJAX.

    ZK是一个让你创建神奇的移动应用和web应用但却无序学习javascript和ajax的UI框架.

2.Fast UI Composition

    Building UI with ZK is easy; simply combine and mix match from the hundreds of components readily at hand. You can rapidly create you own user interface with various ZK components. Each component's style, behavior, and function can be configured to fit your desire.

    使用ZK创建UI很简单,简单地结合混合地匹配你手边的成百的组件。你可以使用各种ZK组件来快速地创建你的用户接口,每个组件的样式,操作习惯和函数都可以根据你的意愿去配置。

ZUL, an XML-formatted and easy-to read language, is used to describe the above registration form.

ZUL,一种基于xml且易读的语言,被用来描述上面的注册界面。

<window border="normal" width="400px" title="Welcome! New User">    <grid hflex="1"> <!-- hflex="1" - available width inside parent (window) -->        <auxhead>            <auxheader colspan="2" label="Registration Form" style="font-size:16px" image="../images/picture.png"/>        </auxhead>        <columns visible="false">            <column></column>            <column></column>        </columns>        <rows>            <row>                User Name <textbox id="nameBox" hflex="1" constraint="no empty"/>            </row>            <row>                Gender:                <radiogroup id="genderRadio">                    <radio label="Male" value="male" image="/images/male.png" checked="true"/>                    <radio label="Female" value="female" image="/images/female.png"/>                </radiogroup>            </row>            <row >                Birthday <datebox id="birthdayBox" hflex="1" constraint="no empty, no today, no future"/>            </row>            <row spans="2" align="center" >                <hlayout>                    <checkbox id="acceptTermBox"/> Accept Term of Use                </hlayout>            </row>            <row spans="2" align="right">                <hlayout>                    <button id="resetButton" label="Reset" />                    <button id="submitButton" label="Submit" disabled="true"/>                </hlayout>            </row>        </rows>    </grid></window>

 Line 1: One tag represents one component. Some components are able to contain child components inside them. In this example, awindow contains agrid.

 第1行:一个标签展现一个组件,又的组件可以包含子组件,比如,window可以包含grid.

 Line 32: You may give "id" attribute to a component so you can control them in a UI controller.

 第32行:你可以给组件赋值一个id以便能够在UI控制器中控制它。

 

3.Intuitive UI Controlling

ZK is a component-based framework with event-driven programming model, therefore, developers add functions to respond to events of components that are triggered by users interaction.

ZK是一个通过事件驱动的编程模型基于组件的框架,因此,开发者们可以通过添加方法去响应用户交互触发的组件事件。

 

0 0
原创粉丝点击