Your SlideShare is downloading. ×
0
09 Display
09 Display
09 Display
09 Display
09 Display
09 Display
09 Display
09 Display
09 Display
09 Display
09 Display
09 Display
09 Display
09 Display
09 Display
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

09 Display

235

Published on

Published in: Technology, Education
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
235
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
4
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Display Cornelius Koo – 2005 cornelius.mellino@gmail.com
  • 2. What is Display• The Display object working just like a manager of the display controlling what is shown on the device and when.• javax.microedition.lcdui.Display
  • 3. How to Get• Display object is made available to MIDlet through a call to static method declared inside the Display class.• The reference is often held for a lifetime of MIDlet.
  • 4. public class HelloWorld extends MIDlet { private Display display; public HelloWorld() { super(); display = Display.getDisplay(this); }…
  • 5. Display API
  • 6. Example MIDlet : TestDisplay.java
  • 7. Displayable
  • 8. The Rules• There is only one Display object per MIDlet.• Display object can show any number of Displayable objects.
  • 9. There are two class that extends Displayable. Those areCanvas and Screen classes.
  • 10. Creating Displayable Class1. Extends Canvas class directly.2. Use subclasses of Screen.3. Extends from subclasses of Screen.
  • 11. Extends Canvas Class Directlypublic class MyOwnScreen extends Canvas{ Drawing something…}
  • 12. Use Subclasses of ScreenTextBox t = new TextBox( "Hello World MIDlet", "Hello Small World", 256, 0);...display.setCurrent(t);
  • 13. Extends From Subclasses of Screenpublic class MyForm extends Form { }
  • 14. Displayable APIExample MIDlet : TestDisplayable.java
  • 15. 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.

×