gwt开发者手册_v内容摘要:
Created file Created file Created file FooTesthosted Created file FooTestweb 运行 FooTesthosted在 JVM中以字节码方式测试。 FooTestweb测试是以JAVASCRIPT方式。 Eclipse 中的 启动配置( launch configurations)有同样的效果。 i18nCreator 生成一个 i18n属性文件和同步脚本。 为静态国际化( static internationalization)生成国际化( internationalization)脚本,它遵循样本属性文件( properties files)。 i18nCreator [eclipse projectName] [out dir] [overwrite] [ignore] [createMessages] interfaceName eclipse 为命名的 Eclipse 项目生成一个调试启动配置。 out 这个 目录用于写入输入文件(默认为当前目录) overwrite 覆盖任何已经存在的文件。 ignore 忽略任何已经存在的文件;不覆盖 createMessages 为 消息( Messages)接口 生成脚本 ,而不是一个常量。 interfaceName 要创建的完全符合规范的接口名字。 示例 ~/Foo i18nCreator eclipse Foo createMessages Created file src//example/foo/client/ Created file Created file FooMessagesi18n ~/Foo i18nCreator eclipse Foo Created file src//example/foo/client/ Created file Created file FooConstantsi18n 运行 FooMessagesi18n将会从 ,这个接口扩展了 Messages(消息会需要参数,用第 N个参数,替换 {n}) 运行 FooConstantsi18n将会从 (常量不会使用参数) 在 Eclipse 项目中,这个启动配置和脚本有同样的效果。 二、 构建用户界面 正如在画廊( the gallery)中展示的, GWT 包含了各种预先构建的 JAVA 界面元素( widgets)和面板( panels) ,它们可以为你的应用程序提供跨浏览器的构建块。 GWT 用户界面类是类似于已有的用户界面框架的,例如 Swing 和 SWT。 除了界面元素( widgets) 是用动态创建 HTML 的方式进行显示而不是直接面向像素的图形。 当需要操作浏览器的 DOM可以直接使用 DOM接口 , 更方便的方式是使用界面元素的类层级结构。 你应该很少需要直接访问 DOM。 使用界面元素会是更方便快捷 构建界面,而且在所有的浏览器中都能正确工作。 特别规范 界面元素和面板 界面元素和面板是客户端 JAVA 类,用于构建用户界面。 GWT 应用程序使用界面元素( widgets)构建用户界面, 界面元素包含在面板( panels)内。 界面元素的例子有: Button, TextBox, 和 Tree等。 界面元素和面板在所有的浏览器中都有同样的表现。 使用它们,你可以避免对每种浏览器写特 定的代码。 但是你会受到工具箱所提供的界面元素集合的限制。 有若干种方式使你可以创建自定义的界面元素。 面板 面板,诸如 DockPanel, HorizontalPanel, 和 RootPanel,包含界面元素,并且用于定义如何在浏览器中对 界面元素进行布局。 样式 视觉风格通过级联样式表( CSS)应用到界面元素上。 具体做法如下: 每个界面元素都有一个关联的样式名,它绑定到对应的 CSS 规则。 一个界面元素的样式名使用 setStyleName()来设置。 例如: Button元素的默认样式名是 gwtButton。 为了给所有的按钮一个更大的字体,你可以把下列规则加入到你的应用程序 CSS文件中。 .gwtButton { fontsize: 150%。 } 复杂样式 一些 界面元素有稍微 复杂的样式。 例如: MenuBar, 有下列样式: .gwtMenuBar { the menu bar itself } .gwtMenuBar .gwtMenuItem { menu items } .gwtMenuBar .gwtMenuItemselected{ selected menu items } 在这个例子中,有两个样式规则应用到菜单项目。 第一个应用到所有的菜单项(已选中和未选中的),同时,第二个(有 selected 后缀)应用到已经选中的菜单项。 一个选中的菜单项的样式名字会设置成 gwtMenuItem gwtMenuItemselected, 指定这两种被应用的样式规则。 最通常的方式是使用 setStyleName来设置基本样式名,然后用 addStyleName()和removeStyleName()来添加和去除第二个样式名。 CSS 文件 通常,样式表被置于你的模块的公共路径下的包里。 然后简单地 在你的主页中包含它,如下: link rel=stylesheet href= type=text/css 界面元素画廊 一个界面元素和面板的展示区 下列界面元素和面板都可以 GWT 用户界面库中找到。 按钮( Button) 示例代码: public class ButtonExample implements EntryPoint { public void onModuleLoad() { // Make a new button that does something when you click it. Button b = new Button(Jump!, new ClickListener() { public void onClick(Widget sender) { (How high?)。 } })。 // Add it to the root panel. ().add(b)。 } } 单选按钮( RadioButton) 示例代码: public class RadioButtonExample implements EntryPoint { public void onModuleLoad() { // Make some radio buttons, all in one group. RadioButton rb0 = new RadioButton(myRadioGroup, foo)。 RadioButton rb1 = new RadioButton(myRadioGroup, bar)。 RadioButton rb2 = new RadioButton(myRadioGroup, baz)。 // Check 39。 baz39。 by default. (true)。 // Add them to the root panel. FlowPanel panel = new FlowPanel()。 (rb0)。 (rb1)。 (rb2)。 ().add(panel)。 } } 复选框( CheckBox) 示例代码: public class CheckBoxExample implements EntryPoint { public void onModuleLoad() { // Make a new check box, and select it by default. CheckBox cb = new CheckBox(Foo)。 (true)。 // Hook up a listener to find out when it39。 s clicked. (new ClickListener() { public void onClick(Widget sender) { boolean checked = ((CheckBox) sender).isChecked()。 (It is + (checked ? :not) + checked)。 } })。 // Add it to the root panel. ().add(cb)。 } } } 文本框( TextBox) 代码示例: public class TextBoxExample implements EntryPoint { public void onModuleLoad() { // Make some text boxes. The password text box is identical to the text // box, except that the input is visually masked by the browser. PasswordTextBox ptb = new PasswordTextBox()。 TextBox tb = new TextBox()。 // Let39。 s disallow nonnumeric entry in the normal text box. (new KeyboardListenerAdapter() { public void onKeyPress(Widget sender, char keyCode, int modifiers) { if (!(keyCode)) { // () suppresses the current keyboard event. ((TextBox)sender).cancelKey()。 } } })。 // Let39。 s make an 80x50 text area to go along with the other two. TextArea ta = new TextArea()。 (80)。 (50)。 // Add them to the root panel. VerticalPanel panel = new VerticalPanel()。 (tb)。 (ptb)。 (ta)。 ().add(panel)。 } } 密码框( PasswordTextBox) 示例代码: public class TextBoxExample implements EntryPoint { public void onModuleLoad() { // Make some text boxes. The password text box is identical to the text // box, except that the input is visually masked by the browser. PasswordTextBox ptb = new PasswordTextBox()。 TextBox tb = new TextBox()。 // Let39。 s disallow nonnumeric entry in the normal text box. (new KeyboardListenerAdapter() { public void onKeyPress(Widget sender, char keyCode, int modifiers) { if (!(keyCode)) { // () suppresses the current keyboard event. ((TextBox)sender).cancelKey()。 } } })。 // Let39。 s make an 80x50 text area to go along with the other two. TextArea ta = new。gwt开发者手册_v
相关推荐
地开发重点对地块及四周一定范围内的道路交通、建筑朝向、市政及公建配套状况、城市建设规划等情况进行详细调查,初步确定规划设计方案的技术指标。 投标准备会议 总经济师召集上述所有岗位举行投标准备会议,按投标期限制订工作计划并布置任务,各岗位明确责任、分工,在限定期限内把编写的文件经本部门主管审核后汇总到本主办岗 位。 本主办岗位应参加招标地块的答疑会,做好详细记录。 各岗位责任和分工 营销策划
其中, SIO、 SIN、 SIE、 SIOS 与初始定位过程有关 , SIPO、 SIB分别用于标志链路处理机故障和链路拥塞。 ( 2) 初始定位过程 初始定位过程就是链路从空闲到进入服务需经过的信令过程。 【 1】 空闲状态 向对端发送或不发送 SIOS。 【 2】 未定位状态 开始 T2,发 SIO 启动初始定位过程,并等待对端的 SIO。 收到对端的 SIO后,停止 T2,转入已定位状态
务营销信息化解决方案 移动导游服务 业务介绍 移动导游服务 也称为 手机地图业务 , 是指以客户端、WAP 等形式,通过图形或文字界面,为客户提供搜索地图信息、定位自 己或他人、交通路线指引等功能的业务。 业务功能 及特点 ,查询各类地图和地理位置信息; ; (需被定位方授权); ;。 业务开通方式: :运行客户端,点击功能栏目进行订购; 方式:访问移动梦网- Mo 新生活- 手机地图 或 订购
hare_DL 高达 ,平均每 PDCH上有 个 TBF。 PDCH 的分配失败率也高达 %。 GSL LOAD 和 RPP LOAD 都没有超过 80%的情况,属 于典型的 PDCH容量问题。 9 网络容量优化总流程 图 GPRS/EDGE 网络容量优化总流程 F3BSC 的 PCU 拥塞 和 PCU的使用情况相关的指标主要有以下 4 个。 其中 RPP_Load 是统计 RPP 的负荷的,