0
votes

I have project, already developed using canvas and lib used is LCDUI. It's for nokia keyboard supported devices. Now I want to incorporate same application for touch devices. I have used touch methods like pointerpressed, etc.

For normal functionality that worked pretty well. But it creates problem in commands.

My application is in fullscreen mode. Commands I have created using user defined menu list. Probles is that I can not directly identify that which command has been clicked. Setting coordinates for every command is not thr feasible solution for me.

I come across the new lib LWUIT, but i found out that it supports only forms(Can't we use on canvas?). and integrating LCDUI and LWUIT is also not possible(please give suggestion that can we use both in same application?).

Is it possible to create form under canvas itself? Any other lib support available?

thank you.

2
One more question, Is it possible to identify that touch command is which in lcdui? It's possible in blackberry but I couldn't get such functionality in J2ME for nokia touch devices? Does commandlistener of J2ME lcdui support it? - rajiv

2 Answers

0
votes

If you want to use LWUIT, then it has a Painter mechanism for custom background painting. I assume you can have a Form with its background painted as you like using Painter.

Some help can be found here: Using Styles, Themes and Painters with LWUIT

0
votes

LWUIT is made to override every component. You also have a basic painter class to draw lines and basic geomotry in all sorts of colors you desire. So if you combine those two, you can do some very nice stuff.

So if you override your component with an actionlistener it should generate events, which you can then catch in a parent component who has an actionperformed function.

hope this helps.