• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
09 Display
 

09 Display

on

  • 364 views

 

Statistics

Views

Total Views
364
Views on SlideShare
364
Embed Views
0

Actions

Likes
0
Downloads
3
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    09 Display 09 Display Presentation Transcript

    • Display Cornelius Koo – 2005 cornelius.mellino@gmail.com
    • 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
    • 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.
    • public class HelloWorld extends MIDlet { private Display display; public HelloWorld() { super(); display = Display.getDisplay(this); }…
    • Display API
    • Example MIDlet : TestDisplay.java
    • Displayable
    • The Rules• There is only one Display object per MIDlet.• Display object can show any number of Displayable objects.
    • There are two class that extends Displayable. Those areCanvas and Screen classes.
    • Creating Displayable Class1. Extends Canvas class directly.2. Use subclasses of Screen.3. Extends from subclasses of Screen.
    • Extends Canvas Class Directlypublic class MyOwnScreen extends Canvas{ Drawing something…}
    • Use Subclasses of ScreenTextBox t = new TextBox( "Hello World MIDlet", "Hello Small World", 256, 0);...display.setCurrent(t);
    • Extends From Subclasses of Screenpublic class MyForm extends Form { }
    • Displayable APIExample MIDlet : TestDisplayable.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.