J2ME Polish
J2ME Polish 2.4 Documentation
Enough Software

BlackBerry/5810


Display

PropertyValuePreprocessing Access
Screen-Size (width x height)160x160polish.ScreenSize, polish.ScreenWidth, polish.ScreenHeight
Bits per Pixel1
(2 colors)
polish.BitsPerPixel
Supports Pointer/Touch Eventsnopolish.hasPointerEvents

Platform

PropertyValuePreprocessing Access
VendorBlackBerrypolish.Vendor
PlatformMIDP/1.0, BlackBerrypolish.JavaPlatform, polish.blackberry
ConfigurationCLDC/1.0polish.JavaConfiguration, polish.cldc1.0
Meets the Recommended Capablities for the J2ME Polish GUIno--

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
midp1resources/midp1
blackberryresources/blackberry
mp3resources/mp3
ScreenSize.160x160resources/ScreenSize.160x160
BitsPerPixel.1resources/BitsPerPixel.1
NoSpriteTransformationsresources/NoSpriteTransformations

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.bitsperpixel1
polish.bugsReservedKeywordSerializable,drawRgbNeedsFullBuffer, ClosedInputstreamWhenEmptyHttpResponseBody
polish.build.bootclasspathcldc-1.0.jar,midp-1.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.implicitgroupsmidp1
polish.build.obfuscatorblackberry
polish.display.baseclassde.enough.polish.blackberry.ui.BaseScreen
polish.emulator.classBlackBerryEmulator
polish.icondepth55
polish.iconheight44
polish.iconsize44x44
polish.iconwidth44
polish.identifierBlackBerry/5810
polish.javaconfigurationCLDC/1.0
polish.javaplatformMIDP/1.0, BlackBerry
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.name5810
polish.screenheight160
polish.screensize160x160
polish.screenwidth160
polish.soundformatmp3
polish.supportfloatingpointfalse
polish.usepolishtitletrue
polish.vendorBlackBerry
polish.vendor.aliasRIM,Research In Motion Ltd.
polish.wap.useragentBlackBerry5810BlackBerry/3.2.1

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.audio.mp3
polish.bitsperpixel.1
polish.bitsperpixel:defined
polish.blackberry
polish.bugs.closedinputstreamwhenemptyhttpresponsebody
polish.bugs.drawrgbneedsfullbuffer
polish.bugs.reservedkeywordserializable
polish.bugs:defined
polish.build.bootclasspath.cldc-1.0.jar
polish.build.bootclasspath.midp-1.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.midp1
polish.build.implicitgroups:defined
polish.build.obfuscator.blackberry
polish.build.obfuscator:defined
polish.cldc
polish.cldc1.0
polish.display.baseclass.de.enough.polish.blackberry.ui.basescreen
polish.display.baseclass:defined
polish.emulator.class.blackberryemulator
polish.emulator.class:defined
polish.hascommandkeyevents
polish.icondepth.55
polish.icondepth:defined
polish.iconheight:defined
polish.iconsize.44x44
polish.iconsize:defined
polish.iconwidth:defined
polish.identifier.blackberry/5810
polish.identifier:defined
polish.javaconfiguration.cldc/1.0
polish.javaconfiguration:defined
polish.javaplatform.blackberry
polish.javaplatform.midp/1.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.midp1
polish.name.5810
polish.name:defined
polish.screenheight:defined
polish.screensize.160x160
polish.screensize:defined
polish.screenwidth:defined
polish.soundformat.mp3
polish.soundformat:defined
polish.supportfloatingpoint.false
polish.supportfloatingpoint:defined
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.blackberry5810blackberry/3.2.1
polish.wap.useragent:defined
back to top