iアプリ
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
単語検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
* [[iアプリ]] [#tc30610f]
いままで、Zaurusしか使ってなかったが、ひょんなことからFOM...
#contents
** 環境 [#l504030f]
http://www.nttdocomo.co.jp/p_s/imode/java/より、DoJa4.0プ...
Eclipse 2.1.3
2.1.2_Translations
Eclipseの環境ができましたら、http://www.nttdocomo.co.jp/p...
** サンプル [#w119abbb]
Eclipseのファイル>新規プロジェクトからDoJaプロジェクトを...
package test;
import com.nttdocomo.ui.*;
public class Test1 extends IApplication {
public void start() {
Display.setCurrent(new HelloPanel());
}
class HelloPanel extends Panel {
public HelloPanel() {
add(new Label("Hello World"));
}
}
}
セーブして、次にプロジェクト>DoJa-4.0設定>ADF/トラステ...
AppName TEST1
PackageURL dojasmple1.jar
AppClass test.Test1
では実行します。実行>実行>DoJa-4.0アプリケーションを選...
dojasample1.jam
Download.html
ができいると思います。これをサーバ上において終わりです。...
[[http://hidekazu.dhs1.sst.ne.jp/iapp/test1.JPG>http://hi...
表示されるのはHello Worldだけです。QRコードは[[QRWindow>h...
** サンプル2 [#p16ae385]
Panel,TextBox,Label,Buttonなど。
package test;
import com.nttdocomo.ui.*;
public class Test1 extends IApplication {
public void start() {
testPanel.setSoftLabel(TestPanel.SOFT_KEY_1,"終了");
Display.setCurrent(testPanel);
}
}
package test;
import com.nttdocomo.ui.*;
public class TestPanel extends Panel implements Componen...
IApplication mainIApplication;
Label lblLabel;
Label lblLabel2;
TextBox txtBox;
Button btnButton;
//コンストラクタ
TestPanel (IApplication mainIApplication) {
this.mainIApplication = mainIApplication;
//ラベル
lblLabel = new Label("ラベル1",Label.LEFT);
lblLabel2 = new Label("hohoho",Label.LEFT);
//テキストボックス デフォルト値、幅、行数、入力制限
txtBox = new TextBox("1", 3, 1, TextBox.DISPLAY_ANY);
//ボタン
btnButton = new Button("ボタン");
//コンポーネントの貼り付け
this.add(lblLabel);
this.add(txtBox);
this.add(btnButton);
this.add(lblLabel2);
setComponentListener(this);
setSoftKeyListener(this);
}
public void componentAction(Component component, int ty...
if((component == btnButton) && (type == BUTTON_PRESSE...
lblLabel2.setText("ボタンPRESS");
}
}
//ソフトキーのリスナー
public void softKeyReleased(int param){
// ソフトキー1が離された時に実行
if(param == TestPanel.SOFT_KEY_1){
// iアプリ終了
mainIApplication.terminate();
}
}
public void softKeyPressed(int param){
}
}
** リンク [#e8c5ab56]
http://www.itmedia.co.jp/enterprise/articles/0407/15/news...
http://www.atmarkit.co.jp/fmobile/rensai/doja01/doja01.ht...
http://www.geocities.jp/java_iappli/~
http://www.okisoft.co.jp/esc/i-appli.html~
HTTPで通信するサンプルがあります。
** 参考書籍 [#bf166193]
** コメント [#v1fee775]
-#comment
終了行:
* [[iアプリ]] [#tc30610f]
いままで、Zaurusしか使ってなかったが、ひょんなことからFOM...
#contents
** 環境 [#l504030f]
http://www.nttdocomo.co.jp/p_s/imode/java/より、DoJa4.0プ...
Eclipse 2.1.3
2.1.2_Translations
Eclipseの環境ができましたら、http://www.nttdocomo.co.jp/p...
** サンプル [#w119abbb]
Eclipseのファイル>新規プロジェクトからDoJaプロジェクトを...
package test;
import com.nttdocomo.ui.*;
public class Test1 extends IApplication {
public void start() {
Display.setCurrent(new HelloPanel());
}
class HelloPanel extends Panel {
public HelloPanel() {
add(new Label("Hello World"));
}
}
}
セーブして、次にプロジェクト>DoJa-4.0設定>ADF/トラステ...
AppName TEST1
PackageURL dojasmple1.jar
AppClass test.Test1
では実行します。実行>実行>DoJa-4.0アプリケーションを選...
dojasample1.jam
Download.html
ができいると思います。これをサーバ上において終わりです。...
[[http://hidekazu.dhs1.sst.ne.jp/iapp/test1.JPG>http://hi...
表示されるのはHello Worldだけです。QRコードは[[QRWindow>h...
** サンプル2 [#p16ae385]
Panel,TextBox,Label,Buttonなど。
package test;
import com.nttdocomo.ui.*;
public class Test1 extends IApplication {
public void start() {
testPanel.setSoftLabel(TestPanel.SOFT_KEY_1,"終了");
Display.setCurrent(testPanel);
}
}
package test;
import com.nttdocomo.ui.*;
public class TestPanel extends Panel implements Componen...
IApplication mainIApplication;
Label lblLabel;
Label lblLabel2;
TextBox txtBox;
Button btnButton;
//コンストラクタ
TestPanel (IApplication mainIApplication) {
this.mainIApplication = mainIApplication;
//ラベル
lblLabel = new Label("ラベル1",Label.LEFT);
lblLabel2 = new Label("hohoho",Label.LEFT);
//テキストボックス デフォルト値、幅、行数、入力制限
txtBox = new TextBox("1", 3, 1, TextBox.DISPLAY_ANY);
//ボタン
btnButton = new Button("ボタン");
//コンポーネントの貼り付け
this.add(lblLabel);
this.add(txtBox);
this.add(btnButton);
this.add(lblLabel2);
setComponentListener(this);
setSoftKeyListener(this);
}
public void componentAction(Component component, int ty...
if((component == btnButton) && (type == BUTTON_PRESSE...
lblLabel2.setText("ボタンPRESS");
}
}
//ソフトキーのリスナー
public void softKeyReleased(int param){
// ソフトキー1が離された時に実行
if(param == TestPanel.SOFT_KEY_1){
// iアプリ終了
mainIApplication.terminate();
}
}
public void softKeyPressed(int param){
}
}
** リンク [#e8c5ab56]
http://www.itmedia.co.jp/enterprise/articles/0407/15/news...
http://www.atmarkit.co.jp/fmobile/rensai/doja01/doja01.ht...
http://www.geocities.jp/java_iappli/~
http://www.okisoft.co.jp/esc/i-appli.html~
HTTPで通信するサンプルがあります。
** 参考書籍 [#bf166193]
** コメント [#v1fee775]
-#comment
ページ名: