469,338 Members | 8,167 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,338 developers. It's quick & easy.

J2ME scrolling canvas?

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.
Jul 17 '05 #1
6 16953
Oz Mortimer <oz@o-tec.tv> 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 <mc******@myrealbox.com>
Visit the Infobahn Offramp - <http://bellsouthpwp.net/m/c/mcpierce>
"What do you care what other people think, Mr. Feynman?"
Jul 17 '05 #2
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" <mc******@myrealbox.com> wrote in message
news:83******************************@news.teranew s.com...
Oz Mortimer <oz@o-tec.tv> 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 <mc******@myrealbox.com>
Visit the Infobahn Offramp - <http://bellsouthpwp.net/m/c/mcpierce>
"What do you care what other people think, Mr. Feynman?"

Jul 17 '05 #3


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" <mc******@myrealbox.com> wrote in message
news:83******************************@news.teranew s.com...
Oz Mortimer <oz@o-tec.tv> 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 <mc******@myrealbox.com>
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
Jul 17 '05 #4
In comp.lang.java.programmer Fred L. Kleinschmidt <fr*****************@boeing.com> 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/ ti*@tt1.org
Jul 17 '05 #5
Oz Mortimer <oz@o-tec.tv> 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 <mc******@myrealbox.com>
Visit the Infobahn Offramp - <http://bellsouthpwp.net/m/c/mcpierce>
"What do you care what other people think, Mr. Feynman?"
Jul 17 '05 #6
Fred L. Kleinschmidt <fr*****************@boeing.com> wrote:
Look at JScrollPane


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

--
Darryl L. Pierce <mc******@myrealbox.com>
Visit the Infobahn Offramp - <http://bellsouthpwp.net/m/c/mcpierce>
"What do you care what other people think, Mr. Feynman?"
Jul 17 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Sveta | last post: by
reply views Thread by Jason D Wolfe | last post: by
4 posts views Thread by D | last post: by
1 post views Thread by blackielawless | last post: by
1 post views Thread by soumengoswami | last post: by
1 post views Thread by Marylou17 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.