472,328 Members | 1,008 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,328 software developers and data experts.

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 17186
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Sveta | last post by:
Hi, all! I am new with J2ME. I have application that has form with 2 commands (exit and select). All UI uses are high level API, and it is...
0
by: Jason D Wolfe | last post by:
If this is not appropriate for this newsgroup I apologize in advance, please direct me to the appropriate group... I have created a canvas object...
1
by: namratapatil | last post by:
Hi...i am trying to load an image that has been saved at the following path: C:\WTK22\apps\MyProject\res After exectuing the program, the...
4
by: D | last post by:
I'm sure this is a simple question to the Tkinter experts - I have a very basic Tkinter application that consists of 1 master window and buttons...
1
by: blackielawless | last post by:
Hi, My question is about scrolling canvas under Tkinter, I have a canvas of size 1280X800, where my plotting is way beyond the 1280,I need to add...
1
by: charlesvc | last post by:
Hallo I am working on web design on mobile. So i came to know for webpage in html or xhtml needs to be parsed to show on mobile So...
1
by: soumengoswami | last post by:
Hi, Is there any way to scrool a canvas?I know in forms. But when i works in Canvas it is not worked. If anybody know the answer plz help me.
3
by: jaxx0rr | last post by:
This will probably look like a really stupid piece of code.. but it works My question is, how can I write the last part so there is only one...
0
by: tammygombez | last post by:
Hey fellow JavaFX developers, I'm currently working on a project that involves using a ComboBox in JavaFX, and I've run into a bit of an issue....
0
by: tammygombez | last post by:
Hey everyone! I've been researching gaming laptops lately, and I must say, they can get pretty expensive. However, I've come across some great...
0
by: concettolabs | last post by:
In today's business world, businesses are increasingly turning to PowerApps to develop custom business applications. PowerApps is a powerful tool...
0
by: CD Tom | last post by:
This happens in runtime 2013 and 2016. When a report is run and then closed a toolbar shows up and the only way to get it to go away is to right...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
1
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.