Jonathan Knudsen, a technical writer at Sun, is coauthor of Beginning J2ME. He has written numerous articles about MIDP programming, and has developed several end-to-end Java ME applications. He has also authored or coauthored several books for O’Reilly Media, Inc., including The Unofficial Guide to Lego Mindstorms Robots, Java 2D Graphics, and Java Cryptography. He is a graduate of Princeton University.
Foreword xvii | |
Preface xix | |
Acknowledgments xxi | |
About the Author xxiii | |
Getting Started | p. 1 |
Overview 31.1 | |
Not Plastics, but Wireless 3 1.2 | |
MIDP, the Heart and Soul of Mobile Java Technology 4 1.3 | |
The First Umbrella: JTWI 5 1.4 | |
A Bigger Umbrella: MSA 6 1.5 | |
Understanding MSA APIs 7 1.6 | |
Looking beyond MSA 1.0 9 1.7 | |
What about JavaFX Mobile? 10 1.8 | |
Summary | p. 10 |
Tools 112.1 | |
Sun Java Wireless Toolkit for CLDC: A Toaster Oven 11 2.2 | |
NetBeans Mobility Pack: A Gourmet Kitchen 13 2.3 | |
Eclipse, Too 13 2.4 | |
Inside a MIDlet Suite 14 2.5 | |
Building a MIDlet Suite 15 2.6 | |
The Command Line: A Campfire 16 2.7 | |
Preprocessors 17 2.8 | |
Obfuscators 17 2.9 | |
Emulators 18 2.10 | |
Device Testing 18 2.11 | |
Summary | p. 19 |
Quick Start 213.1 | |
Make Something That Runs 21 3.2 | |
Put Something on the Screen 22 3.3 | |
Give the User Something to Do 23 3.4 | |
Get the Source Code Online 25 3.5 | |
Summary | p. 26 |
Core APIs 274.1 | |
JVM Features You Might Miss 28 4.2 | |
Strings, Primitive Types, and System Methods 28 4.3 | |
Threads 29 4.4 | |
Using Streams for Input and Output 30 4.5 | |
Dates, Collections, and Random Numbers 32 4.6 | |
Summary | p. 33 |
The Lives of Midlets | p. 35 |
The MIDlet Habitat 375.1 | |
The MIDlet Life Cycle 37 5.2 | |
Using the Browser and Making Calls 40 5.3 | |
Application Properties 40 5.4 | |
Protection Domains and Signed MIDlet Suites 41 5.5 | |
Permissions 42 5.6 | |
The Bottom Line on MIDlet Signing 44 5.7 | |
Summary | p. 45 |
Starting MIDlets Automatically 476.1 | |
Responding to Network Connections 47 6.2 | |
Running a MIDlet at a Specific Time 54 6.3 | |
Responding to Content 56 6.4 | |
Summary | p. 66 |
User Interface | p. 67 |
Basic User Interface 697.1 | |
How to Show Screens 70 7.2 | |
TextBox, the Runt of the Litter 71 7.3 | |
Input Modes 72 7.4 | |
Using Alerts for Notifications 73 7.5 | |
A Very Quick Introduction to Images 74 7.6 | |
Putting It Together 74 7.7 | |
Good for the Old Ticker 76 7.8 | |
The Whole Story on Commands 76 7.9 | |
Command Placement 79 7.10 | |
Summary | p. 80 |
More User Interface 818.1 | |
Lists 81 8.2 | |
List Selections 83 8.3 | |
Handling List Events 83 8.4 | |
Three Lists in One Example 84 8.5 | |
Advanced List Control 86 8.6 | |
Using Forms 86 8.7 | |
Working with Items 88 8.8 | |
Gauges 89 8.9 | |
Controlling Item Layout 90 8.10 | |
Please Drink Form Responsibly 92 8.11 | |
Item Change Events and Item Commands 95 8.12 | |
Summary | p. 98 |
Graphics | p. 99 |
Creating Custom Screens 1019.1 | |
Getting Information about the Display 101 9.2 | |
How Painting Works 102 9.3 | |
Making Colors 102 9.4 | |
Drawing Lines and Shapes 105 9.5 | |
Drawing Text 109 9.6 | |
Measuring Text 111 9.7 | |
Creating Images 114 9.8 | |
Drawing Images 116 9.9 | |
Keeping Resources Small 118 9.10 | |
Drawing on Images 119 9.11 | |
Getting Your Fingers on the Bits 121 9.12 | |
Clipping 124 9.13 | |
Event Handling 124 9.14 | |
Controlling Command Placement 127 9.15 | |
Summary | p. 129 |
Custom Items 13110.1 | |
Custom Item Sizing 131 10.2 | |
Painting 132 10.3 | |
A Pretty Wait Indicator 132 10.4 | |
Handling Events in Custom Items 135 10.5 | |
Internal Traversal 136 10.6 | |
An Interactive Example 137 10.7 | |
Summary | p. 142 |
Using the Game API 14311.1 | |
Tight Looping with GameCanvas 143 11.2 | |
Building Scenes with Layers 148 11.3 | |
Tiled Layers 149 11.4 | |
Sprites 151 11.5 | |
Detecting Collisions 153 11.6 | |
Assembling a Game Scene 153 11.7 | |
A Blocky Example 154 11.8 | |
Summary | p. 158 |
Scalable Vector Graphics 15912.1 | |
The Simplest Way to Show SVG Content 160 12.2 | |
Working with Animated Documents 163 12.3 | |
Digging into an SVG Document 166 12.4 | |
Displaying an SVG Document on Your Own Canvas 168 12.5 | |
Creating New SVG Elements 171 12.6 | |
SVG Event Handling 174 12.7 | |
Summary | p. 178 |
3D Graphics 17913.1 | |
Creating M3G Files 179 13.2 | |
Displaying 3D Content the Easy Way 180 13.3 | |
Doing It the Hard Way 184 13.4 | |
Summary | p. 192 |
STORAGE AND | |
Table of Contents provided by Publisher. All Rights Reserved. |
The New copy of this book will include any supplemental materials advertised. Please check the title of the book to determine if it should include any access cards, study guides, lab manuals, CDs, etc.
The Used, Rental and eBook copies of this book are not guaranteed to include any supplemental materials. Typically, only the book itself is included. This is true even if the title states it includes any access cards, study guides, lab manuals, CDs, etc.