J2ME scrolling canvas?

Discussion in 'Java' started by Oz Mortimer, Sep 17, 2003.

  1. Oz Mortimer

    Oz Mortimer Guest

    Hi,

    Is there any way that I can scroll a canvas - i.e. if there are too many
    items on the canvas you can still access by pressing down. I know Form does
    this (apparently) but I need to do it using a canvas!. Maybe I can attach my
    Canvas to a form?

    Ideas?
    Oz.
     
    Oz Mortimer, Sep 17, 2003
    #1
    1. Advertising

  2. Oz Mortimer <> wrote:
    > Is there any way that I can scroll a canvas - i.e. if there are too many
    > items on the canvas you can still access by pressing down. I know Form does
    > this (apparently) but I need to do it using a canvas!.i


    You have to do it programmatically yourself. A Canvas represents the
    physical display area of the device on which it's running. If you have
    more items than can be displayed on the physical screen, then you have
    to draw your own scroll bars and handle determining what items to render
    on the physical display.

    > Maybe I can attach my
    > Canvas to a form?


    No. You can't mixed the hi-level widgets with the low-level widgets in
    MIDP 1.0. With MIDP 2.0 you will have the CustomItem, but with MIDP 1.0
    you're not able to mix programmer designed widgets with the LCDUI
    widgets.

    --
    Darryl L. Pierce <>
    Visit the Infobahn Offramp - <http://bellsouthpwp.net/m/c/mcpierce>
    "What do you care what other people think, Mr. Feynman?"
     
    Darryl L. Pierce, Sep 18, 2003
    #2
    1. Advertising

  3. Oz Mortimer

    Oz Mortimer Guest

    Wow!... I can't believe that J2ME doesn't cater for that!. Has anyone got
    any examples? is there a scrollbar class?

    Oz.
    "Darryl L. Pierce" <> wrote in message
    news:...
    > Oz Mortimer <> wrote:
    > > Is there any way that I can scroll a canvas - i.e. if there are too many
    > > items on the canvas you can still access by pressing down. I know Form

    does
    > > this (apparently) but I need to do it using a canvas!.i

    >
    > You have to do it programmatically yourself. A Canvas represents the
    > physical display area of the device on which it's running. If you have
    > more items than can be displayed on the physical screen, then you have
    > to draw your own scroll bars and handle determining what items to render
    > on the physical display.
    >
    > > Maybe I can attach my
    > > Canvas to a form?

    >
    > No. You can't mixed the hi-level widgets with the low-level widgets in
    > MIDP 1.0. With MIDP 2.0 you will have the CustomItem, but with MIDP 1.0
    > you're not able to mix programmer designed widgets with the LCDUI
    > widgets.
    >
    > --
    > Darryl L. Pierce <>
    > Visit the Infobahn Offramp - <http://bellsouthpwp.net/m/c/mcpierce>
    > "What do you care what other people think, Mr. Feynman?"
     
    Oz Mortimer, Sep 18, 2003
    #3
  4. Oz Mortimer wrote:
    >
    > Wow!... I can't believe that J2ME doesn't cater for that!. Has anyone got
    > any examples? is there a scrollbar class?
    >
    > Oz.
    > "Darryl L. Pierce" <> wrote in message
    > news:...
    > > Oz Mortimer <> wrote:
    > > > Is there any way that I can scroll a canvas - i.e. if there are too many
    > > > items on the canvas you can still access by pressing down. I know Form

    > does
    > > > this (apparently) but I need to do it using a canvas!.i

    > >
    > > You have to do it programmatically yourself. A Canvas represents the
    > > physical display area of the device on which it's running. If you have
    > > more items than can be displayed on the physical screen, then you have
    > > to draw your own scroll bars and handle determining what items to render
    > > on the physical display.
    > >
    > > > Maybe I can attach my
    > > > Canvas to a form?

    > >
    > > No. You can't mixed the hi-level widgets with the low-level widgets in
    > > MIDP 1.0. With MIDP 2.0 you will have the CustomItem, but with MIDP 1.0
    > > you're not able to mix programmer designed widgets with the LCDUI
    > > widgets.
    > >
    > > --
    > > Darryl L. Pierce <>
    > > Visit the Infobahn Offramp - <http://bellsouthpwp.net/m/c/mcpierce>
    > > "What do you care what other people think, Mr. Feynman?"


    Look at JScrollPane
    --
    Fred L. Kleinschmidt
    Boeing Associate Technical Fellow
    Technical Architect, Common User Interface Services
    M/S 2R-94 (206)544-5225
     
    Fred L. Kleinschmidt, Sep 18, 2003
    #4
  5. Oz Mortimer

    Tim Tyler Guest

    In comp.lang.java.programmer Fred L. Kleinschmidt <> wrote:
    : Oz Mortimer wrote:

    :> Wow!... I can't believe that J2ME doesn't cater for that!. Has anyone got
    :> any examples? is there a scrollbar class?

    [...]

    : Look at JScrollPane

    No JScrollPane in J2ME.

    There are GUI toolkits for J2ME - e.g. the kAWT: http://www.kawt.de/

    That has a ScrollPane class - and a MIDP version.
    --
    __________
    |im |yler http://timtyler.org/
     
    Tim Tyler, Sep 18, 2003
    #5
  6. Oz Mortimer <> wrote:
    > Wow!... I can't believe that J2ME doesn't cater for that!.


    It's a low-level graphic canvas. The MIDP 1.0 spec has it rendering for
    the physical display. With MIDP 2.0, there's a new GameCanvas class that
    can define a graphical area larger than the physical display and uses
    the physical display as a portal.

    > Has anyone got
    > any examples?


    Check out the Lightweight Windowing Toolkit and OWT.

    > is there a scrollbar class?


    No. But, if there were, you wouldn't be able to use it in the Canvas;
    you can't mix high-level and low-level graphic components in the MIDP.

    --
    Darryl L. Pierce <>
    Visit the Infobahn Offramp - <http://bellsouthpwp.net/m/c/mcpierce>
    "What do you care what other people think, Mr. Feynman?"
     
    Darryl L. Pierce, Sep 19, 2003
    #6
  7. Fred L. Kleinschmidt <> wrote:
    > Look at JScrollPane


    No such class in the MIDP. He's not talking about J2SE, but J2ME/MIDP.

    --
    Darryl L. Pierce <>
    Visit the Infobahn Offramp - <http://bellsouthpwp.net/m/c/mcpierce>
    "What do you care what other people think, Mr. Feynman?"
     
    Darryl L. Pierce, Sep 19, 2003
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. mchmiel
    Replies:
    2
    Views:
    3,811
    Tim Tyler
    Jul 5, 2003
  2. Psymaster
    Replies:
    0
    Views:
    399
    Psymaster
    Jul 19, 2003
  3. Askari
    Replies:
    2
    Views:
    727
    Askari
    Aug 30, 2004
  4. PhilC
    Replies:
    2
    Views:
    911
    PhilC
    Oct 25, 2004
  5. Replies:
    10
    Views:
    278
    Rick Johnson
    Mar 15, 2013
Loading...

Share This Page