Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Java (http://www.velocityreviews.com/forums/f30-java.html)
-   -   J2ME scrolling canvas? (http://www.velocityreviews.com/forums/t126779-j2me-scrolling-canvas.html)

Oz Mortimer 09-17-2003 04:55 PM

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.



Darryl L. Pierce 09-18-2003 02:01 AM

Re: J2ME scrolling canvas?
 
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 <mcpierce@myrealbox.com>
Visit the Infobahn Offramp - <http://bellsouthpwp.net/m/c/mcpierce>
"What do you care what other people think, Mr. Feynman?"

Oz Mortimer 09-18-2003 07:26 AM

Re: J2ME scrolling canvas?
 
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" <mcpierce@myrealbox.com> wrote in message
news:836859db1875641bc99a0f8e02089241@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 <mcpierce@myrealbox.com>
> Visit the Infobahn Offramp - <http://bellsouthpwp.net/m/c/mcpierce>
> "What do you care what other people think, Mr. Feynman?"




Fred L. Kleinschmidt 09-18-2003 02:04 PM

Re: J2ME scrolling canvas?
 


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" <mcpierce@myrealbox.com> wrote in message
> news:836859db1875641bc99a0f8e02089241@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 <mcpierce@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

Tim Tyler 09-18-2003 04:24 PM

Re: J2ME scrolling canvas?
 
In comp.lang.java.programmer Fred L. Kleinschmidt <fred.l.kleinschmidt@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/ tim@tt1.org

Darryl L. Pierce 09-19-2003 12:01 PM

Re: J2ME scrolling canvas?
 
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 <mcpierce@myrealbox.com>
Visit the Infobahn Offramp - <http://bellsouthpwp.net/m/c/mcpierce>
"What do you care what other people think, Mr. Feynman?"

Darryl L. Pierce 09-19-2003 12:01 PM

Re: J2ME scrolling canvas?
 
Fred L. Kleinschmidt <fred.l.kleinschmidt@boeing.com> wrote:
> Look at JScrollPane


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

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


All times are GMT. The time now is 04:11 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.