﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>IT博客-心无尘土</title><link>http://www.cnitblog.com/Yama/</link><description>一段平凡的日子，一段流逝的岁月</description><language>zh-cn</language><lastBuildDate>Wed, 29 Apr 2026 06:01:32 GMT</lastBuildDate><pubDate>Wed, 29 Apr 2026 06:01:32 GMT</pubDate><ttl>60</ttl><item><title>GWT</title><link>http://www.cnitblog.com/Yama/archive/2007/09/20/33861.html</link><dc:creator>Yama的家</dc:creator><author>Yama的家</author><pubDate>Thu, 20 Sep 2007 15:06:00 GMT</pubDate><guid>http://www.cnitblog.com/Yama/archive/2007/09/20/33861.html</guid><wfw:comment>http://www.cnitblog.com/Yama/comments/33861.html</wfw:comment><comments>http://www.cnitblog.com/Yama/archive/2007/09/20/33861.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnitblog.com/Yama/comments/commentRss/33861.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/Yama/services/trackbacks/33861.html</trackback:ping><description><![CDATA[GWT<br>看了看google web toolkit,发现还不错，用了几个常用的控件，如果用这个冬冬构建自己小型的网络环境还是相当迅速的。但是，大的项目工程还是。。。有待考察<br>
<ol>
    <li>Google Web Toolkit ArchitectureGWT has four major components:<br>
    a Java-to-JavaScript compiler(GWT Java-to-JavaScript Compiler), <br>
    a "hosted" web browser(GWT Hosted Web Browser),<br>
    and two Java class libraries<br>
    (JRE emulation library&lt;java.lang,java.util&gt; and GWT Web UI class library).<br>
    <br>
    </li>
    <li>Sample with eclipse<br>
    ①GMT_HOMEを設定する。コマンドプロンプトを起動する。<br>
    ②%GWT_HOME%\projectCreator -eclipse HelloGWT -out C:\YangStand\HelloGwtで<br>
    プロジェクトを作成。<br>
    ③%GWT_HOME%\applicationCreator -eclipse HelloGWT -out C:\YangStand\HelloGwt <br>
    org.yang.gwt.sample.widget.client.HelloGwt　（className,フルパッケージ指定）で<br>アプリケーションの雛形を作成。<br>
    <br>
    </li>
    <li>Widget<br>
    ①com.google.gwt.user.client.ui.UIObjectのDirect Known Subclasses: <br>
    MenuItem, TreeItem, Widget<br>
    ②Widget adds support for receiving events from the browser<br>
    <br>
    </li>
    <li>widgetのButtonWidgetサンプル--&gt;&lt;input type="button"&gt;<br>ButtonWidget.html<br><blockquote>
    &lt;html&gt;<br>
    &nbsp;&nbsp;&nbsp; &lt;head&gt;<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;title&gt;Wrapper HTML for ButtonWidget&lt;/title&gt;<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;meta name='gwt:module' content='org.yang.gwt.sample.widget.ButtonWidget'&gt;<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;meta http-equiv="content-type" content="text/html; charset=utf-8"&gt;<br>
    &nbsp;&nbsp;&nbsp; &lt;/head&gt;<br><br>
    &nbsp;&nbsp;&nbsp; &lt;body&gt;<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;script language="javascript" src="gwt.js"&gt;&lt;/script&gt;<br>
    &nbsp;&nbsp;&nbsp; &lt;table align=center&gt;<br>
    &nbsp;&nbsp;&nbsp; &lt;tr&gt;<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;td id="button1"&gt;&lt;/td&gt;<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;td&gt; &lt;/td&gt;<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;td id="button2"&gt;&lt;/td&gt;<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;td&gt; &lt;/td&gt;<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;td id="button3"&gt;&lt;/td&gt;<br>
    &nbsp;&nbsp;&nbsp; &lt;/tr&gt;<br>
    &nbsp;&nbsp;&nbsp; &lt;tr&gt;<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;td id="label" /&gt;<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;td&gt; &lt;/td&gt;<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;td&gt;&lt;/td&gt;<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;td&gt; &lt;/td&gt;<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;td&gt;&lt;/td&gt;<br>
    &nbsp;&nbsp;&nbsp; &lt;/tr&gt;<br>
    &nbsp; &lt;/table&gt;<br>
    &nbsp;&nbsp;&nbsp; &lt;/body&gt;<br>
    &lt;/html&gt;<br><br></blockquote>
    <br>ButtonWidget.java<br><blockquote>
    package org.yang.gwt.sample.widget.client;<br><br>
    import com.google.gwt.core.client.EntryPoint;<br>
    import com.google.gwt.user.client.Window;<br>
    import com.google.gwt.user.client.ui.Button;<br>
    import com.google.gwt.user.client.ui.ClickListener;<br>
    import com.google.gwt.user.client.ui.Label;<br>
    import com.google.gwt.user.client.ui.RootPanel;<br>
    import com.google.gwt.user.client.ui.Widget;<br><br>
    /**<br>
    &nbsp;* Entry point classes define &lt;code&gt;onModuleLoad()&lt;/code&gt;.<br>
    &nbsp;*/<br>
    public class ButtonWidget implements EntryPoint {<br><br>
    &nbsp; /**<br>
    &nbsp;&nbsp; * This is the entry point method.<br>
    &nbsp;&nbsp; */<br>
    &nbsp; public void onModuleLoad() {<br>
    &nbsp;&nbsp;&nbsp; final Label label = new Label();<br><br>
    &nbsp;&nbsp;&nbsp; final Button button = new Button("Click me(display)");<br>
    &nbsp;&nbsp;&nbsp; button.addClickListener(new ClickListener() {<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public void onClick(Widget sender) {<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (label.getText().equals(""))<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; label.setText("Hello World!");<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; else<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; label.setText("");<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>
    &nbsp;&nbsp;&nbsp; });<br><br>
    &nbsp;&nbsp;&nbsp; final Button alertbutton = new Button("Jump", new ClickListener() {<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public void onClick(Widget sender) {<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Window.alert("世界");<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>
    &nbsp;&nbsp;&nbsp; });<br><br>
    &nbsp;&nbsp;&nbsp; final Button disablebutton = new Button("Disable");<br>
    &nbsp;&nbsp;&nbsp; disablebutton.setEnabled(false);<br><br>
    &nbsp;&nbsp;&nbsp; <br>
    &nbsp;&nbsp;&nbsp; RootPanel.get("button1").add(button);<br>
    &nbsp;&nbsp;&nbsp; RootPanel.get("label").add(label);<br>
    &nbsp;&nbsp;&nbsp; RootPanel.get("button2").add(alertbutton);<br>
    &nbsp;&nbsp;&nbsp; RootPanel.get("button3").add(disablebutton);<br>
    &nbsp; }<br>
    }<br><br></blockquote>
    <br></li>
    <li>widgetのRadioButtonWidgetサンプル--&gt;&lt;input type="radio"&gt;<br>
    %GWT_HOME%\projectCreator -eclipse RadioButtonWidget -out C:\YangStand\RadioButtonWidget<br>
    %GWT_HOME%\applicationCreator -eclipse RadioButtonWidget -out
    C:\YangStand\RadioButtonWidget
    org.yang.gwt.sample.widget.client.RadioButton<br>
    <br>
    RadioButtonWidget.html<br><blockquote>
    &lt;html&gt;<br>
    &nbsp;&nbsp;&nbsp; &lt;head&gt;<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;title&gt;Wrapper HTML for RadioButtonWidget&lt;/title&gt;<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;meta name='gwt:module' content='org.yang.gwt.sample.widget.RadioButtonWidget'&gt;<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;meta http-equiv="content-type" content="text/html; charset=utf-8"&gt;<br>
    &nbsp;&nbsp;&nbsp; &lt;/head&gt;<br><br>
    &nbsp;&nbsp;&nbsp; &lt;body&gt;<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;script language="javascript" src="gwt.js"&gt;&lt;/script&gt;<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;iframe id="__gwt_historyFrame" style="width:0;height:0;border:0"&gt;&lt;/iframe&gt;<br><br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;table align=center&gt;<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;tr&gt;<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;td id="radio1"&gt;&lt;/td&gt;<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;td id="radio2"&gt;&lt;/td&gt;<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;td id="radio3"&gt;&lt;/td&gt;<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/tr&gt;<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;tr&gt;<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;td id="label" colspan="4" align="center"&gt;&lt;/td&gt;<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/tr&gt;<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/table&gt;<br>
    &nbsp;&nbsp;&nbsp; &lt;/body&gt;<br>
    &lt;/html&gt;<br><br></blockquote>
    <br>
    RadioButtonWidget.java<br><blockquote>
    package org.yang.gwt.sample.widget.client;<br><br>
    import com.google.gwt.core.client.EntryPoint;<br>
    import com.google.gwt.user.client.ui.ClickListener;<br>
    import com.google.gwt.user.client.ui.Label;<br>
    import com.google.gwt.user.client.ui.RadioButton;<br>
    import com.google.gwt.user.client.ui.RootPanel;<br>
    import com.google.gwt.user.client.ui.Widget;<br><br>
    /**<br>
    &nbsp;* Entry point classes define &lt;code&gt;onModuleLoad()&lt;/code&gt;.<br>
    &nbsp;*/<br>
    public class RadioButtonWidget implements EntryPoint {<br><br>
    &nbsp; public void onModuleLoad() {<br>
    &nbsp;&nbsp;&nbsp; final Label label = new Label();<br><br>
    &nbsp;&nbsp;&nbsp; RadioButton rb1 = new RadioButton("radioGroup");<br>
    &nbsp;&nbsp;&nbsp; rb1.setText("非活性");<br>
    &nbsp;&nbsp;&nbsp; rb1.setEnabled(false);<br>
    &nbsp;&nbsp;&nbsp; rb1.setChecked(true);<br>
    &nbsp;&nbsp;&nbsp; <br>
    &nbsp;&nbsp;&nbsp; RadioButton rb2 = new RadioButton("radioGroup", "bar");<br>
    &nbsp;&nbsp;&nbsp; rb2.addClickListener(new ClickListener() {<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; public void onClick(Widget sender) {<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; label.setText("barをセットします");<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>
    &nbsp;&nbsp;&nbsp; });<br><br>
    &nbsp;&nbsp;&nbsp; RadioButton rb3 = new RadioButton("radioGroup", "&lt;strong&gt;baz&lt;/strong&gt;", true);<br>
    &nbsp;&nbsp;&nbsp; rb3.addClickListener(new ClickListener() {<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; public void onClick(Widget sender) {<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; label.setText("bazをセットします");<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>
    &nbsp;&nbsp;&nbsp; });<br>
    &nbsp;&nbsp;&nbsp; <br>
    &nbsp;&nbsp;&nbsp; RootPanel.get("radio1").add(rb1);<br>
    &nbsp;&nbsp;&nbsp; RootPanel.get("radio2").add(rb2);<br>
    &nbsp;&nbsp;&nbsp; RootPanel.get("radio3").add(rb3);<br>
    &nbsp;&nbsp;&nbsp; RootPanel.get("label").add(label);<br>
    &nbsp; }<br>
    }<br></blockquote>
    <br>
    </li>
    <li>widgetのCheckBoxWidgetサンプル--&gt;&lt;input type="checkbox"&gt;<br>CheckBoxWidget.html<br><blockquote>
    &lt;html&gt;<br>
    &nbsp;&nbsp;&nbsp; &lt;head&gt;<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;title&gt;Wrapper HTML for CheckBoxWidget&lt;/title&gt;<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;meta name='gwt:module' content='org.yang.gwt.sample.widget.CheckBoxWidget'&gt;<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;meta http-equiv="content-type" content="text/html; charset=utf-8"&gt;<br>
    &nbsp;&nbsp;&nbsp; &lt;/head&gt;<br><br>
    &nbsp;&nbsp;&nbsp; &lt;body&gt;<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;script language="javascript" src="gwt.js"&gt;&lt;/script&gt;<br><br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;table align=left&gt;<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;tr&gt;<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;td id="checkBox1"&gt;&lt;/td&gt;&lt;td id="label"&gt;&lt;/td&gt;<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/tr&gt;<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;tr&gt;<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;td id="checkBox2"&gt;&lt;/td&gt;&lt;td&gt;&amp;nbsp&lt;/td&gt;<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/tr&gt;<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;tr&gt;<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;td id="checkBox3"&gt;&lt;/td&gt;&lt;td&gt;&amp;nbsp&lt;/td&gt;<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/tr&gt;<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;tr&gt;<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;td id="checkBox4"&gt;&lt;/td&gt;&lt;td&gt;&amp;nbsp&lt;/td&gt;<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/tr&gt;<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/table&gt;<br>
    &nbsp;&nbsp;&nbsp; &lt;/body&gt;<br>
    &lt;/html&gt;<br></blockquote>
    <br>
    CheckBoxWidget.java<br><blockquote>
    package org.yang.gwt.sample.widget.client;<br><br>
    import com.google.gwt.core.client.EntryPoint;<br>
    import com.google.gwt.user.client.Window;<br>
    import com.google.gwt.user.client.ui.CheckBox;<br>
    import com.google.gwt.user.client.ui.ClickListener;<br>
    import com.google.gwt.user.client.ui.Label;<br>
    import com.google.gwt.user.client.ui.RootPanel;<br>
    import com.google.gwt.user.client.ui.Widget;<br><br>
    public class CheckBoxWidget implements EntryPoint {<br><br>
    &nbsp;&nbsp;&nbsp; public void onModuleLoad() {<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; final CheckBox checkBox1 = new CheckBox();<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; final CheckBox checkBox2 = new CheckBox("アラート");<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; final CheckBox checkBox3 = new CheckBox("&lt;Strong&gt;ラベル英語表示&lt;/Strong&gt;",<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; true);<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; final CheckBox checkBox4 = new CheckBox();<br><br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; final Label label = new Label();<br><br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; checkBox1.setText("ラベル");<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; checkBox1.addClickListener(new ClickListener() {<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; public void onClick(Widget sender) {<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if (((CheckBox) sender).isChecked()) {<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if (checkBox3.isChecked()) {<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; checkBox1.setText("Label");<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; label.setText("Hello world");<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; } else {<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; checkBox1.setText("ラベル");<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; label.setText("hola 世界");<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; } else {<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; label.setText("");<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; });<br><br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; checkBox2.addClickListener(new ClickListener() {<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; public void onClick(Widget sender) {<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if (((CheckBox) sender).isChecked()) {<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if (checkBox3.isChecked()) {<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Window.alert("Hello world!");<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; } else {<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Window.alert("hola 世界！");<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; });<br><br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; checkBox3.addClickListener(new ClickListener() {<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; public void onClick(Widget sender) {<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if (((CheckBox) sender).isChecked()) {<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; checkBox1.setText("label");<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; checkBox2.setText("click me");<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; checkBox3.setHTML("&lt;Strong&gt;English label&lt;/Strong&gt;");<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; checkBox4.setText("disable");&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; } else {<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; checkBox1.setText("ラベル");<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; checkBox2.setText("クリック");<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; checkBox3.setHTML("&lt;Strong&gt;英語表示&lt;/Strong&gt;");<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; checkBox4.setText("非活性");&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; });<br><br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; checkBox4.addClickListener(new ClickListener() {<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; public void onClick(Widget sender) {<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if (((CheckBox) sender).isChecked()) {<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; boolean confirmDis;<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if (checkBox3.isChecked()) {<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; confirmDis = Window.confirm("other checkboxes set to disabled?");<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; } else {<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; confirmDis = Window.confirm("他のチェックが非活性にする?");<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if (confirmDis){<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; checkBox1.setEnabled(false);<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; checkBox2.setEnabled(false);<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; checkBox3.setEnabled(false);<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; } else {<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; checkBox1.setEnabled(true);<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; checkBox2.setEnabled(true);<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; checkBox3.setEnabled(true);<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; });<br><br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; RootPanel.get("checkBox1").add(checkBox1);<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; RootPanel.get("checkBox2").add(checkBox2);<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; RootPanel.get("checkBox3").add(checkBox3);<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; RootPanel.get("checkBox4").add(checkBox4);<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; RootPanel.get("label").add(label);<br>
    &nbsp;&nbsp;&nbsp; }<br>
    }<br></blockquote>
    <br>
    </li>
    <li>widgetのTextBoxWidgetサンプル--&gt;&lt;input type="text"&gt;<br>
    TextBoxWidget.html<br><blockquote>&lt;html&gt;<br>
    &nbsp;&nbsp;&nbsp; &lt;head&gt;<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;title&gt;Wrapper HTML for TextBoxWidget&lt;/title&gt;<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;meta name='gwt:module' content='org.yang.gwt.sample.widget.TextBoxWidget'&gt;<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;meta http-equiv="content-type" content="text/html; charset=utf-8"&gt;<br>
    &nbsp;&nbsp;&nbsp; &lt;/head&gt;<br><br>
    &nbsp;&nbsp;&nbsp; &lt;body&gt;<br><br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;script language="javascript" src="gwt.js"&gt;&lt;/script&gt;<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;iframe id="__gwt_historyFrame" style="width:0;height:0;border:0"&gt;&lt;/iframe&gt;<br><br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;table align=center&gt;<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;tr&gt;<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;td&gt;名前&lt;/td&gt;<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;td id="inputName"&gt;&lt;/td&gt;<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/tr&gt;<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;tr&gt;<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;td&gt;パスワード&lt;/td&gt;<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;td id="inputPass"&gt;&lt;/td&gt;<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/tr&gt;<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;tr&gt;<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;td&gt;数字入力&lt;/td&gt;<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;td id="inputDigit"&gt;&lt;/td&gt;<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/tr&gt;<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/table&gt;<br>
    &nbsp;&nbsp;&nbsp; &lt;/body&gt;<br>
    &lt;/html&gt;<br><br></blockquote>
    <br>
    TextBoxWidget.java<br><blockquote>
    package org.yang.gwt.sample.widget.client;<br><br>
    import com.google.gwt.core.client.EntryPoint;<br>
    import com.google.gwt.user.client.DOM;<br>
    import com.google.gwt.user.client.ui.ChangeListener;<br>
    import com.google.gwt.user.client.ui.KeyboardListenerAdapter;<br>
    import com.google.gwt.user.client.ui.PasswordTextBox;<br>
    import com.google.gwt.user.client.ui.RootPanel;<br>
    import com.google.gwt.user.client.ui.TextBox;<br>
    import com.google.gwt.user.client.ui.Widget;<br><br>
    public class TextBoxWidget implements EntryPoint {<br><br>
    &nbsp;&nbsp;&nbsp; public void onModuleLoad() {<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; TextBox name = new TextBox();<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; PasswordTextBox password = new PasswordTextBox();<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; TextBox limitInput = new TextBox();<br><br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; limitInput.addKeyboardListener(new KeyboardListenerAdapter() {<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; public void onKeyPress(Widget sender, char keyCode, int modifiers) {<br><br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if (!Character.isDigit(keyCode)) {<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ((TextBox) sender).cancelKey();<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; });<br><br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; limitInput.addChangeListener(new ChangeListener() {<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; public void onChange(Widget sender) {<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; System.out.println("input:::" + sender.getElement());<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; System.out.println(DOM.getAttribute(sender.getElement(),<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; "value"));<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; System.out.println(((TextBox) sender).getText());<br><br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; String str = ((TextBox) sender).getText();<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; char[] c = str.toCharArray();<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; for (int i = 0; i &lt; c.length; i++) {<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if (!Character.isDigit(c[i])) {<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ((TextBox) sender).setText("");<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; return;<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; });<br><br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; RootPanel.get("inputName").add(name);<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; RootPanel.get("inputPass").add(password);<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; RootPanel.get("inputDigit").add(limitInput);<br>
    &nbsp;&nbsp;&nbsp; }<br>
    }<br></blockquote>
    <br></li>
    <li>widgetのTextAreaWidgetサンプル--&gt;&lt;TEXTAREA&gt;<br>
    TextAreaWidget.html<br><blockquote>
    &lt;html&gt;<br>
    &nbsp;&nbsp;&nbsp; &lt;head&gt;<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;title&gt;Wrapper HTML for TextAreaWidget&lt;/title&gt;<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;meta name='gwt:module' content='org.yang.gwt.sample.widget.TextAreaWidget'&gt;<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;meta http-equiv="content-type" content="text/html; charset=utf-8"&gt;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br>
    &nbsp;&nbsp;&nbsp; &lt;/head&gt;<br><br>
    &nbsp;&nbsp;&nbsp; &lt;body&gt;<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;script language="javascript" src="gwt.js"&gt;&lt;/script&gt;<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;iframe id="__gwt_historyFrame" style="width:0;height:0;border:0"&gt;&lt;/iframe&gt;<br><br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;table align=center&gt;<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;tr&gt;<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;td&gt;名前&lt;/td&gt;<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;td id="inputName"&gt;&lt;/td&gt;<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/tr&gt;<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;tr&gt;<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;td&gt;コメント&lt;/td&gt;<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;td id="inputComent"&gt;&lt;/td&gt;<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/tr&gt;<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/table&gt;<br>
    &nbsp;&nbsp;&nbsp; &lt;/body&gt;<br>
    &lt;/html&gt;<br><br></blockquote>
    <br>
    TextAreaWidget.java<br><blockquote>
    package org.yang.gwt.sample.widget.client;<br><br>
    import com.google.gwt.core.client.EntryPoint;<br>
    import com.google.gwt.user.client.DOM;<br>
    import com.google.gwt.user.client.Window;<br>
    import com.google.gwt.user.client.ui.ChangeListener;<br>
    import com.google.gwt.user.client.ui.RootPanel;<br>
    import com.google.gwt.user.client.ui.TextArea;<br>
    import com.google.gwt.user.client.ui.TextBox;<br>
    import com.google.gwt.user.client.ui.Widget;<br><br>
    public class TextAreaWidget implements EntryPoint {<br><br>
    &nbsp;&nbsp;&nbsp; public void onModuleLoad() {<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; TextBox tb = new TextBox();<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; TextArea ta = new TextArea();<br><br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ta.setCharacterWidth(80);<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ta.setVisibleLines(10);<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ta.addChangeListener(new ChangeListener() {<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; public void onChange(Widget sender) {<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; System.out.println("input:::" + sender.getElement());<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; System.out.println(DOM.getAttribute(sender.getElement(),<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; "value"));<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; System.out.println(((TextArea) sender).getText());<br><br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; int charCount = ((TextArea) sender).getCursorPos();<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; System.out.println(charCount);<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Window.alert(charCount + "文字入力しました");<br><br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; String str = ((TextArea) sender).getText();<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; System.out.println(str);<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Window.alert(str);<br><br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; });<br><br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; RootPanel.get("inputName").add(tb);<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; RootPanel.get("inputComent").add(ta);<br>
    &nbsp;&nbsp;&nbsp; }<br>
    }<br><br></blockquote>
    <br></li>
</ol>
<br><br><br><br><br><br>備考：<br>バッチファイルで一発生成する<br><strong>call</strong> %GWT_HOME%\projectCreator -eclipse CheckBoxWidget -out C:\YangStand\CheckBoxWidget<br>call
%GWT_HOME%\applicationCreator -eclipse CheckBoxWidget -out
C:\YangStand\CheckBoxWidget
org.yang.gwt.sample.widget.client.CheckBoxWidget<br>call %GWT_HOME%\projectCreator -eclipse TextBoxWidget -out C:\YangStand\TextBoxWidget<br>call
%GWT_HOME%\applicationCreator -eclipse TextBoxWidget -out
C:\YangStand\TextBoxWidget
org.yang.gwt.sample.widget.client.TextBoxWidget<br>&#8230;<br><br>
<br><img src ="http://www.cnitblog.com/Yama/aggbug/33861.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/Yama/" target="_blank">Yama的家</a> 2007-09-20 23:06 <a href="http://www.cnitblog.com/Yama/archive/2007/09/20/33861.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>PukiWiki之一：搭建基础篇</title><link>http://www.cnitblog.com/Yama/archive/2007/04/19/25445.html</link><dc:creator>Yama的家</dc:creator><author>Yama的家</author><pubDate>Wed, 18 Apr 2007 16:56:00 GMT</pubDate><guid>http://www.cnitblog.com/Yama/archive/2007/04/19/25445.html</guid><wfw:comment>http://www.cnitblog.com/Yama/comments/25445.html</wfw:comment><comments>http://www.cnitblog.com/Yama/archive/2007/04/19/25445.html#Feedback</comments><slash:comments>2</slash:comments><wfw:commentRss>http://www.cnitblog.com/Yama/comments/commentRss/25445.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/Yama/services/trackbacks/25445.html</trackback:ping><description><![CDATA[<br>1。安装工具<br>XAMPP<br>&nbsp;&nbsp;&nbsp; XAMPP -&gt;Apache,Mysql,PHP,Perl http://www.apachefriends.org<br>&nbsp;&nbsp;&nbsp; 本次安装版本1.6.0a,默认不要把单个程序作为服务安装<br>&nbsp;&nbsp;&nbsp; 安装后会出现start the XAMPP control Panel now的确认窗口，在里面可以启动apache,mysql,filezilla<br><br>Pukiwiki<br>&nbsp;&nbsp;&nbsp; http://pukiwiki.sourceforge.jp<br>&nbsp;&nbsp;&nbsp; 本次安装的是目前的安定版1.4.7_notb<br>&nbsp;&nbsp;&nbsp; 文件下载并且解冻更名为pukiwiki,然后拷贝到C:\Program Files\xampp\htdocs下面<br><br>确认： XAMPP control panel启动apache,然后http://localhost/pukiwiki就可以访问frontpage页面了。<br><br>开发工具<br>http://pukiwiki.sourceforge.jp/dev/?WikiFarm<br><br>2。pukiwiki重要设置文件<br>.htaccess: apache access for pukiwiki<br>.htpasswd: apache password set<br>index.php<br>pukiwiki.ini.php: main setting file(重要)<br>default.ini.php: setting file for normal browser(重要)<br>keitai.ini.php: setting file for mobile<br>rules.ini.php: (重要)<br>ja.lng.php<br>en.lng.php<br><br>3。pukiwiki.ini.php中基本设置<br>site名的变更<br>$page_title<br><br>管理者情报的变更<br>$modifier<br>$modiferlink<br><br>管理用密码变更<br>开始$adminpass里面是加密方式，初始是x-php-md5<br>变更方法用密码生成画面<br>http://localhost/pukiwiki/index.php?plugin=md5<br>输入想设置的密码，然后计算出变化后密码列，直接拷贝到开始的$adminpass<br><br>4。简单日记页面做成例<br>*******************************************<br>*Yama diary<br>#contents<br><br>** &amp;date;<br>#insert<br>*******************************************<br><br>      <img src ="http://www.cnitblog.com/Yama/aggbug/25445.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/Yama/" target="_blank">Yama的家</a> 2007-04-19 00:56 <a href="http://www.cnitblog.com/Yama/archive/2007/04/19/25445.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>手机中java程序和浏览器的联动机能</title><link>http://www.cnitblog.com/Yama/archive/2007/03/06/23664.html</link><dc:creator>Yama的家</dc:creator><author>Yama的家</author><pubDate>Tue, 06 Mar 2007 05:37:00 GMT</pubDate><guid>http://www.cnitblog.com/Yama/archive/2007/03/06/23664.html</guid><wfw:comment>http://www.cnitblog.com/Yama/comments/23664.html</wfw:comment><comments>http://www.cnitblog.com/Yama/archive/2007/03/06/23664.html#Feedback</comments><slash:comments>3</slash:comments><wfw:commentRss>http://www.cnitblog.com/Yama/comments/commentRss/23664.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/Yama/services/trackbacks/23664.html</trackback:ping><description><![CDATA[●需求：浏览器通过对object tag的解析来实现对已安装的j2me程序的启动调用<br /><br />●文档参考：<br />1.OMA XHTML Mobile Profile(OMA-TS-XHTMLMP-V1_2-20050118-C.pdf)的11章<br />2.内部资料Appendix B及限定事项<br />3.http://www.w3.org/TR/html4/struct/objects.html<br /><br />●知识点<br />1.嵌套于网页中的object元素主要应用于两种形式。一种是描述object data的位置，另一类是描述该object实现的位置。所以简单而言，就是如何使用data和classid两类属性。<br />2.如果data,classid两个属性都存在的话，classid必定优先于data。<br />3.data属性是被content作者来定义object data的URI。type属性用来描述MIME media type.(本次无关，暂不讨论)<br />4.classid属性是被content作者用来定义在当前设备中可处理媒体object的本地程序的URI。★<b>本项目目的也就是需要通过对classid的解析来达到调用java application management system去控制已安装的java程序来处理browser处的媒体文件</b>。<br /><br />●处理核心<br />1。<b>classid="x-oma-application:java-ams" -&gt;</b>object是jam程序<br />2。通过传递parameters到jam来判断需要的程序是否已经安装。<br />3。如果该midlet没有安装的话，应该能够给用户机会去下载对应程序。直接下载jad/jar文件通过别的元素中描述的链接或者是object元素中的data属性。<br />4。必须需要提供者定义的初始param元素：<br />    ▲AMS-Filename：执行midlet文件的路径。其实一般就是指jad文件的下载链接或本地链接。如果该链接是相对路径并且属性codebase没有被定义，那么就用当前文件的路径作为codebase的基值。<br />    ▲MIDlet attribute：（如MIDlet-Name, MIDlet-Version, MIDlet-Vendor）其实一般对于midp2.0来说前面的三个属性就是可以唯一确定midlet的关键。所以实现midlet存在与否的时候，就是通过上述传递过来的三个属性去查找是否有完全匹配的midlet。<br />    ▲AMS-Startup：使得内容作者拥有设定该midlet的启动方式的权利。它的值有三个。<br />     △auto: midlet安装好的情况下就执行，未曾安装的话就下载并且安装。<br />     △launch-only: 只有安装好的情况执行。没有安装的话返回通知给用户即可。<br />     △download-confirm:如果没有安装就去下载并且安装。但是给用户权利去选择是否执行该程序。<br />    ▲由于需要在启动的时候运用param中设定的属性，所以必须给与jam权利去得到这些属性和值。简单的说，可以通过getProperty（name为key）来得到value.<br /><br /><br /><br /><img src ="http://www.cnitblog.com/Yama/aggbug/23664.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/Yama/" target="_blank">Yama的家</a> 2007-03-06 13:37 <a href="http://www.cnitblog.com/Yama/archive/2007/03/06/23664.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>C基础百点</title><link>http://www.cnitblog.com/Yama/archive/2006/10/23/18283.html</link><dc:creator>Yama的家</dc:creator><author>Yama的家</author><pubDate>Mon, 23 Oct 2006 07:33:00 GMT</pubDate><guid>http://www.cnitblog.com/Yama/archive/2006/10/23/18283.html</guid><wfw:comment>http://www.cnitblog.com/Yama/comments/18283.html</wfw:comment><comments>http://www.cnitblog.com/Yama/archive/2006/10/23/18283.html#Feedback</comments><slash:comments>2</slash:comments><wfw:commentRss>http://www.cnitblog.com/Yama/comments/commentRss/18283.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/Yama/services/trackbacks/18283.html</trackback:ping><description><![CDATA[1.定义和宣言<br /> ①<br /> ②<br />2.可变参数的函数<br /> ①用到的宏（va=variable argument）<br />     void va_start(va_list arg_ptr, prev_param);<br />     type va_arg(va_list arg_ptr, type);<br />     void va_end(va_list arg_ptr);<br />    它们都定义在stdarg.h中<br /> ②<br /> ③<br />④<br /><br />①<br />
②<br />
③<br />
④<br /><br />①<br />
②<br />
③<br />
④<br /><br /><img src ="http://www.cnitblog.com/Yama/aggbug/18283.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/Yama/" target="_blank">Yama的家</a> 2006-10-23 15:33 <a href="http://www.cnitblog.com/Yama/archive/2006/10/23/18283.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>DRM(SuperDistribution)探究之三：如何通过可移动存储设备来进行MIDlet suites的超分  </title><link>http://www.cnitblog.com/Yama/archive/2006/10/19/18118.html</link><dc:creator>Yama的家</dc:creator><author>Yama的家</author><pubDate>Thu, 19 Oct 2006 02:02:00 GMT</pubDate><guid>http://www.cnitblog.com/Yama/archive/2006/10/19/18118.html</guid><wfw:comment>http://www.cnitblog.com/Yama/comments/18118.html</wfw:comment><comments>http://www.cnitblog.com/Yama/archive/2006/10/19/18118.html#Feedback</comments><slash:comments>5</slash:comments><wfw:commentRss>http://www.cnitblog.com/Yama/comments/commentRss/18118.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/Yama/services/trackbacks/18118.html</trackback:ping><description><![CDATA[1.机制<br />    Between two devices a MIDlet suite(as a MIDlet message or a DCF file) is <b>saved to</b> and then <b>read from</b> the RMSD.<br /><br />2.流程<br />①The user of the sending device selects the suite to be placed on the RMSD<br />②The device makes a decision on the format to be used for superdistribution<br />③The suite is placed to the RMSD(as a MIDlet Message or as a DCF file)<br />④The user of the sending device passes the RMSD to the user of the receiving device<br />⑤The user of the receiving device inserts the RMSD into the device and <b>uses the device UI access the suite</b>(as a MIDlet Message or as a DCF file)<br />⑥The suite is installed on the receiving device<br /><img src ="http://www.cnitblog.com/Yama/aggbug/18118.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/Yama/" target="_blank">Yama的家</a> 2006-10-19 10:02 <a href="http://www.cnitblog.com/Yama/archive/2006/10/19/18118.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>