kuix教程1:我的第一Kuix应用
2010-07-25 16:50
260 查看
教程1:我的第一Kuix应用
Tutorial overview
教程概述
This tutorial is a little bit more consistent than a classic Helloworldtutorial, it is rather a quick Kuix overview.
本教程是一个多一点概述一贯经典的HelloWorld
教程比1,这是相当快Kuix。
The first part is a quite a classic Helloworld midlet but with several improvements.
第一部分是一个相当经典的HelloWorld MIDlet的,但拥有几项改进。
In
a second part, we illustrate the power of Kuix through an advanced UI
design that shows how to create easily your first graphical application
with the first logical blocks and built-in user actions management.
在第二部分,我们说明通过先进的用户界面设计,显示了如何轻松地创建你的第一个与第一个逻辑块图形化应用和Kuix权力内置的用户行为的管理。
In
a third part we extend the user action management through a full event
management with featured widgets as buttons and popup boxes.
在第三部分,我们通过全面扩大事件管理作为按钮和弹出框功能部件的用户操作管理。
Then
we will perform a brief tour with the i18n features included with Kuix
before ending with a dynamic data display and binding between graphical
widgets and Java ME variables.
然后,我们将执行一个简单的i18n的旅游功能与Kuix之前,包括一个动态数据显示和图形化工具和Java ME的变量绑定的结局。
Basic midlet
基本米德莱
For this first part of the HelloWorld tutorial, we will see how to create a Kuix Midlet and start displaying static data.对于这类的HelloWorld教程的第一部分,我们将看到如何创建一个Kuix MIDlet,并开始显示静态数据。
Screenshots are provided for NetBean 6.5 IDE but it can be followed under Eclipse with few adaptations.
截图是提供的NetBean 6.5 IDE中,但可以说明Eclipse之后,很少的修改。
If you need more information about configuring your IDE, please refer to the Tutorial 0 : Getting Started
.
如果您需要更多的IDE配置您的信息,请参阅教程0:入门
。
Download
this tutorial step.
下载
本教程的步骤。
Create a new project. File
> New Project...
创建一个新的项目。 文件
>“ 新建项目...
Select Java ME > Mobile Application and click next.
选择Java ME的>移动应用,然后点击下一步。
Set the project's name and uncheck Create Hello MIDlet and click next
设置项目的名称和取消创建您好MIDlet,并点击下一步
Select the default platform and click finish
选择默认的平台,然后点击完成
Right click on your fresh created project and select Properties.
右键单击您的新创建的项目并选择属性。
In the dialog window, select Libraries & Resources and click on Add Jar/Zip.
在对话窗口中,选择图书馆及资源和添加JAR /邮编点击。
Navigate to the files (kuix.jar and kutil.jar) you have downloaded.
导航到文件(kuix.jar和kutil.jar)你已经下载。
Here we assume that you have previously downloaded, kuix.jar
and kutil.jar
.
在这里,我们假设您以前下载, kuix.jar
和kutil.jar
。
Once the project created, create a new class object
一旦项目创建,创建一个新的类对象
This object will be your midlet.
这个对象将是你的MIDlet。
Specify a class name, optionally a package and set its superclass to KuixMidlet.
指定一个类名,可选的软件包,并将其超至KuixMidlet。
If you cannot browse for this class, you project may not be correctly linked to Kuix (step 5).
如果你不能为这个类浏览,您的项目可能无法正确链接到Kuix(步骤5)。
You need to define the Midlets that make up the Midlet Suite.
您需要定义构成了MIDlet的MIDlet套件。
In other words, you should register your HelloWorld midlet with your Midlet Suite.
换句话说,你应该和你注册你的HelloWorld MIDlet的MIDlet套件。
Right click on your project an open the properties dialog.
右键单击您的项目一打开属性对话框。
Select the Application descriptor section and move to the Midlets tab:
选择应用程序描述符节,并移动到MIDlet的标签:
Now we create a first widget that will contain our text.
现在,我们创建了一个小装置,首次将包含我们的文字。
Implement the initDesktopContent method of your midlet with the following code :
实施的MIDlet用下面的代码initDesktopContent方法:
public void initDesktopContent(Desktop desktop) { // create a displayable Screen object Screen screen = new Screen(); // create a Text widget to show some basic text Text text = new Text(); // set the Text of your object to "Hello World!" text.setText("Hello World!"); // add the text to the screen screen.add(text); // set the application current screen screen.setCurrent(); }
[/code]
At this point, we would be able to start our midlet.
在这一点上,我们就可以开始我们的MIDlet。
Click on the Run main project
button or hit F6.
按钮点击运行主项目
或击中F6键。
You should see something like the following screen.
您应该会看到类似下面的屏幕的东西。
相关文章推荐
- Xamarin.iOS中文第一教程 Vol.01
- Android简易实战教程--第一话《最简单的计算器》
- 【N多原创】十分钟变身ROM达人~AnThing ROM制作与修改系列教程第一弹[基础与签名篇]
- kuix教程2:XML / CSS的接口设计
- Java EE 7 教程 第一部分 简介 第2章 使用教程示例 第2.8节 获得最新教程
- Unity 4.x 2D游戏开发基础教程大学霸第一更
- Android 开发第一站-android 安装教程
- Android简易实战教程--第一话《最简单的计算器》
- 智捷公开课马上开始了-欢迎大家一起讨论学习-第一系列读《Swift开发指南(修订版) 》看Swift视频教程
- 实战seo教程1:实战案例——小帅优化网站,70天目标关键词全部第一
- kuix教程3:用户操作处理
- 【本文已迁移到“程序员文摘” http://programmerdigest.cn/category/lajp】LAJP系列教程-第一部分-简介
- Nutch入门教程,第一部分
- Java EE 7 教程 第一部分 简介 第1章 概述 第1.1节 Java EE 7 平台亮点
- Java EE 7 教程 第一部分 简介 第2章 使用教程示例 第2.9节 调试Java EE应用程序
- iOS开发教程:Storyboard全解析-第一部分
- vue 单页项目教程--微信公众号(第一站部署环境)
- ReactiveCocoa入门教程——第一部分【转载】
- ReactiveCocoa入门教程——第一部分【转载】
- kuix教程5:动态数据显示