×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Nov 2007
    Posts
    42

    Cursor and screen coordinates - ImageItem

    I have added an imageItem to a form and displayed an image. Now I want to overlay a cursor and be able to move around and capture coordinates where the cursor is.

    All my reading indicate that this is not possible directly with the imageItem or it's superclass. It seems like I have to create a custom Canvas item, with these capabilities. Before I go that route, I thought I might check with the experts here to see, to see if there is a better way.

    Appreciate any help here....

    Soofi

  2. #2
    Nokia Developer Champion
    Join Date
    Nov 2007
    Location
    Rome, Italy
    Posts
    2,406

    Re: Cursor and screen coordinates - ImageItem

    Hi Soofi,

    if you want to implement a cursor that can freely move around the device screen, then Canvas is the right option. Using it, you'll get total control on cursor movement and on its coordinates (since you have to implement them all by your own ).

    Pit

  3. #3
    Registered User
    Join Date
    Nov 2007
    Posts
    42

    Re: Cursor and screen coordinates - ImageItem

    Thanks Pit, Do you have any good code examples as a back drop. There is enough on the net on this, but if you know of some good example, it will be much appreciated....

    Soofi

  4. #4
    Nokia Developer Champion
    Join Date
    Nov 2007
    Location
    Rome, Italy
    Posts
    2,406

    Re: Cursor and screen coordinates - ImageItem

    Hi Soofi,

    you could try to take a look at Apime, a Java ME UI framework that uses an approach similar to yours: so, it uses a mouse pointer to manage user interactions.

    Apart from this, I'm not currently aware of any other related source code or examples, but I'll check around!

    Pit

  5. #5
    Registered User
    Join Date
    Nov 2007
    Posts
    42

    Re: Cursor and screen coordinates - ImageItem

    Hey Pit,

    Thanks for the tip...

    I downloaded Apime and was able to compile and run all the examples. It is very functional and seems to have all the components I need for my project. I like the fact that you can grab the entire screen for display. The controls however are clunky, but I don't plan to use many of them.

    Are you aware of any one here who may haved used Apime for a real project, just to see if there are any shortcomings that I should be aware of.

    Soofi

  6. #6
    Nokia Developer Champion
    Join Date
    Nov 2007
    Location
    Rome, Italy
    Posts
    2,406

    Re: Cursor and screen coordinates - ImageItem

    Hi Soofi,

    happy to know it helped. About real projects no, I'm not aware of any of them using Apime.
    Anyway, if you want some feedbacks about single Java ME UI frameworks, you can look at this article:

    http://newsofthefuture.net/index.php...-for-J2ME.html

    Pit

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×