SlideShare uma empresa Scribd logo
1 de 14
Baixar para ler offline
Low Level UI Components
 Event Handling


           Cornelius Koo - 2005
Low Level
• 2 Kind of interaction between User and
  Canvas :
  1. Commands
  2. Low Level Events
Commands  Canvas
• Canvas is a Displayable object.
• It can accept Commands.
• It can interact with CommandListener.



              Example MIDlet : TestCommandCanvas.java
Key Codes
Key Code Methods




javax.microedition.lcdui.Canvas
Key Detection
• To do a low level event handling, we must
  detect keys and pointers.
• This Detection process is implemented
  through key code methods overriding.
protected void keyPressed(int
  keyCode) {
  if (keyCode == KEY_NUM1)
  ...
  else if (keyCode == KEY_NUM2)
  ...
}
Game Action
• A set of constant to facilitate event
  handling for game appication.
Game Action Constants
Example MIDlet : TestGameAction.java
Converter Methods
• public int getGameAction(int
  keyCode)
• public String getKeyName(int
  keyCode)
• public int getKeyCode(int
  gameAction)
         Example MIDlet : TestLowLevelEvent.java
Reference
• Core J2ME Technology and MIDP. John
  W. Muchow. Prentice Hall PTR, 2002.
• Enterprise J2ME: Developing Mobile
  Java Applications. Michael Juntao Yuan.
  Prentice Hall PTR, 2003.
• J2ME in A Nutshell. Kim Topley. Oreilly,
  2002.

Mais conteúdo relacionado

Semelhante a 13 Low Level UI Event Handling

Mapping Detection Coverage
Mapping Detection CoverageMapping Detection Coverage
Mapping Detection CoverageJared Atkinson
 
Escape From Your VMs with Image2Docker Jeff Nickoloff, All in Geek Consulting...
Escape From Your VMs with Image2Docker Jeff Nickoloff, All in Geek Consulting...Escape From Your VMs with Image2Docker Jeff Nickoloff, All in Geek Consulting...
Escape From Your VMs with Image2Docker Jeff Nickoloff, All in Geek Consulting...Docker, Inc.
 
2006 - Basta!: Advanced server controls
2006 - Basta!: Advanced server controls2006 - Basta!: Advanced server controls
2006 - Basta!: Advanced server controlsDaniel Fisher
 
Mobile Weekend Budapest presentation
Mobile Weekend Budapest presentationMobile Weekend Budapest presentation
Mobile Weekend Budapest presentationPéter Ádám Wiesner
 
how-to-bypass-AM-PPL
how-to-bypass-AM-PPLhow-to-bypass-AM-PPL
how-to-bypass-AM-PPLnitinscribd
 
Early exploring design alterna1ves of smart sensor so5ware with actors
Early exploring design alterna1ves of smart sensor so5ware with actorsEarly exploring design alterna1ves of smart sensor so5ware with actors
Early exploring design alterna1ves of smart sensor so5ware with actorsESUG
 
How Fast is Your Java Code
How Fast is Your Java CodeHow Fast is Your Java Code
How Fast is Your Java CodeDmitry Buzdin
 
The Diabolical Developers Guide to Performance Tuning
The Diabolical Developers Guide to Performance TuningThe Diabolical Developers Guide to Performance Tuning
The Diabolical Developers Guide to Performance TuningjClarity
 
Android Test Driven Development & Android Unit Testing
Android Test Driven Development & Android Unit TestingAndroid Test Driven Development & Android Unit Testing
Android Test Driven Development & Android Unit Testingmahmoud ramadan
 
Typhoon Managed Execution Toolkit
Typhoon Managed Execution ToolkitTyphoon Managed Execution Toolkit
Typhoon Managed Execution ToolkitDimitry Snezhkov
 
Delegateless Coordinator
Delegateless CoordinatorDelegateless Coordinator
Delegateless CoordinatorTales Andrade
 
Using multitouch and sensors in Java
Using multitouch and sensors in JavaUsing multitouch and sensors in Java
Using multitouch and sensors in JavaIntel Software Brasil
 
20051019 automating regression testing for evolving gui software
20051019 automating regression testing for evolving gui software20051019 automating regression testing for evolving gui software
20051019 automating regression testing for evolving gui softwareWill Shen
 
Advance ui development and design
Advance ui  development and design Advance ui  development and design
Advance ui development and design Rakesh Jha
 
(CMP305) Deep Learning on AWS Made EasyCmp305
(CMP305) Deep Learning on AWS Made EasyCmp305(CMP305) Deep Learning on AWS Made EasyCmp305
(CMP305) Deep Learning on AWS Made EasyCmp305Amazon Web Services
 

Semelhante a 13 Low Level UI Event Handling (20)

Mapping Detection Coverage
Mapping Detection CoverageMapping Detection Coverage
Mapping Detection Coverage
 
Escape From Your VMs with Image2Docker Jeff Nickoloff, All in Geek Consulting...
Escape From Your VMs with Image2Docker Jeff Nickoloff, All in Geek Consulting...Escape From Your VMs with Image2Docker Jeff Nickoloff, All in Geek Consulting...
Escape From Your VMs with Image2Docker Jeff Nickoloff, All in Geek Consulting...
 
Kku2011
Kku2011Kku2011
Kku2011
 
2006 - Basta!: Advanced server controls
2006 - Basta!: Advanced server controls2006 - Basta!: Advanced server controls
2006 - Basta!: Advanced server controls
 
Mobile Weekend Budapest presentation
Mobile Weekend Budapest presentationMobile Weekend Budapest presentation
Mobile Weekend Budapest presentation
 
how-to-bypass-AM-PPL
how-to-bypass-AM-PPLhow-to-bypass-AM-PPL
how-to-bypass-AM-PPL
 
Early exploring design alterna1ves of smart sensor so5ware with actors
Early exploring design alterna1ves of smart sensor so5ware with actorsEarly exploring design alterna1ves of smart sensor so5ware with actors
Early exploring design alterna1ves of smart sensor so5ware with actors
 
How Fast is Your Java Code
How Fast is Your Java CodeHow Fast is Your Java Code
How Fast is Your Java Code
 
The Diabolical Developers Guide to Performance Tuning
The Diabolical Developers Guide to Performance TuningThe Diabolical Developers Guide to Performance Tuning
The Diabolical Developers Guide to Performance Tuning
 
Kku2011
Kku2011Kku2011
Kku2011
 
Selenium Camp 2012
Selenium Camp 2012Selenium Camp 2012
Selenium Camp 2012
 
Android Test Driven Development & Android Unit Testing
Android Test Driven Development & Android Unit TestingAndroid Test Driven Development & Android Unit Testing
Android Test Driven Development & Android Unit Testing
 
Java-Events
Java-EventsJava-Events
Java-Events
 
Typhoon Managed Execution Toolkit
Typhoon Managed Execution ToolkitTyphoon Managed Execution Toolkit
Typhoon Managed Execution Toolkit
 
Delegateless Coordinator
Delegateless CoordinatorDelegateless Coordinator
Delegateless Coordinator
 
Using multitouch and sensors in Java
Using multitouch and sensors in JavaUsing multitouch and sensors in Java
Using multitouch and sensors in Java
 
20051019 automating regression testing for evolving gui software
20051019 automating regression testing for evolving gui software20051019 automating regression testing for evolving gui software
20051019 automating regression testing for evolving gui software
 
SWT Tech Sharing: Node.js + Redis
SWT Tech Sharing: Node.js + RedisSWT Tech Sharing: Node.js + Redis
SWT Tech Sharing: Node.js + Redis
 
Advance ui development and design
Advance ui  development and design Advance ui  development and design
Advance ui development and design
 
(CMP305) Deep Learning on AWS Made EasyCmp305
(CMP305) Deep Learning on AWS Made EasyCmp305(CMP305) Deep Learning on AWS Made EasyCmp305
(CMP305) Deep Learning on AWS Made EasyCmp305
 

Mais de corneliuskoo

12 High Level UI Event Handling
12 High Level UI Event Handling12 High Level UI Event Handling
12 High Level UI Event Handlingcorneliuskoo
 
07 Midlet On The Web
07 Midlet On The Web07 Midlet On The Web
07 Midlet On The Webcorneliuskoo
 
05 J2ME Wtk Command Line
05 J2ME Wtk Command Line05 J2ME Wtk Command Line
05 J2ME Wtk Command Linecorneliuskoo
 
02a cldc property support
02a cldc property support02a cldc property support
02a cldc property supportcorneliuskoo
 
01 java 2 micro edition
01 java 2 micro edition01 java 2 micro edition
01 java 2 micro editioncorneliuskoo
 

Mais de corneliuskoo (9)

12 High Level UI Event Handling
12 High Level UI Event Handling12 High Level UI Event Handling
12 High Level UI Event Handling
 
08 Midlet Basic
08 Midlet Basic08 Midlet Basic
08 Midlet Basic
 
07 Midlet On The Web
07 Midlet On The Web07 Midlet On The Web
07 Midlet On The Web
 
06 Eclipse ME
06 Eclipse ME06 Eclipse ME
06 Eclipse ME
 
05 J2ME Wtk Command Line
05 J2ME Wtk Command Line05 J2ME Wtk Command Line
05 J2ME Wtk Command Line
 
03 midp
03 midp03 midp
03 midp
 
02a cldc property support
02a cldc property support02a cldc property support
02a cldc property support
 
02 cldc
02 cldc02 cldc
02 cldc
 
01 java 2 micro edition
01 java 2 micro edition01 java 2 micro edition
01 java 2 micro edition
 

13 Low Level UI Event Handling