Motorola C550, C450, C370 technical manual Information, disabling key events can improve performance

Page 42

information, disabling key events can improve performance.

Note that this setting is unique to each GameScreen instance; other GameScreens, when shown, are subject to their own setting for key events.

public void paint(javax.microedition.lcdui.Graphics g) - Paints this GameScreen. By default, this method does nothing. It can be overridden according to application needs.

public void flushGraphics(int x, int y, int width,

int height) – Waits until the end of the current screen refresh cycle and then flushes the specified region of the off-screen buffer to the display driver. This method does not return until that region of the buffer has been completely flushed. The pixels of the off-screen buffer are not changed as a result of the flush operation. Upon returning from this method, the application may immediately begin to render the next frame using the same buffer.

public void flushGraphics() - Waits until the end of the current screen refresh cycle and then flushes all of the off-screen buffer to the display driver. This method does not return until the entire buffer has been completely flushed. The pixels of the off-screen buffer are not changed as a result of the flush operation. Upon returning from this method, the app may immediately begin to render the next frame using the same buffer.

public static int getDisplayColor(int color) throws IllegalArgumentException – Gets the color that will be displayed if the specified color is requested. This method enables the developer to check the manner in which RGB values are mapped to the set of distinct colors that the device can actually display. For example, with a monochrome device, this method will return either 0xFFFFFF (white) or 0x000000 (black) depending on the brightness of the specified color.

public void playSoundEffect(SoundEffect se, int volume, int priority) - Plays the specified SoundEffect. A GameScreen's sound effects are heard only while it is the visible screen. A device capability of playing SoundEffects can be found by using the method soundEffectsSupported(). The platform's ability to play several SoundEffects simultaneously can be found by using the method getMaxSoundsSupported(). The priority specified for each request determines which sound(s) are heard when the number of simultaneous sound requests exceeds the capabilities of the device.

public boolean soundEffectsSupported() - Checks whether the underlying platform supports SoundEffects. It returns true if SoundEffects are supported.

public boolean backgroundMusicSupported() - Checks whether the underlying platform supports BackgroundMusic. It returns true if BackgroundMusic is supported.

public int getMaxSoundsSupported() - Queries the underlying platform's capability to play multiple SoundEffects simultaneously.

public void stopAllSoundEffects() - Stops all the SoundEffects that are playing. Note that this method does not affect background music.

Image 42
Contents Technical Manual Table of Contents Lcdui JAD Attributes Audience IntroductionPurpose DisclaimerReferences Date Name Reason Revision HistoryDefinitions, Abbreviations, Acronyms Acronym DescriptionDocument Overview Introduction J2ME Introduction Java 2 Platform, Micro Edition J2MEMotorola J2ME Platform Resources AvailableFile & RMS Description DisplayNetworking Java VMDeveloping and Packaging J2ME Applications Guide to Development in J2MEIntroduction to Development Page OTA Procedure InstallationDownloading Applications Program and Data space notes Java Application Installer/De-Installer Jaid Starting ApplicationsExiting Applications Error Checks Launching Web Session for Http DownloadDownloading MIDlets XML Screen Renderings BombMan is back, now on your Taichi series of handsets Taichi handset New Games Application Management MIDlet LifecycleMIDlet Suite Installation MIDlet Suite De-installation MIDlet Suite Updating DestroyAppMethod Caller PurposeStartApp or the pauseApp Using startApp Java System MIDlet Control of MIDlet State TransitionsPage Network API Network ConnectionsClass Descriptions IOException when it detects a time-out condition URL FormatTCP Sockets UDP SocketsImplementation Notes Network API Lcdui DescriptionLcdui Gaming API and Sound Functional DescriptionClass Hierarchy BackgroundMusic Methods Using BackgroundMusicBackgroundMusic Class Gaming API containing a sound APIGameScreen Class GameScreen FieldsGameScreen Methods Public int getKeyStatesInformation, disabling key events can improve performance Using GameScreen GameScreenImageUtil Class ImageUtil FieldsImageUtil Methods Using ImageUtil RgbDataPalleteImage Class PalleteImage ConstructorPalleteImage Methods Using PalleteImage Public void setTransparentIndexint index throwsUsing Static and Animated Tiles PlayField ClassUsing Sprites Defining View WindowsPlayField Constructor 2N+1 2N + PlayField Methods Public void addSpriteSprite s throwsPage Public boolean collidesWithAnyTileSprite s throws Using PlayField PlayFieldSprite Class Using SoundEffectSoundEffect Class SoundEffect MethodsAnimation Frames Sprite DrawingSprite Constructor Sprite Methods Page Public final void drawGraphics g throws Using Sprite FileFormatNotSupportedExceptionSprites FileFormatNotSupportedException Constructors Java Gaming Sound APIMax Midi Extension Support Java Gaming Sound APIVibe and Backlight Vibe and Backlight APIOverview Creating a MessageSending a Message PermissionsJAD Attributes JAD AttributesMandatory attributes for manifest files MIDlet-Name Code Examples Record Management SystemClass Description RecordStoreTips CaveatsPhonebook Access Phonebook Access APIPhonebook Access API Permissions Sample of code to create object of PhoneBookRecord classSimmemory Sample of code for calling of ‘getMaxEmailLength ’ method Sample of code for calling of ‘isPrimaryint speedNo’ method Sample of code for calling of ‘getNumberCategories’ method Sample of code for calling of ‘setCategoryView’ method Sample of code for calling of ‘getUsedRecords’ method Int index = ReceivedRecord.getRecord1 ITAP Intelligent Keypad Text Entry APIAppendix a Key Mapping Key Mapping for the C370, C450, and C550Center Select END Appendix B Memory Management Calculation Available MemoryOnline FAQ Appendix CAppendix D Spec Sheets C370, C450, and C550 Spec SheetsMotorola Developer Information Tools DocumentationReferences Purchase Motorola Developer Information Tools Motorola, Inc
Related manuals
Manual 110 pages 1.04 Kb