Building Mobile Enterprise Applications : Using webMethods Mobile Designer : Coding a Mobile Application : Mobile Designer-Provided Run-Time Classes : Run-Time Media Classes
Run-Time Media Classes
com.softwareag.mobile.runtime.media.AudioHandler
Use the AudioHandler class to control the sound and vibration functionality when writing for the main common audio libraries available on mobile devices. The media classes try to keep the phone's backlight on when possible for the selected device.
The Mobile Designer AudioHandler class sets the value for each device. You can override the value Mobile Designer sets using the mobiledesigner.runtime.core.class.sound project property.
com.softwareag.mobile.runtime.media.CameraHandler
Use the CameraHandler class to initialize a device’s camera, take snapshots, and stop the camera.
Mobile Designer sets the values for the CameraHandler class for each device. You can override the value Mobile Designer sets using the mobiledesigner.runtime.core.class.camera project property.
com.softwareag.mobile.runtime.media.ImageBase
The ImageBase class provides the base level of the image creation and drawing functionality, including:
*Decoders for the various image encoding methods that are part of the Mobile Designer Resource Handler.
*Image caching used with some devices that have problems freeing images from memory.
*Multi-celled image support, stored as individual images at run time, or as a single image which is clipped and drawn.
*Transformations for all devices
*Image dimension information to support any multi-cell images or transformations.
You can access the ImageBase functionality through the ImageHandler class.
The DRAWIMAGETRANSFORM_*** values and the LOADIMAGETRANSFORM_*** values are not interchangeable. The LOADIMAGETRANSFORM_*** values are used to cache multiple images at load time. For more information, see the webMethods Mobile Designer Java API Reference.
com.softwareag.mobile.runtime.media.ImageHandler
Use the ImageHandler class to load, draw, and manage images. Mobile Designer sets the values for the ImageHandler class for each device. You can override the value Mobile Designer sets using the mobiledesigner.runtime.core.class.graphics.image project property.
com.softwareag.mobile.runtime.media.PngParser
The PngParser class provides a PNG-encoding method that can create an image from pixel and palette data. In Mobile Designer you can create the image dynamically at run time, or use image compression methods that exceed the default PNG format.
When opaque mutable images render faster on a device than immutable images, the PngParser makes adjustments to improve performance when rendering the image.
You can generate palettized (PNG-8) and true-color (PNG-24) PNG files using the PngParser methods when full pixel or palettized information is provided.
com.softwareag.mobile.runtime.media.TextHandler
The Mobile Designer TextHandler class provides the following functionality:
*Loads text files
*Supports multi-languages
*Stores hyphenation guidelines for text splitting
*Dynamically splits text based on hyphenation guidelines
*Injects text
*Supports system and bitmap font
*Draws proportional and fixed width font in all systems
*Handles all the expected metric queries such as font height, character width, and string width
Copyright © 2007-2017 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback