J2ME Polish
J2ME Polish 2.4 Documentation
Enough Software

BlackBerry/7290


Display

PropertyValuePreprocessing Access
Screen-Size (width x height)240x160polish.ScreenSize, polish.ScreenWidth, polish.ScreenHeight
Canvas-Size in fullscreen mode240x160polish.FullCanvasSize, polish.FullCanvasWidth, polish.FullCanvasHeight
Bits per Pixel16
(65,536 colors)
polish.BitsPerPixel
Supports Pointer/Touch Eventsnopolish.hasPointerEvents

Platform

PropertyValuePreprocessing Access
VendorBlackBerrypolish.Vendor
PlatformMIDP/2.0, BlackBerry/4.1polish.JavaPlatform, polish.blackberry
ConfigurationCLDC/1.1polish.JavaConfiguration, polish.cldc1.1
Supported APIslocationapi, wmapi, pimapi, mmapipolish.JavaPackage, polish.api.locationapi, polish.api.wmapi, polish.api.pimapi, polish.api.mmapi
Meets the Recommended Capablities for the J2ME Polish GUIyes  --

Multimedia

PropertyValuePreprocessing Access
Supported Audio Formatsmp3polish.SoundFormat, polish.audio.mp3

Keys

KeyValuePreprocessing Variable
Right Soft Key1769472polish.key.RightSoftKey
Clear Key524288polish.key.ClearKey

Known Issues

Issue 1AreaDescription
ReservedKeywordSerializableioClasses called Serializable confuse the device
Solution
The J2ME polish build process works around this by auto-renaming the de.enough.polish.io.Serializable interface.
Preprocessing Symbol
polish.Bugs.ReservedKeywordSerializable
 
Issue 2AreaDescription
drawRgbNeedsFullBufferuiThe Graphics.drawRGB(..) method does not accept only one row which then can be repeated several times. Usually this trick saves some memory as well as work.
Solution
Give a full buffer (rows * columns) in the drawRGB method instead of only one row.
Preprocessing Symbol
polish.Bugs.drawRgbNeedsFullBuffer
 
Issue 3AreaDescription
ClosedInputstreamWhenEmptyHttpResponseBodyioWhen the body of a HTTP response is empty a closed InputStream is returned on openInputStream() call of HttpConnection.
Solution
The first read() on the InputStream throws a ConnectionClosedException instead of returning -1. This needs to be catched and handled as if -1 would have been directly returned.
Preprocessing Symbol
polish.Bugs.ClosedInputstreamWhenEmptyHttpResponseBody
 

Groups

Groups can be used to assemble the resources (like images or sound-files) for an application.
Have a look at the documentation for more info.

GroupResource Folder
midp2resources/midp2
blackberryresources/blackberry
locationapiresources/locationapi
wmapiresources/wmapi
pimapiresources/pimapi
mmapiresources/mmapi
mp3resources/mp3
ScreenSize.240x160resources/ScreenSize.240x160
FullCanvasSize.240x160resources/FullCanvasSize.240x160
BitsPerPixel.4+resources/BitsPerPixel.4+
BitsPerPixel.8+resources/BitsPerPixel.8+
BitsPerPixel.12+resources/BitsPerPixel.12+
BitsPerPixel.16+resources/BitsPerPixel.16+
BitsPerPixel.16resources/BitsPerPixel.16

Preprocessing Capabilities

Capabilities can be used with the "//#=" preprocessing directive and can be compared with the "//#if" directive. For each defined capability a preprocessing symbol with the same name will be defined.
Have a look at the preprocessing documentation for more information.

Examples:

//#if polish.Vendor == BlackBerry
	// this is a BlackBerry device
//#endif
//#ifdef polish.ScreenWidth:defined
	//#= int screenWidth = ${ polish.ScreenWidth };
//#else
	int screenWidth = UNKNOWN_WIDTH;
//#endif

CapabilityValue
polish.bitsperpixel16
polish.bugsReservedKeywordSerializable,drawRgbNeedsFullBuffer, ClosedInputstreamWhenEmptyHttpResponseBody
polish.build.blackberry.jde-version4.1
polish.build.bootclasspathcldc-1.1.jar,blackberry-4.1.0.jar,midp-2.0.jar
polish.build.classes.fullscreennet.rim.device.api.ui.container.FullScreen
polish.build.classes.nativedisplayde.enough.polish.blackberry.ui.NativeDisplayImpl
polish.build.classes.nativefontde.enough.polish.blackberry.ui.Font
polish.build.classes.nativegraphicsde.enough.polish.blackberry.ui.Graphics
polish.build.classes.nativeimagede.enough.polish.blackberry.ui.Image
polish.build.classes.screennet.rim.device.api.ui.container.MainScreen
polish.build.implicitgroupsmidp2
polish.build.obfuscatorblackberry
polish.display.baseclassde.enough.polish.blackberry.ui.BaseScreen
polish.emulator.classBlackBerryEmulator
polish.fullcanvasheight160
polish.fullcanvassize240x160
polish.fullcanvaswidth240
polish.icondepth55
polish.iconheight44
polish.iconsize44x44
polish.iconwidth44
polish.identifierBlackBerry/7290
polish.javaconfigurationCLDC/1.1
polish.javapackagelocation,wmapi,pim,mmapi
polish.javaplatformMIDP/2.0, BlackBerry/4.1
polish.key.clearkey524288
polish.key.enterkey655360
polish.key.escapekey1769472
polish.key.moveleftkey5177410
polish.key.moverightkey5242946
polish.key.returnkey1769472
polish.key.rightsoftkey1769472
polish.menubar.positioninvisible
polish.menubar.useextendedmenubartrue
polish.name7290
polish.screenheight160
polish.screensize240x160
polish.screenwidth240
polish.soundformatmp3
polish.supportfloatingpointtrue
polish.usepolishtitletrue
polish.vendorBlackBerry
polish.vendor.aliasRIM,Research In Motion Ltd.
polish.wap.useragentBlackBerry7290BlackBerry7290/3.8.0BlackBerry7290/3.8.0 UP.Browser/5.0.3.3Mozilla/2.0 (compatible; MSIE 3.02; Windows CE; PPC; 240x320) BlackBerry7290/3.8.0Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) BlackBerry7290/3.8.0Mozilla/4.8 [en] (Windows NT 5.0; U) BlackBerry7290/3.8.0

Preprocessing Symbols

Symbols can be evaluated with the "//#ifdef" and related preprocessing directives.
Have a look at the preprocessing documentation for more information.

Example:

//#if polish.api.mmapi || polish.midp2
	// this device supports the Mobile Media API
//#endif

Symbol
polish.api.locationapi
polish.api.mmapi
polish.api.pim
polish.api.pimapi
polish.api.wmapi
polish.audio.mp3
polish.bitsperpixel.16
polish.bitsperpixel:defined
polish.blackberry
polish.bugs.closedinputstreamwhenemptyhttpresponsebody
polish.bugs.drawrgbneedsfullbuffer
polish.bugs.reservedkeywordserializable
polish.bugs:defined
polish.build.blackberry.jde-version.4.1
polish.build.blackberry.jde-version:defined
polish.build.bootclasspath.blackberry-4.1.0.jar
polish.build.bootclasspath.cldc-1.1.jar
polish.build.bootclasspath.midp-2.0.jar
polish.build.bootclasspath:defined
polish.build.classes.fullscreen.net.rim.device.api.ui.container.fullscreen
polish.build.classes.fullscreen:defined
polish.build.classes.nativedisplay.de.enough.polish.blackberry.ui.nativedisplayimpl
polish.build.classes.nativedisplay:defined
polish.build.classes.nativefont.de.enough.polish.blackberry.ui.font
polish.build.classes.nativefont:defined
polish.build.classes.nativegraphics.de.enough.polish.blackberry.ui.graphics
polish.build.classes.nativegraphics:defined
polish.build.classes.nativeimage.de.enough.polish.blackberry.ui.image
polish.build.classes.nativeimage:defined
polish.build.classes.screen.net.rim.device.api.ui.container.mainscreen
polish.build.classes.screen:defined
polish.build.implicitgroups.midp2
polish.build.implicitgroups:defined
polish.build.obfuscator.blackberry
polish.build.obfuscator:defined
polish.cldc
polish.cldc1.1
polish.cldc11
polish.display.baseclass.de.enough.polish.blackberry.ui.basescreen
polish.display.baseclass:defined
polish.emulator.class.blackberryemulator
polish.emulator.class:defined
polish.fullcanvasheight:defined
polish.fullcanvassize.240x160
polish.fullcanvassize:defined
polish.fullcanvaswidth:defined
polish.hascommandkeyevents
polish.hasfloatingpoint
polish.icondepth.55
polish.icondepth:defined
polish.iconheight:defined
polish.iconsize.44x44
polish.iconsize:defined
polish.iconwidth:defined
polish.identifier.blackberry/7290
polish.identifier:defined
polish.javaconfiguration.cldc/1.1
polish.javaconfiguration:defined
polish.javapackage.location
polish.javapackage.mmapi
polish.javapackage.pim
polish.javapackage.wmapi
polish.javapackage:defined
polish.javaplatform.blackberry/4.1
polish.javaplatform.midp/2.0
polish.javaplatform:defined
polish.key.clearkey.524288
polish.key.clearkey:defined
polish.key.enterkey.655360
polish.key.enterkey:defined
polish.key.escapekey.1769472
polish.key.escapekey:defined
polish.key.moveleftkey.5177410
polish.key.moveleftkey:defined
polish.key.moverightkey.5242946
polish.key.moverightkey:defined
polish.key.returnkey.1769472
polish.key.returnkey:defined
polish.key.rightsoftkey.1769472
polish.key.rightsoftkey:defined
polish.menubar.position.invisible
polish.menubar.position:defined
polish.menubar.useextendedmenubar
polish.menubar.useextendedmenubar.true
polish.menubar.useextendedmenubar:defined
polish.midp
polish.midp2
polish.name.7290
polish.name:defined
polish.screenheight:defined
polish.screensize.240x160
polish.screensize:defined
polish.screenwidth:defined
polish.soundformat.mp3
polish.soundformat:defined
polish.supportfloatingpoint
polish.supportfloatingpoint.true
polish.supportfloatingpoint:defined
polish.supportspolishgui
polish.usepolishtitle
polish.usepolishtitle.true
polish.usepolishtitle:defined
polish.vendor.alias.research in motion ltd.
polish.vendor.alias.rim
polish.vendor.alias:defined
polish.vendor.blackberry
polish.vendor:defined
polish.wap.useragent.blackberry7290blackberry7290/3.8.0blackberry7290/3.8.0 up.browser/5.0.3.3mozilla/2.0 (compatible; msie 3.02; windows ce; ppc; 240x320) blackberry7290/3.8.0mozilla/4.0 (compatible; msie 6.0; windows nt 5.0) blackberry7290/3.8.0mozilla/4.8 [en] (windows nt 5.0; u) blackberry7290/3.8.0
polish.wap.useragent:defined
back to top