Knudsen_book.fm Page 381 Wednesday, November 28, 2007 2:55 PM

Index

A addTelephone method, 216 acceptAndOpen method addToCategory method, 219 OBEX, 282 Advanced Audio Coding (AAC) standard, 331 ServerSocketConnection, 260 Advanced Multimedia Supplements SipConnectionNotifier, 322 (AMMS) specification, 8, 327 StreamConnectionNotifier, 279 3D audio, 345–347 ACK method type, 320 audio special effects, 347 ActionNameMap class, 63 camera control, 347–348 Actions capabilities, 328–329, 341 games, 125 image format, 344–345 handlers, 56 image processing, 342–344 names, 63 music, 345 activate method, 174 radio, 348–349 Active MIDlet state, 37, 39 ALARM constant, 73, 75 Adaptive Multirate Narrowband (AMR-NB), AlarmRunnable class, 55–56 328 Alert class, 70 addAddress method, 267 Alerts, 73–75 addBoolean method, 216 AlertType class, 73 addCategory method Alpha compositing, 102 LandmarkStore, 372 Alphabetizing strings, 239 PIMList, 219 Anchors addCommand method, 95 images, 116 addContact method, 224, 228 text, 109, 112 addCredential method, 357 animate method, 180 addDate method, 216 Animated documents, 163–166 addFileSystemListener method, 209 AnimationGauge class, 132–135 addInt method, 216 Ant tool, 16 addLandmark method, 372 ANY constant, 71 addPlayerListener method, 332 APDUConnection class, 355 addRecord method, 198 APIs addRecordStoreListener method, 198 core, 27–28 AddressInfo class, 372 MSA, 7–9 addString method, 216 Appearance class, 186

381 Knudsen_book.fm Page 382 Wednesday, November 28, 2007 2:55 PM

382 INDEX

append method available method, 30 Form, 87 availableSize method, 208 LayerManager, 153 List, 82 B appendChild method, 171 BabbleMIDlet class, 239–244 appendln method BACK constant, 77 FileExerciserMIDlet, 211 BaldassareMIDlet class, 250–252 HTTPSInformationMIDlet, 256 BangCanvas class, 147–149 SeraphimMIDlet, 232 Base names in resource files, 235 SerialBoxMIDlet, 260 BASELINE constant, 109 Application identifiers, 267 Baselines for text, 109 Application management software (AMS), BillHandler class, 306–307 37–39 BillMIDlet class, 304–306 Application Protocol Data Units (APDUs), Binary messages, 265–266 353 BinaryMessage class, 265–266 Applications and application architecture, 375 bind method, 169 desktop, 376–377 binding Internet, 376 Graphics3D objects, 180 ME, 375 ScalableGraphics objects, 169 multiple devices, 377 bindTarget method, 169 properties, 40–41 Blender M3G Exporter tool, 179 stretchy screens, 377–378 BlueChew application, 283–293 working, 377–379 BlueChewFinder class, 287–291 Appointments. See Contacts and calendars BlueChewMIDlet class, 284–287 Arrays BlueChewServer class, 291–293 3D objects, 180 BlueChewService class, 293 boolean, 83 Bluetooth API, 275–276 color, 121–124, 185 application, 283–293 images, 82 client connections, 278–279 populating, 30–32 device discovery, 276–278 records, 198 devices, 276 string, 63 hardware, 7 string fields, 218–219 permissions, 282 Assembling game scenes, 153–154 push registry, 282 Attributes for PIM, 216 security, 280 Audio. See Sound and video server setup, 279 audio3d capability in AMMS, 341 service discovery, 278 authenticate method, 356 BluetoothStateException class, 276 AUTHMODE_ constants, 197 BOTTOM constant, 109 Authorization in Bluetooth, 280 BoxCanvas class, 103–104 Automatic MIDlet starting, 47 BoxMIDlet class, 104–105 content handlers. See Content handlers Browsers with , 40 network connections, 47–54 btl2cap connections, 279 running at specific times, 54–56 BubblesMIDlet class, 171–174 Knudsen_book.fm Page 383 Wednesday, November 28, 2007 2:55 PM

INDEX 383

Buffering for flickering, 102 ChoiceGroup class buildForm method color swatches for, 93 BabbleMIDlet, 241–242 events with, 95 SerialBoxMIDlet, 259 traversal, 136 Burst shooting, 348 types, 87, 89 BYE method type, 320 Cipher class, 359 Bytecode verifiers, 28 CityGuide sample application, 373 Classloaders, 28 cleanCalendar method, 224, 230–231 Cache class, 200–202 cleanContacts method, 224, 231 CacheMIDlet class, 202–203 Cleaning up Calendar class, 32 connections, 249 Calendars. See Contacts and calendars streams, 30–31 Callback methods, 21 clearField method, 217 Calls in MIDlets, 40 clearGauge method camera capability in AMMS, 341 BaldassareMIDlet, 252 Camera control, 347–348 FlickrMIDlet, 312 CameraControl class, 348 HTTPSInformationMIDlet, 256 CANCEL constant, 77 clearImage method, 313 CANCEL method type, 320 Client connections for Bluetooth, 278–279 canRead method, 207 ClientSession class, 281 Canvas and Canvas class, 101–102 Clipping, 124 games, 143–148 clipRect method, 124 settings, 101–102 close method SVG, 168–170 Connection, 249 video, 334–335 PIM, 221 canWrite method, 207 Player, 332 Capabilities in AMMS, 328–329, 341 CLOSED constant, 330 Capturing video, 338 CMSMessageSignatureService class, CarCanvas class, 116–118 356–358 Carriers, 5 Code Division Multiple Access (CDMA) Categories networks, 331 contacts, 219 Code signing, 44 landmarks, 372 Collections, 32 Cell Broadcast Service (CBS), 7 collidesWith method, 153 Certificate Authorities (CAs), 356 Collisions of sprites, 153 Certificate Signing Request (CSR), 357 Color Certificates, 357 making, 102–105 Change events, 95–97 manipulating, 121–124 characters method, 297–298 COLOR_ constants, 103 charsWidth method, 111 Color swatches, 93 charWidth method, 111 Command line, 16–17 CheapHandler class, 297–298 commandAction method, 54 checkPermission method, 43 CommandListener interface, 24, 78, 83 Knudsen_book.fm Page 384 Wednesday, November 28, 2007 2:55 PM

384 INDEX

Commands, 23–24 ContactList class, 217–220 form items, 95–97 Contacts and calendars, 215 overview, 76–79 categories, 219 placement, 79–80, 127–128 example, 223–232 CommConnection interface, 257–258 field labels, 219 commit method importing and exporting, 221–222 ContactList, 219 lists, 219–220 for contacts, 221 methods for, 220 PIMItem, 216 permissions, 222–223 Communication with smart cards, 355–356 PIMItem, 215–216 compare method, 239 queries, 217–218 complete method, 343 string array fields, 218–219 Conditionally mandatory APIs, 7 support for, 222 CONFIRMATION constant, 73, 75 contains method, 291 connect method Content ClientSession, 281 3D, 180–183 ServerRequestHandler, 282 SVG, 160–163 Connected Device Configuration (CDC) Content area for custom items, 131 devices, 9, 56, 161 Content Handler API (CHAPI), 9, 56–57 Connected, Limited Device Configuration Content handlers, 56–57 (CLDC) devices, 4, 9, 28, 161 invoking, 57–59 Connection strings static registration, 65–66 Bluetooth client connections, 278 testing, 64–65 GCF, 247 writing, 59–64 multipart messages, 267 Content IDs, 267 OBEX, 282 Content types push registries, 48 multipart messages, 267 Connections and Connection class, 247 sound and video, 331 Bluetooth, 278–279 ContentHandlerServer class, 63–64 cleaning up, 249 Continuous noninteractive gauges, 90 HTTP, 248–249, 252–253 CONTINUOUS_RUNNING constant, 90 HTTPS, 254–257 Controls image loading, 250–252 camera, 347–348 incoming, 49, 260–261 sound and video, 332–333 making, 247–249 Cookies, 253 network, 47–54 Coordinate systems permissions, 261 screen, 105–106 threads, 250 viewports, 175 tips, 253–254 Core APIs, 27–28 types, 257–260 Country locale codes, 234 Connector class, 205, 247–248 countValues method, 217 Consistency, 379 create method, 206–207 Contact class, 216 createAnimatedTile method, 150 CONTACT_LIST constant, 220 createAnimator method, 161 Knudsen_book.fm Page 385 Wednesday, November 28, 2007 2:55 PM

INDEX 385

createContact method, 219 sizing, 131–132 createDirectory method, 212 wait indicator, 132–135 createElementNS method, 171 Custom screens, 101 CreateEmptyImageDemo class, 171 clipping, 124 createEvent method, 220 color, 102–105, 121–124 createFile method command placement, 127–128 FileConnection, 207 creating images, 114–116 FileExerciserMIDlet, 212 display information, 101–102 createImage method drawing images, 116–118 Image, 115, 119 drawing on images, 119–120 ScalableImage, 160–161 drawing text, 109–111 createIndices method, 187 event handling, 124–127 createInstance method, 168 lines and shapes, 105–109 createLandmarkStore method, 372 measuring text, 111–114 createMutable method, 120 painting, 102 createPlayer method resources for, 118 Manager, 335–336 Player, 330 D createRGBImage method, 122 Databases createSoundSource3D method, 346 landmarks, 372 createToDo method, 220 record stores. See Record stores createUI method, 285 DatagramConnection interface, 257–258 createVertexBuffer method, 188 Date class, 32 createVertexColors method DATE_ constants, 238 CubeMeshGenerator, 187–188 DateField class, 87, 89 SphereMeshGenerator, 191 Dates createVertices method, 187 displaying, 32 createWorld method, 191 formatting, 237–239 cref program, 354–355 DATETIME_ constants, 238 Criteria class, 370 DECIMAL constant, 71 Cryptographic Message Syntax, 356 Decompiling, 17 Cryptography, 357 DefaultHandler class, 297 Bluetooth, 280 defineCollisionRectangle method, 153 ciphers, 359 defineReferencePixel method, 152 message digests, 357–358 delete method signatures, 358 ClientSession, 281 CubeMeshGenerator class, 186–188 FileConnection, 207 Currency representation, 238 List, 82 Current layout directive, 92 deleteAll method, 82 Custom items and CustomItem class, 131 deleteCategory method events, 135–136 LandmarkStore, 372 fonts, 137–141 PIMItem, 219 internal traversal, 136–137 deleteRecord method, 198 painting, 132 deleteRecordStore method, 197 Knudsen_book.fm Page 386 Wednesday, November 28, 2007 2:55 PM

386 INDEX

Desktop applications, 376–377 drawLine method, 107 destroyApp method, 21 drawRect method, 107 Destroyed MIDlet state, 37–39 drawRGB method, 121 Detecting sprite collisions, 153 drawRoundRect method, 107 Developer keys, 308 drawString method, 109 deviceDiscovered method Dynamic push registration, 48 BlueChewFinder, 289 DiscoveryListener, 277 E DeviceListener interface, 277 EclipseME tool, 13 Devices editNickname method, 223–224, 228–229 discovery, 276–278 Effects, audio, 347 testing, 18–19 ElevenMIDlet class, 148 DiamondFrameCanvas class, 169–170 EMAILADDR constant, 71 digest method, 358 Emulators Directories overview, 18 private, 208 SATSA testing with, 354–355 streams for, 206–208 Sun Java Wireless Toolkit for CLDC, 11–12 directorySize method, 207 en-GB resource file, 237 disconnect method, 281 en-US resource file, 237 Discovery, device, 276–278 Encryption, 357 DiscoveryAgent class, 276–277 Bluetooth, 280 DiscoveryListener interface, 277 ciphers, 359 dispatchMouseEvent method, 174 message digests, 357–358 Display class, 22 signatures, 358 Displayable class, 78 endElement method, 297–298 Displaying enumerateRecords method, 199 3D content, 180–183 Enumeration interface, 32, 207 screens, 70–71 EqualizerControl class, 345 SVG documents, 168–170 ERROR constant, 73 Documentation for REST, 307 EVENT_LIST constant, 220 Documents EventList class, 220 animated, 163–166 Events and event handling displaying, 168–170 contacts, 222 manipulating, 166–168 custom items, 135–136 doFinal method, 359 custom screens, 124–127 Domains, protection, 41–423 item change, 95–97 Double buffering, 102 lists, 83–84 DOWN constant, 125 SVG, 174–178 DOWN_PRESSED constant, 146 exchangeAPDU method, 355 drawArc method, 107 EXCLUSIVE forms, 87 Drawing EXCLUSIVE lists, 81–83 images, 116–118 exists method, 207 on images, 119–120 EXIT constant, 77 lines and shapes, 105–109 Exporting contacts, 221–222 text, 109–111 Exposure modes, 348 Knudsen_book.fm Page 387 Wednesday, November 28, 2007 2:55 PM

INDEX 387

ExposureControl class, 348 FontChoice class, 138–141 Extensible Markup Language (XML), 295 Fonts parsing, 296, 301–303 custom items, 137–141 with REST, 307 lists, 86 ExternalResourceHandler class, 160–161 text, 109–111 formatCurrency method, 238 F formatDate method, 238 FACE_ constants, 110 formatMessage method, 238 Feeds, RSS, 298–301 formatNumber method, 238 Fields for contacts, 215, 218–219, 222 formatPercentage method, 238 fileconn.dir properties, 208–209, 331 Formats for images, 344–345 FileConnection class, 195–196, 205–206 Formatter class, 237–238, 242, 244 FileExerciserMIDlet class, 210–213 Formatting numbers and dates, 237–239 Files, 205 Forms, 86–88 example, 210–213 gauges, 89–90 permissions, 209–210 items. See Custom items and CustomItem pictures and music, 208–209 class; Items roots, 209 limitations, 92–95 streams for, 206–208 Frames and frame sequences for sprites, fileSize method, 207 151–152 FileSystemRegistry class, 209 frizz method, 122–123 fillArc method, 107 fromSerialFormat method, 221 fillCells method, 150 Fundamental classes, 27 Filling rectangles, 105–107 fillRect method, 104, 107 G fillRoundRect method, 107 GAME_ constants, 125, 146 fillTriangle method, 107 GameCanvas class, 143–148 finally keyword, 31 Games, 143 findByUsername method, 308 actions, 125 Finding resources, 235–236 blocky example, 154–158 FIRE constant, 125 canvas, 143–148 FIRE_PRESSED constant, 146 layers, 148–151 FirenzeCanvas class, 111 scene assembly, 153–154 FlashControl class, 348 sprites, 151–153 Flickering, double buffering for, 102 Gauge class, 87, 89–90 Flickr photo sharing service, 308–317 Gauges, 89–90 FlickrMIDlet class, 308–314 generate method, 186 FlickrPhotoListHandler class, 309, 315–317 generateCSR method, 357 FlickrUserHandler class, 309, 314–315 Generic Connection Framework (GCF). See Floating-point numbers for currency, 238 Connections and Connection class flushGraphics method, 146 GET connection type, 252 FM radio, 349 get method FocusControl class, 348 Cache, 200, 202 focusOn method, 175 ClientSession, 281 Font class, 110–111 ResourceManager, 234 Knudsen_book.fm Page 388 Wednesday, November 28, 2007 2:55 PM

388 INDEX

getAppProperty method, 41 LandmarkStore, 372 getArrayElementLabel method, 219 LocationProvider, 370 getAttribute method, 316 MessageDigest, 357 getAttributeLabel method, 219 PIM, 220 getBestImageHeight method, 74 Signature, 358 getBestImageWidth method, 74 getInteractionModes method, 135–136 getCategories method getKeyName method, 125 LandmarkStore, 372 getKeyStates method, 146 PIMItem, 219 getLastKnownLocation method, 371 getColor method, 103 getLayerAt method, 153 getColorImage function, 93, 95 getLocalDevice method, 276 getCommPorts method, 258–260 getManager method, 235, 237 getConnectionURL method, 278 getMethod method, 322 getContactName method, 224, 231–232 getMinContentHeight method getControl method AnimationGauge, 134 for cameras, 348 CustomItem, 131 Player, 332 FontChoice, 140 getControls method, 333 getMinContentWidth method getDate method, 89 AnimationGauge, 134 getDefaultFont method, 110 CustomItem, 131 getDefaultTimeout method, 73 FontChoice, 140 getDisplay method, 70 getName method, 303 getDocument method, 166 getNSID method, 315 getDocumentElement method, 166 getOrientation method, 373 getElementById method, 166 getPhotoURLs method, 315 getFeatureID method, 363 getPrefContentHeight method getFieldLabel method, 219 AnimationGauge, 134 getFinishedTimestamp method, 363 CustomItem, 132 getFont method FontChoice, 140 Font, 110 getPrefContentWidth method FontChoice, 139 AnimationGauge, 134 getFormatter method, 241 CustomItem, 132 getGameAction method, 125, 135 FontChoice, 140 getGameActionName method, 126 getPresetNames method, 342 getGraphics method, 119–120, 146 getProperty method, 29 getHeaderField method, 253 getPublicPhotos method, 309 etHeight method getQualifiedCoordinates method, 370 Canvas, 101 getReceiveMTU method, 279 Font, 111 getRecord method, 198 getHTTPSInformation method, 256 getRecordSize method, 198 getImage method, 82 getRepeat method, 220 getInitialReference method, 356 getRequest method, 64 getInstance method getResources method, 240–241 Cipher, 359 getRGB method, 121–122 Graphics3D, 180 getRoot method, 211 Knudsen_book.fm Page 389 Wednesday, November 28, 2007 2:55 PM

INDEX 389

getSelectedFlags method, 83 Google Maps, 376 getSelectedIndex method, 83 GoSIP example, 323 getServer method, 64 Graphics getSize method, 153 3D. See 3D graphics getSizeAvailable method, 198 custom items. See Custom items and getSnapshot method, 338 CustomItem class getSpeech method, 304 custom screens. See Custom screens getState method, 363 games. See Games getString method SVG. See Scalable Vector Graphics List, 82 (SVG) ResourceManager, 234 Graphics class, 8, 107 TextField, 89 Graphics3D class, 180 getSupportedContentTypes method, 331 Grayscale display, 102 getSupportedFormats method, 345 Handlers getSupportedMediaProcessorInputTypes content. See Content handlers method, 342 event. See Events and event handling getSupportedProtocols method, 331 parser, 296–298 getSupportedRepeatRuleFields method, 220 getTargetComponent method, 161 H getText method, 303 HanzUndFranzMIDlet class, 344 getTightRGB method, 121, 123 HashTable class, 32 getTimestamp method hasMore method Location, 370 HermesMessageReader, 273 LocationProvider, 371 MessageConnection, 271 getTitleTileImage method, 119–120 hasNextElement method, 199 getTrait method, 167 hasPointerEvents method, 127 getTransactionID method, 363 hasPointerMotionEvents method, 127 getTranslateX method, 105 hasPreviousElement method, 199 getTranslateY method, 105 hasRepeatEvents method, 125 getTransmitMTU method, 279 HCENTER constant, 109 getURL method, 289 HeaderSet class, 281 getWidth method, 101 height method, 111 getWrapHeight method, 111, 113 HELP constant, 77 getX method, 152 HermesForm class, 270 getY method, 152 HermesMessageForm class, 270 Global Positioning System (GPS), 369 HermesMessageReader class, 270–272 current location, 370–371 HermesMIDlet class, 269–270 landmarks, 372 hideNotify method orientation, 373 AnimationGauge, 133–134 proximity, 371 BangCanvas, 147 simulating device location, 373–374 BubblesMIDlet, 174 updates, 371 Canvas, 127, 163 Global System for Mobile Communications LayersCanvas, 157 (GSM), 331, 354 MeshCanvas, 190 GlobalManager class, 342 SimpleAnimatorMIDlet, 165 Knudsen_book.fm Page 390 Wednesday, November 28, 2007 2:55 PM

390 INDEX

hideNotify method, continued import method, 221 SimpleM3GCanvas, 182 importAppointment method, 224, 229–230 SVGEventMIDlet, 177 importContact method, 220 TypicalCanvas, 144 importEvent method, 220 TypicalGameCanvas, 145 Importing contacts, 221–222 Hints importToDo method, 220 alerts, 73 Incoming connections, 49, 260–261 OBEX, 280 Incremental noninteractive gauges, 90 Hot swappable devices, 354 incrementTime method, 175 HTTP INDEFINITE constant, 90 advanced techniques, 252–253 IndexBuffer class, 186 connections, 248–249 Indices image loading via, 250–252 layers, 153 threads, 250 list items, 82–83 HttpConnection class, 249, 253 PIMItem, 216–217 HTTPS, 254–257 records, 198 HttpsConnection class, 254 INFO constant, 73 HTTPSInformationMIDlet class, 254–257 information method, 224, 227–228 Inheritance, resource, 237 I INITIAL_CAPS_SENTENCE modifier, 72 Identified third-party domains, 42 INITIAL_CAPS_WORD modifier, 72 IDs initRequest method, 322 content, 267 initResponse method, 322 record, 198–199 Input IllegalArgumentException class, 72, 74 desktop applications, 376–377 ImageEffectControl class, 342 reading, 31–32 imageencoding capability in AMMS, 341 streams for, 30–32 ImageFormatControl class, 344–345 Input modes, 72–73 ImageItem class, 87–88 InputConnection class, 249 imagepostprocessing capability in AMMS, InputStream class, 30–32, 206, 221 341 InputSubset class, 72 Images, 74 inquiryCompleted method alerts, 73 BlueChewFinder, 289 creating, 114–116 DiscoveryListener, 277 drawing, 116–118 insert method drawing on, 119–120 LayerManager, 153 formats, 344–345 List, 82 in lists, 82–83 insertBefore method, 171 loading, 250–252 Interactive Audio Special Interest Group processing, 342–344 (IASIG) guidelines, 345 ImageTransformControl class, 343 Interactive custom item example, 137–141 Immediate mode in M3G, 184 Interactive gauges, 89–90 Immutable images, 115 Interactive MIDI player, 336 IMPLICIT lists, 81–83 Internal traversal of custom items, 136–137 Knudsen_book.fm Page 391 Wednesday, November 28, 2007 2:55 PM

INDEX 391

Internationalization. See Mobile Java Archive (JAR) files, 14 internationalization java.awt.im.InputSubset class, 72 Internet Mail Consortium, 221 RMI, 355–356 Internet strengths, 376 (JCP), 4 INVITE method type, 320 java.io package, 27, 30, 205 InvocationRunnable class, 62–63 java.lang package, 27 invoke method, 57, 59 Long class, 29 invokeAndWait method, 168, 171 Runtime class, 29 invokeLater method, 168, 171 String class, 28 Invoking content handlers, 57–59 System class, 29 IOConnection class, 249 UnicodeBlock class, 72 IOException class, 74 Java ME strengths, 375 isColor method, 102 java.security package isDirectory method, 207 MessageDigest class, 357 isDoubleBuffered method, 102 Signature class, 358 isHidden method, 207 Java Specification Requests (JSRs), 4–5 isSupportedArrayElement method, 222 Java Technology for Wireless Industry isSupportedAttribute method, 222 (JTWI), 5–6 isSupportedField method, 222 java.util package, 27 isValid method, 370–371 Date class, 32 Item class, 87, 92 Random class, 32 ItemCommandListener class, 95 java.util.concurrent package, 29 ItemMIDlet class, 96–97 (JVM), 4–5 Items, 87–89 javac compiler, 16 change events and commands, 95–97 JavaCardRMIConnection class, 355–356 custom. See Custom items and JavaFX product line, 10 CustomItem class javax.bluetooth package, 275 layout, 90–92 javax.bluetooth.UUID class, 277 lists, 217–220 javax.crypto.Cipher class, 359 working with, 88–89 javax.microedition.amms package, 342 items method javax.microedition.amms.control.audio3d ContactList, 217–218 package, 346 EventList, 220 javax.microedition.amms.control.audioeffect ToDoList, 220 package, 347 itemsByCategory method, 219 javax.microedition.amms.control.camera itemStateChanged method, 95, 97 package, 348 ItemStateListener interface, 95–97 javax.microedition.amms.control.imageeffect Iterating through records, 199 package, 343 javax.microedition.amms.control.tuner J package, 348 J2ME Polish compiler, 17 javax.microedition.apdu.APDUConnection J2ME Wireless Toolkit, 11 class, 355 jar tool, 16 javax.microedition.content.Registry class, Java API for XML Parsing (JAXP), 9 57 Knudsen_book.fm Page 392 Wednesday, November 28, 2007 2:55 PM

392 INDEX

javax.microedition.global package, 233 Key states, 146 javax.microedition.io package, 247 KeyCanvas class, 125–126 javax.microedition.io.Connector.bluetooth keyPressed method package, 282 BubblesMIDlet, 174 javax.microedition.io.Connector.obex Canvas, 124, 127 package, 282 CustomItem, 135 javax.microedition.io.PushRegistry class, FontChoice, 140 48–49 GameCanvas, 146 javax.microedition.jcrmi.JavaCardRMI- KeyCanvas, 126 Connection class, 355–356 SimpleAnimatorMIDlet, 165 javax.microedition.lcdui package, 22 SVGEventMIDlet, 177 CustomItem class, 131 TypicalCanvas, 144 Display class, 70 keyReleased method Displayable class, 69 BubblesMIDlet, 174 Font class, 110 Canvas, 124 javax.microedition.lcdui.game package, CustomItem, 135 115, 143 GameCanvas, 146 javax.microedition.location package, 369, KeyCanvas, 126 373 SimpleAnimatorMIDlet, 165 javax.microedition.m2g package, 160 SVGEventMIDlet, 177 javax.microedition.media.control package, keyRepeated method, 125–126, 146 332 KickButtMIDlet class, 22–24, 38–39 javax.microedition.media.Manager class, 329 KToolbar tool, 11, 22 javax.microedition.media package, 329 kXML 2 parser, 301–302 javax.microedition..MIDlet class, 21 KXmlParser class, 302–303 javax.microedition.payment package, 361 javax.microedition.pim package, 215 L javax.microedition.pki.UserCredential- L2CAP protocol, 278–279 Manager class, 356–357 L2CAPConnection class, 248, 279 javax.microedition.rms package, 196 L2CAPConnectionNotifier class, 279 javax.microedition.securityservice.CMS- Labels MessagesSignatureService class, 356 command, 77 javax.microedition.sip package, 320 contact fields, 219 javax.obex package, 275 Landmarks in Global Positioning System, javax.xml.parsers package, 296 372 jaxp.xml.parsers.SAXParser class, 296 LandmarkStore class, 372 JEnable compiler, 17 Language locale codes, 234 JPEG format, 342 lastModified method, 207 JSR 172, XML parsing without, 301–303 Latched key states, 146 Juinness tool, 180 Layer class, 148 Layer managers, 149 K LayerManager class, 151, 153–154 K Virtual Machine (KVM), 28 Layers KEY_ constants, 124, 135 tiled, 148–151 Key codes, 124–125 view windows, 153 Knudsen_book.fm Page 393 Wednesday, November 28, 2007 2:55 PM

INDEX 393

LayersCanvas class, 154–158 locationUpdated method, 371 LAYOUT_ constants, 92 Log class, 293 Layout directives, 88, 90–92 Long class, 29 LCDUI screens, 69–70, 377–378 Long labels for command, 77 LEFT constant lookupPicture method, 310, 314 games, 125 lookupPictures method, 310, 313–314 text, 109 lookupUser method, 310, 313 LEFT_PRESSED constant, 146 Life cycle of MIDlets, 37–40 M Lines, drawing, 105–109 M3G Exporter for 3ds Max 5.1 and 6.0 list method, 207 tool, 180 listConnections method, 49, 53 M3G files, 179–180 Listeners M3GToolkit tool, 180 for media, 332 makeBubble method, 173 for parsers, 296 makePart method, 267–268 listPIMLists method, 221 Manager class, 329–331 listRecordStores method, 197 Mandatory APIs, 7 listRoots method, 209 Manufacturer domains, 42 Lists and List class, 81–82 Mascot Capsule M3GConverter tool, advanced control, 86 179 creating, 82–83 maxCategories method, 219 events, 83–84 Measuring text, 111–114 examples, 84–86 MediaException class, 329, 336 PIMItem, 217–221 MediaProcessor class, 342–343 selections, 83 MediaProcessorListener interface, 343 load method, 180 Mesh class, 184 loadBytes method, 249, 252 MeshCanvas class, 189–191 Loader class, 180 Meshes, 184–191 loadImage method, 123 MeshMIDlet class, 189 loadImages method, 116–118 Message digests, 357–358 LocalDevice class, 276–277 MessageConnection class, 248, 263–264, Locales, 233–234 268, 271 Location API, 8–9, 369 MessageDigest class, 357–358 current location, 370–371 MessageListener class, 268–269 landmarks, 372 MessagePart class, 268 orientation, 373 messageReceived method, 287 proximity, 371 Messages, 263 scripts, 373 application, 269–273 simulating device location, 373–374 purpose, 263–264 updates, 371 receiving, 268–269 Location in multipart messages, 267 sending, 264–268 LocationControl class, 346 microedition-locale property, 234 LocationException class, 370, 373 MIDI. See Musical Instrument Digital LocationListener interface, 371 Interface (MIDI) standard LocationProvider class, 370–371 MIDIControl class, 336 Knudsen_book.fm Page 394 Wednesday, November 28, 2007 2:55 PM

394 INDEX

MIDlets, 13–14, 21–22 Modes application properties, 40–41 exposure, 348 browser and calls, 40 input, 72–73 building, 15–16 M3G, 179, 184 colors, 102–105 Modifiers in TextField, 72 contents, 14–15 Money life cycle, 37–40 payments. See Mobile payments permissions, 42–44 representation, 238 protection domains, 41–42 Multimedia, 8 signing, 44 AAMS. See Advanced Multimedia starting automatically. See Automatic Supplements (AMMS) specification MIDlet starting; Content handlers messaging. See Messages MIDletStateChangeException class, 39 sound and video. See Sound and video MIDP_LOWERCASE_LATIN modifier, 72 Multimedia Messaging Service (MMS), 7, MIDP_UPPERCASE_LATIN modifier, 72 12, 263–264, 266 Minimum size of custom items, 131 Multipart messages, 266–268 Mirroring sprites, 152 MutipartMessage class, 266–267 mkdir method, 206–207 MultiParts class, 266 MMMIDlet application, 339–340 Multiple devices, developing for, 377 Mobile 3D Graphics (M3G) API, MULTIPLE forms, 87 179–180 MULTIPLE lists, 81–83 Mobile client for Flickr, 308–317 music capability in AMMS, 341 Mobile Information Device Profile (MIDP) Music files, 208–209 overview, 3 Musical Instrument Digital Interface (MIDI) future, 9–10 standard, 328 Java technology, 4–5 content files, 330–331 avaFX, 10 interactive player, 336 MSA APIs, 7–9 tones, 329 umbrella specifications, 5–7 volume control, 332–333 wireless devices, 3–4 Musical tetrahedron, 346–347 Mobile internationalization, 9, 233 Mutable images, 115 example, 239–244 locales, 233–234 N number and date formats, 237–239 NAME_ constants, 218 resources, 234–237 Names sorting strings, 239 contacts, 218 Mobile Media API (MMAPI), 8, 327–329 files and directories, 207 Mobile payments, 361 PIMItem, 216–217 process, 362–363 resource files, 235 providers, 364 Native methods, 28 provisioning information, 365–366 NetBeans Mobility Pack, 13–14 security, 366 Networking Mobile Service Architecture (MSA) advanced, 7 specification, 6–9, 11 Bluetooth. See Bluetooth API Knudsen_book.fm Page 395 Wednesday, November 28, 2007 2:55 PM

INDEX 395

connections. See Connections and onConnect method, 282 Connection class onGet method, 282 messages. See Messages onPut method, 282 OBEX, 275–276, 280–282 open method SIP. See Session Initiation Protocol (SIP) Connector, 205, 247–248, 260, 279, 282 API Invocation, 64 web services, 295–296, 303–317 openComm method, 259 XML, 295–296, 301–303, 307 openDataInputStream method, 206 newDatagram method, 258 openDataOutputStream method, 206 newMessage method, 264 openInputStream method, 206, 249 newSAXParser method, 296 openOutputStream method, 206 next method openPIMList method, 221 HermesMessageReader, 273 openRecordStore method, 196–197 kXMLParser, 302 Operator domains, 42 MessageConnection, 271 Optional APIs, 5 nextFrame method, 151 OPTIONS method type, 320 nextRecord method, 199 org.kxml2.io.KXmlParser class, 302–303 nextRecordId method, 199 org.w3c.dom.event package, 166 Nicknames, 216–217 org.w3c.dom.svg package, 166–167 Nodes in 3D graphics, 184 org.xml.sax.helpers package, 296 NON_PREDICTIVE modifier, 72 Orientation class, 373 Noninteractive gauges, 89–90 Orientation in Global Positioning System, 373 Note numbers, 329 Origins in coordinate systems, 105 Notifications, alerts for, 73 Output streams, 30–32 Notifiers in SIP, 321 OutputStream class, 206 notify method, 269 notifyDestroyed method, 39 P notifyIncomingMessage method, 268–269, Packaging with jar tool, 16 271–272 Packed integers for color, 102–103 notifyPaused method, 39 packRecord method, 201–202 notifyResponse method, 322 paint method, 102 numAlphaLevels method, 102, 121 Painting Number formatting, 237–239 custom items, 132 numColors method, 102 custom screens, 102 NUMERIC constant, 71 parse method BillMIDlet, 306 O TopTenMIDlet, 301 OBEX API, 275–276, 280–282 parseRecord method, 201 ObexImageReceiver class, 281 parseToHandler method, 314 ObexImageSender class, 280 Parsing Obfuscators, 17–18 handlers, 296–298 Object finalizers, 28 RSS, 298–301 Object3D class, 180 XML, 296, 301–303 OK constant, 77 PASSWORD modifier, 72 Knudsen_book.fm Page 396 Wednesday, November 28, 2007 2:55 PM

396 INDEX

Pathnames for files, 208 pointerReleased method, 127 pause method, 161 BubblesMIDlet, 174 pauseApp method, 21–24 SimpleAnimatorMIDlet, 165 Paused MIDlet state, 37–39 SVGEventMIDlet, 177 Payment API, 361 POPUP forms, 87, 89 payment providers, 364 Ports for messages, 265 security, 366 Positioning sprites, 152 Payment provisioning information, 364 POST connection type, 252 Payment update files, 364 Preferred size for custom items, 131 Payments, mobile. See Mobile payments prefetch method, 330, 336 PDA Optional Packages, 205 PREFETCHED constant, 330 Permissions Premium Priced SMS (PPSMS) transactions, audio recording, 337 364 Bluetooth and OBEX, 282 Preprocessors, 17 connections, 261 Preset images, 342–343 contacts, 222–223 Preverified class files, 16 files, 209–210 prevFrame method, 151 MIDlets, 42–44 previousRecord method, 199 RMS, 195 previousRecordId method, 199 SIP, 320 Primitive types, 28–29 Personal Information Management (PIM) Priorities for command, 77–78 API, 9, 195, 215, 222 process method, 362 PHONENUMBER constant, 71 processCharacters method Picture files, 208–209 BillHandler, 306 PIMItem class, 215–221 DefaultHandler, 298 PIMList class, 217–221 TopTenHandler, 301 platformRequest method, 40 processed method, 363 play method, 161, 163 processKeys method PlayerListener class, 332 BangCanvas, 147–148 Players and Player class, 327, 329–331 LayerManager, 15 audio recording, 337 LayersCanvas, 157 cameras, 348 SimpleM3GCanvas, 183 controls, 332–333 TypicalGameCanvas, 145 sampled audio content, 333 processStart method threading and listening, 332 DefaultHandler, 298 video, 333–335 FlickrPhotoListHandler, 315 playerUpdate method, 332 FlickrUserHandler, 315 playTone method, 329 ProGuard obfuscator, 18 POINTER_ constants, 135–136 Properties for application, 40–41 Pointer events, 127 Protection domains, 41–43 pointerDragged method, 127, 135 Providers for mobile payments, 364 pointerPressed method, 127 providerStateChanged method, 371 BubblesMIDlet, 174 Provisioning information for mobile SimpleAnimatorMIDlet, 165 payments, 364–366 SVGEventMIDlet, 177 proximityEvent method, 371 Knudsen_book.fm Page 397 Wednesday, November 28, 2007 2:55 PM

INDEX 397

ProximityListener interface, 371 Record Management System (RMS) API, ProximityListeners interface, 373 195–196 Pseudorandom number generators, 32 Record stores, 195–196 Public Key Infrastructure (PKI), 354 databases, 196 Push parsers, 296 example, 200–204 Push registries, 7, 47–54, 282 iterating, 199 PushRegistry class, 48–49 manipulating, 198 PushyMIDlet class, 49–54 queries, 199 put method, 281 working with, 196–198 RecordComparator class, 199 Q RecordEnumeration class, 199 QualifiedCoordinates class, 372 RecordFilter class, 199 Queries Recording audio, 337 PIM lists, 217–218 RecordStore class, 196–197 record stores, 199 RecordStoreException class, 196–197 RecordStoreListener class, 198 R Rectangles, filling, 105–107 Radio, 348–349 Reference pixels in sprites, 152 Random class, 32 Reflection, 28 Random numbers, 32 Register command, 53, 65 Raster format, 159 register method, 65 RateControl class, 333 REGISTER method type, 320, 322 Raw images, 342 registerAlarm method, 40, 54 RDSControl class, 348–349 registerConnection method, 48 read method RegisterContentRunnable class, 61–62 Cache, 200–201 RegisterRunnable class, 51, 54 InputStream, 30 Registration readAll method content handlers, 65–66 BaldassareMIDlet, 250, 252 push registries, 48–49 FlickrMIDlet, 314 Registry class, 57 InputStream, 32 releaseTarget method, 169, 180 readFile method, 212 Remote Method Invocation (RMI), 303, Reading input data, 31–32 355–356 Real-Time Streaming Protocol (RTSP), Remote objects with smart cards, 355 331 RemoteException class, 304 realize method, 330 remove method REALIZED constant Cache, 200, 202 Player, 330 LayerManager, 153 video, 334 removeContact method, 219 receive method removeCredential method, 357 Connector, 279 removeDirectory method, 212 Datagram, 258 removeEvent method, 220 MessageConnection, 268 removeFile method, 212 Receiving messages, 268–269 removeFromCategory method, 219 reconcile method, 287–288, 290–291 removeToDo method, 220 Knudsen_book.fm Page 398 Wednesday, November 28, 2007 2:55 PM

398 INDEX

rename method, 207 runImagePostProcessingRaw method, 344 render method, 169 Runnable class, 168 BangCanvas, 148 Runtime class, 29 LayersCanvas, 157–158 runURL method, 286–287 MeshCanvas, 190 SimpleM3GCanvas, 183 S TypicalGameCanvas, 145 Sampled audio content, 333 repaint method SATSA-APDU API, 355 Canvas, 102 SATSA-CRYPTO API, 357–358 CustomItem, 132 SATSA-JCRMI API, 355–356 Repeat events, 125 SATSA-PKI API, 356–358 RepeatRule class, 220 SATSADemos application, 355 Representational State Transfer (REST) SAXParser class, 296 approach, 295–296 SAXParserFactory class, 296 Flickr photo sharing service, 308–317 Scalable Vector Graphics (SVG), 159–160, principles, 307–308 378 requestResource method, 161 adding elements, 171–174 Requests in SIP, 321–322 animated documents, 163–166 ResourceManager class, 234–237 content, 160–163 Resources displaying documents, 168–170 for custom screens, 118 event handling, 174–178 inheritance, 237 manipulating documents, 166–168 internationalization. See Mobile ScalableGraphics class, 168–169 internationalization ScalableImage class, 160 Responses Scene graph API, 179 to network connections, 47–54 Scenes SIP, 322 games, 153–154 resumeRequest method, 39 with layers, 148–151 Retained mode in M3G, 179 Screen classes, 22–23 retrieveDevices method, 278 SCREEN constant, 77 ReverbControl class, 347 Screens RFCOMM protocol, 278, 281 custom. See Custom screens RGBCanvas class, 122–123 displaying, 70–71 Rich Site Summary (RSS) parsing, 298–301 LCDUI, 69–70, 377–378 RIGHT constant stretchy, 377–378 games, 125 searchServices method, 277–278 text, 109 Secure Sockets Layer (SSL), 254 RIGHT_PRESSED constant, 146 SecureConnection interface, 257 rootChanged method, 209 Security and transactions, 8, 351, 361, 363 Roots, file, 209 application architecture. See Applications Rotating and application architecture sprites, 152 audio recording, 337 trademark symbol, 167–168 Bluetooth, 280 runImagePostProcessingJPEG method, 344 cryptography, 357–359 Knudsen_book.fm Page 399 Wednesday, November 28, 2007 2:55 PM

INDEX 399

GPS. See Global Positioning System (GPS) Session Initiation Protocol (SIP) API, 7, mobile payments, 361–366 319–320 smart cards, 354–357 development tools, 321 Security and Trust Services APIs (SATSA), examples, 323 353–354 notifiers, 321 application testing with emulator, 354–355 overview, 320 certificates, 357 requests, 321–322 cryptography, 357–359 responses, 322 smart cards, 354–357 set method, 200, 202 SecurityException class, 43, 249 setAnimatedTile method, 151 Selections in lists, 83 setCell method, 150 selectService method, 278 setClip method, 124 send method setColor method, 103 Datagram, 258 setCommandListener method, 24 L2CAPConnection, 279 setCurrent method, 70 SIPClientConnection, 321 setDate method, 89 sendBinary method, 265–266 setDisplayFullScreen method, 334 Sending setFileConnection method, 207 binary messages, 265–266 setFitPolicy method, 86 messages, 264–265 setFont method multipart messages, 266–268 Font, 110 RIP requests, 321–322 List, 86 SIP responses, 322 setFrame method, 152 SendMIDlet class, 53 setFrameSequence method, 151 sendMultipart method, 266 setFullScreenMode method, 71, 101 sendText method, 264, 270 setInitialInputMode method, 73 SENSITIVE modifier, 72 setInput method, 342–343 Sensitive operations, 41 setItemCommandListener method, 95 SeraphimMIDlet class, 223–232 setItemStateListener method, 95 SerialBoxMIDlet class, 258–260 setLocationListener method, 371 Server setup for Bluetooth, 279 setMode method, 197 ServerRequestHandler class, 282 setOutput method, 342 ServerSocketConnection class, 260 setPath method, 281 Service discovery for Bluetooth devices, setPayloadText method, 264 276, 278 setPosition method, 152 serviceAdded method, 287 setpreset method, 342 ServiceRecord class, 278 setReadable method, 207 serviceRemoved method, 287 setRecord method, 198 servicesDiscovered method setRefPixelPosition method, 152 BlueChewFinder, 289–290 setRepeat method, 220 DiscoveryListerner, 277 setRequestMethod method, 252 serviceSearchCompleted method setRequestProperty method, 253 BlueChewFinder, 290 setSelectedFlags method, 83 DiscoveryListerner, 277 setSelectedIndex method, 83 Knudsen_book.fm Page 400 Wednesday, November 28, 2007 2:55 PM

400 INDEX

setStrokeStyle method, 107 Size setTimeout method, 73 canvas, 101–102 setTrait method, 167, 171 custom items, 131–132 setTransform method, 152 custom screens, 118 setup method, 154–156 fonts, 110 setupConnections method, 285 MMS messages, 266 setViewWindow method, 153 SIZE_ constants, 110 setWritable method, 207 sizeChanged method SHA-1, 358 BubblesMIDlet, 174 ShapeCanvas class, 107–108 Canvas, 102 Shapes, drawing, 105–109 CustomItem, 132 Short labels for command, 77 SimpleAnimatorMIDlet, 165 Short Message Service (SMS), 7, 12, SVGEventMIDlet, 177 263–265, 267 Smart cards, 353–354 showCalendar method, 223, 226 communication with, 355–356 showContacts method, 223, 226–227 for signatures, 356–357 showForm method, 232 testing interaction with, 354–355 showNotify method, 127 SnakeCharmerMIDlet class, 57–59, 64–65 showSVGImage method SnapshotControl class, 348 BubblesMIDlet, 172–173 Snapshots, 338 SimpleAnimatorMIDlet, 165 SocketConnection interface, 257 SimplePlayerMIDlet, 162 Soft keys, 127 SVGEventMIDlet, 176–177 SONERA provider, 364 TMTweakerMIDlet, 167–168 Sorting strings, 239 sign method, 356 Sosnoski, Dennis, 17 Signature class, 358 Sound and video, 327 Signatures, 356–358 background information, 327–329 Signed MIDlet suites, 41–42 content selection, 338–339 Signing MIDlets, 44 controls, 332–333 Simple API for XML (SAX) standard, 296 example, 339–340 SimpleAnimatorMIDlet, 164–165 interactive MIDI player, 336 SimpleM3GCanvas class, 181–183 players, 329–331 SimpleM3GPlayer class, 181–182 sampled audio content, 333 SimplePlayerMIDlet class, 161–163 sound recording, 337 Simulating device location, 373–374 sound special effects, 347 SIP. See Session Initiation Protocol (SIP) supported content types, 331 API threading and listening, 332 SipClientConnectionListener class, tone sequence player, 335–336 321–322 tones, 329 SipConnectionNotifier class, 321–322 video capture, 338 SIPDemo example, 323 video content, 333–335 SIPS method type, 320 SoundSource3D class, 345–346 SipServerConnection class, 322 Source code, online, 25 SipServerConnectionListener interface, 322 SP-MIDI standard, 328 Knudsen_book.fm Page 401 Wednesday, November 28, 2007 2:55 PM

INDEX 401

Spacer class, 87, 92 STYLE_ constants, 110 Special audio effects, 347 Subscriber identity module (SIM) card, 354 SphereMeshGenerator class, 191 Subsets in MSA, 6 Sprite class, 115, 148, 151–153 substringWidth method, 111 Sprites, 148, 151–153 Sun Java Wireless Toolkit, 11–13, 18 Stack class, 32 Supported sound and video content types, Stacks, 4, 6 331 StandMIDlet class, 373 supportedSerialFormats method, 222 start method, 29 SVG. See Scalable Vector Graphics (SVG) startApp method, 21, 37 SVG Tiny, 160 STARTED constant, 330 SVGAnimator class, 160–161, 163 startElement method, 297–298 SVGAnimatorMIDlet class, 164 startInquiry method SVGElement interface, 166–167 DiscoveryListener, 277–278 SVGEventListener interface, 163, 174 LocalDevice, 277 SVGEventMIDlet class, 175–176 States SVGImage class, 160–161, 169, 174 key, 146 SVGMatrix class, 167 MIDlets, 37–40 System class, 29 Static registration System methods, 28–29 content handlers, 65–66 push registries, 48–49 T STOP constant, 77 Testing stop method content handlers, 64–65 Storage devices, 18–19 contacts. See Contacts and calendars smart card interaction, 354–355 files. See Files Tetrahedron, musical, 346–347 record stores. See Record stores Text Store-and-forward networks, 264 alerts, 73 Stream classes, 27 drawing, 109–111 StreamConnection class, 206, 279 measuring, 111–114 StreamConnectionNotifier class, 279 messaging. See Messages Streams, 27 TextBox, 71–72 for files and directories, 206–208 TEXT_WRAP_ constants, 86 input and output, 30–32 TextBoxes and TextBox class, 71–72 Stretchy screens, 377–378 displaying, 22–23 stringArraySize method, 218 example, 74–75 StringBuffer class, 29 TextField class, 71, 87, 89 StringComparator class, 239 TextMessage class, 264 StringItem class, 87–88, 96 Third-party domains, 42 Strings and String class, 28–29 Threds, 29–30 for contacts, 218–219 connections, 250 sorting, 239 game canvas, 144 stringWidth method, 111 media, 332 Stroke style, 107 3D audio, 345–347 Knudsen_book.fm Page 402 Wednesday, November 28, 2007 2:55 PM

402 INDEX

3D graphics, 179 Transactions. See Security and transactions content display, 180–183 translate method, 105 M3G files, 179–180 Transparency of colors, 102 meshes, 184–191 Transport Layer Security (TLS), 254 .3g2 format, 331 Traversal of custom items, 136–137 tick method TRAVERSE_ constant, 136 MeshCanvas, 190 traverse method SimpleM3GCanvas, 181, 183 CustomItem, 136–137 Tickers, 76–77 FontChoice, 140–141 Tiled layers, 148–151 traverseOut method TiledLayer class, 148–151, 154 CustomItem, 137 TIME_ constants, 238 FontChoice, 141 Timeouts for alerts, 73 TriangleStripArray class, 186 timeStep method, 132, 134 truncate method, 207 TimeZone class, 32 Trust Services API, 8 Title bars for images, 120 tuner capability in AMMS, 341 Titles TunerControl class, 348 alerts, 73 Types of command, 77 lists, 81 TypicalCanvas class, 143–144 TitleTileCanvas class, 119–120 TypicalGameCanvas class, 145–146 TMTweakerMIDlet class, 167–168 To-do lists, 215 U methods for, 220 UIOneMIDlet class, 74–75 PIMItem, 215–216 UITwoFormMIDlet class, 93–95 TODO_LIST constant, 220 UITwoMIDlet class, 84–86 ToDoList class, 220 Umbrella specifications, 5–7 Together3DCanvas class, 346–347 UNEDITABLE modifier, 72 Tone sequence player, 335–336 UnicodeBlock class, 72 Tone sequences, 329 Unidentified third-party domains, 42 ToneControl class, 335 Universally unique identification numbers Tones, 329 (UUIDs), 277, 279 TOP constant, 109 UNREALIZED constant, 330 TopTenHandler class, 301 Unregister command, 53 TopTenMIDlet, 298–301 unregister method, 63 toSerialFormat method, 222 unregisterConnection method, 48 toString method, 29 UnregisterContentRunnable class, 62 totalSize method, 208 UnregisterRunnable class, 51, 54 Trademark symbol, 166–168 UnsupportedLocaleException class, 237 TRANS_ constants, 115, 152 Untrusted domains, 42 TRANSACTION_ constants, 363 UP constant, 125 Transaction identifiers, 362 UP_PRESSED constant, 146 TransactionListener interface, 361–362 update method TransactionModule class, 361–362 Cipher, 359 TransactionRecord interface, 361, 363 Signature, 358 Knudsen_book.fm Page 403 Wednesday, November 28, 2007 2:55 PM

INDEX 403

Updates for Global Positioning System, 371 W URL constant, 71 Wait indicator, 132–135 URLs wait method, 269 files, 208 WakeUpMIDlet class, 54–55 REST, 307 WARNING constant, 73 User interface, 69–70 wasMissed method, 363 alerts, 73 WavHandlerMIDlet class, 60–65 commands, 76–80 Web Service Description Language (WSDL) example, 74–76 file, 303 forms. See Forms Web services images, 74 overview, 295–296 input modes, 72–73 REST, 307–317 lists. See Lists and List class width method, 111 screens, 70–71 Wireless devices, 3–4 TextBox, 71–72, 74–75 Wireless Messaging API (WMA) API, 263 ticker, 76–77 WMA Console, 53 UserCredentialManager class, 356–357 Word wrap, 86, 111–114 Utilities and tools World class, 180–181 classes for, 27 wrap method Sun Java Wireless Toolkit for CLDC Font, 111–112 support for, 11 WrapCanvas, 113 UUID class, 277 WrapCanvas class, 112–114 UUIDs (Universally unique identification wrapImplementation method, 113–114 numbers), 277, 279 Wrapping text, 86, 111–114 write method, 201 V Write Once, Run Anywhere, 377 VCENTER constant, 116 Writing content handlers, 59–64 Vector class, 32 WS-* web services, 295–296, 303–307 Vector format, 159 Vector graphics. See Scalable Vector X Graphics (SVG) X axis, 105 Vectors class, 270 X-CCARD adapter, 366 verify method, 358 XML, 295 VertexBuffer class, 185 parsing, 296, 301–303 Vertices in 3D graphics, 184–187 with REST, 307 Video. See Sound and video VideoControl class, 334, 338 Y View windows, 153 Y axis, 105 Viewports coordinate system, 175 Z SVG, 161 ZoomControl class, 348 Virkus, Robert, 17 Volume controls for MIDI, 332–333 VolumeControl class, 333, 345