Discussion Board

Results 1 to 9 of 9
  1. #1
    Regular Contributor rahul.kulshreshtha's Avatar
    Join Date
    Apr 2010
    Location
    Surat, India
    Posts
    277
    From where I can get the original source code of javax.macromedia.lcdui.List
    I am using netbeans Editor.

    http://www.j2medev.com/api/midp/java...cdui/List.html

    I got this but it is showing error.
    http://www.java2s.com/Open-Source/Ja.../List.java.htm

  2. #2
    Registered User grahamhughes's Avatar
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,394
    What do you mean by "original" source code?

    Why do you want it? What problem are you trying to solve?

    There is no "standard" source code... the List object on a Nokia device, for example, is not built from the same source code a List on a Sony Ericsson.

    Graham.

  3. #3
    Regular Contributor rahul.kulshreshtha's Avatar
    Join Date
    Apr 2010
    Location
    Surat, India
    Posts
    277
    Quote Originally Posted by grahamhughes View Post
    What do you mean by "original" source code?

    Why do you want it? What problem are you trying to solve?

    There is no "standard" source code... the List object on a Nokia device, for example, is not built from the same source code a List on a Sony Ericsson.

    Graham.
    So that means when I use javax.macroedition.lcdui.List then I am using Nokia's implementation of List not the Sun's or J2ME's.

    Actually I want to create my own List, I got from documentation the List is extending screen. So I thought to extend Screen and created MyList class. But Screen was having several abstart methods so I planned instead of writing code for each and every method why shouldn't I use already existing code. But I was not able to find the right one which will compile with the sdk. So can you tell me the location of that List class ?

  4. #4
    Registered User grahamhughes's Avatar
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,394
    If you look at the documentation for the Screen class, you will see that there are no abstract methods that are public or protected. As such, you cannot extend this class with your own code.

    If you want to build your own Displayable component, you need to extend Canvas, implementing the paint() method, and overriding methods like keyPressed().

    Graham.

  5. #5
    Regular Contributor rahul.kulshreshtha's Avatar
    Join Date
    Apr 2010
    Location
    Surat, India
    Posts
    277
    Quote Originally Posted by grahamhughes View Post
    If you look at the documentation for the Screen class, you will see that there are no abstract methods that are public or protected. As such, you cannot extend this class with your own code.

    Graham.
    I successfully extended that screen using same package name. But as there are several abstract methods so I don't know how they should be handled. For that I need source of List class. Starting from canvas will increase my work. I don't know how can I make a checkbox on canvas then how I will be able to handle whole list of checkboxes.

    Do you know where the source of List is ? Please give me source first, we will continue our discussion on this.

    Thanks,
    Rahul Kulshreshtha

  6. #6
    Registered User grahamhughes's Avatar
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,394
    You cannot create a class in the same package as the system classes. If you do, your application will not install on the phone. This is a mandatory security restriction of all CLDC devices.

    I'm afraid it is not possible to do what you want - you must extend Canvas.

    Consider using a UI library like LWUIT.

    Graham.

  7. #7
    Regular Contributor rahul.kulshreshtha's Avatar
    Join Date
    Apr 2010
    Location
    Surat, India
    Posts
    277
    Quote Originally Posted by grahamhughes View Post
    Consider using a UI library like LWUIT.
    I tried with that already. They are having List control but that List can only show Text as it's list element. We can not show checkbox in that List.

    Actually my requirement is simple but I think either j2me is still not developed properly for nokia phones or I am still a child in this.

    I want a screen with a list of checkboxes (obviously with scrolling feature) and one searchbox (that will be a textField) but after 1 week I am still not getting any hope to do it. Am I asking a hard problem ?

    Is the canvas last hope ????

  8. #8
    Registered User grahamhughes's Avatar
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,394
    It's not a problem with Nokia's implementation, nor with you... MIDP just doesn't provide this kind of UI component. MIDP's built-in UI components are very basic, which is why libraries like LWUIT exist.

    Yes, realistically, you must subclass Canvas to do this.

    You should be able to do this with LWUIT. I'm not an expert in LWUIT, but perhaps using a form with checkboxes you could construct the kind of component you want. Much easier than building it from scratch. (LWUIT screens are all built from Canvas.) Or look for other libraries - there is a list on the wiki, I think.

    Graham.

  9. #9
    Regular Contributor rahul.kulshreshtha's Avatar
    Join Date
    Apr 2010
    Location
    Surat, India
    Posts
    277
    Thanks a lot Graham, you are the only one who replied till end of the discussion otherwise other peoples were just moving away by saying "this is not possible... etc etc" in my other threads

    I will surely go for canvas and LWUIT library.

    Thanks Again,
    Rahul Kulshreshtha

Similar Threads

  1. Build time get error in FFMPEG example.
    By SymbianTH in forum Symbian Media (Closed)
    Replies: 8
    Last Post: 2010-05-11, 16:11
  2. long keypress When program is run background??
    By arun09 in forum Symbian C++
    Replies: 106
    Last Post: 2009-05-11, 05:53
  3. Раскладка клавиатуры в консоли
    By arkenoi in forum Russian Developer Forum - Форум Российских разработчиков
    Replies: 11
    Last Post: 2009-03-18, 18:27
  4. Custom App Icon?
    By Rozik in forum Symbian C++
    Replies: 2
    Last Post: 2007-04-02, 10:37
  5. Link errors when trying to Display bitmap
    By Bkc82 in forum Symbian Media (Closed)
    Replies: 1
    Last Post: 2006-01-16, 22:46

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved