473,757 Members | 9,145 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 17294
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 programmaticall y 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******@myrea lbox.com>
Visit the Infobahn Offramp - <http://bellsouthpwp.ne t/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******@myrea lbox.com> wrote in message
news:83******** *************** *******@news.te ranews.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 programmaticall y 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******@myrea lbox.com>
Visit the Infobahn Offramp - <http://bellsouthpwp.ne t/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******@myrea lbox.com> wrote in message
news:83******** *************** *******@news.te ranews.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 programmaticall y 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******@myrea lbox.com>
Visit the Infobahn Offramp - <http://bellsouthpwp.ne t/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.co m> 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******@myrea lbox.com>
Visit the Infobahn Offramp - <http://bellsouthpwp.ne t/m/c/mcpierce>
"What do you care what other people think, Mr. Feynman?"
Jul 17 '05 #6
Fred L. Kleinschmidt <fr************ *****@boeing.co m> wrote:
Look at JScrollPane


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

--
Darryl L. Pierce <mc******@myrea lbox.com>
Visit the Infobahn Offramp - <http://bellsouthpwp.ne t/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
4058
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 very important to leave it high-level. This application works fine on some devices. But at Samsung mobile phone, I have a problem. In this phone my 2 commands appear under menu command, and then I can
0
1481
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 and set it as the current displayable in the current display. The command listner is the class that I created and called the canvas object from. I added commands to the canvas, to be caught by the commandListener (which is set to the class that created the canvas). The problem is this......
1
15902
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 NullPointerException is thrown...Kindly let me know how to load the image without any exceptions being thrown... import javax.microedition.midlet.*; import javax.microedition.lcdui.*; public class ImmutableImageExample extends MIDlet { private Display display; private MyCanvas canvas;
4
11483
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 within that window. My problem is that, I need to be able to scroll (up and down) when I get to the point that the buttons go off the screen. What's the easiest way to do this? Thanks in advance.
1
2197
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 scroller bars H & V and be able to use them to pan around my image. Any help please Best regards
1
8733
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 my doubt is the parsing will give only tags text and source etc. only, we have simulate it as a web page in canvas. I want to know whether my idea is correct or not. I found PocketLearn J2ME HTML Component. Here my doubt is whether the package webserver with this is available for dowload to use...
1
1779
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
2323
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 extended Canvas class that can recieve a parameter for the image number Thanks import java.io.IOException; import javax.microedition.lcdui.Canvas; import javax.microedition.lcdui.Command; import javax.microedition.lcdui.CommandListener;
0
9489
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9298
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10072
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9906
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9885
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9737
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8737
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5172
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5329
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.