Skip to main content

How to make all midlets have similar GUI feature?

5 replies [Last post]
corvin666
Offline
Joined: 2007-11-16
Points: 0

Hello!

I would like to modify my package so that all midlets would have a similar bar at the top, e.g. a 20px strip that would contain things like battery status, clock etc. Which is the right way to do it?

I think that I need to modify the MIDlet class. Where is it located? Is this the one /midp/src/ams/ams_api/reference/classes/javax/microedition/midlet/MIDlet.java ? What should I change to achieve what I want?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
strim
Offline
Joined: 2006-10-20
Points: 0

Hi Corvin,

I would recommend you to look at UI layer classes and at
midp/src/highlevelui/lcdlf/lfjava/classes/com/sun/midp/chameleon/layers.
It sounds like you can introduce one more layer kind of "status bar" and
to update MIDPWindow layout accordingly. BTW, there are things like
your status bar already available, but differently implemented for
various platforms.

Please look at:
midp/src/highlevelui/annunciator/include/anc_indicators.h

and for example:
midp/src/highlevelui/annunciator/linux_qte/native/anc_qte_indicator.cpp

midp/src/ams/mvm/reference/classes/com/sun/midp/main/IndicatorManager.java

corvin666
Offline
Joined: 2007-11-16
Points: 0

Hello!

Thanks a lot for the answer. Following the files you pointed out helped me clarify things a bit. However, am I right in the assumption that this "chameleon" is some kind UI layer in phoneME architecture that defines the look of the phoneME applications?

In my case, it is highly possible that midlet developers would like to have a custom look of the interface and will use some kind of widget package that would allow this. So, as far as I recon, the MIDPWindow class would be out of the way.

I think that I need to go to a deeper level and incorporate this status bar into JVM itself. Am I right?

strim
Offline
Joined: 2006-10-20
Points: 0

Hi Corvin,

> However,
> am I right in the assumption that this "chameleon" is
> some kind UI layer in phoneME architecture that
> defines the look of the phoneME applications?

Yes, you are right, "chameleon" is skin-based high-level
UI implementation in phoneME project. It provides Java
implementations for all MIDP widgets. However, phoneME
contains a few more alternative UI implementations, in
particular the one based on native Qt/E widgets. For your
case you can consider it as a sample of phoneME integration
with underlaying native UI system provided by a platform itself.

> In my case, it is highly possible that midlet
> developers would like to have a custom look of the
> interface and will use some kind of widget package
> that would allow this. So, as far as I recon, the
> MIDPWindow class would be out of the way.

Not out of the way entirely. Using phoneME version
with Qt/E widgets MIDPWindow will be switched to use
native application window provided by Qt/E system.

To get more details on Qt/E support please investigate the
sources:

lowlevelui:
midp/src/lowlevelui/graphics/gx_platform
midp/src/lowlevelui/platform_graphics_port/linux_qte
midp/src/lowlevelui/image/img_platform

highlevelui:
midp/src/highlevelui/annunciator/linux_qte
midp/src/highlevelui/lcdlf/lfplatform
midp/src/highlevelui/lfjport/linux_qte
midp/src/highlevelui/lfpport/linux_qte
midp/src/highlevelui/qte_application

To build phoneME with native Qt/E widgets you need to prepare
Qt/E 2.3.x libraries for your platform. (Could be obtained from Trolltech)
Then phoneME should be build from the folder:

midp/build/linux_qte_gcc

with additional make param:

SUBSYSTEM_LCDUI_MODULES=platform_widget

> I think that I need to go to a deeper level and
> incorporate this status bar into JVM itself. Am I
> right?

I'm pretty sure you shouldn't touch JVM code itself
(I mean CLDC HI configuration code)
All the work can be done in MIDP component in:

midp/src/highlevelui
midp/src/lowlevelui

--
Good luck,
Strim

corvin666
Offline
Joined: 2007-11-16
Points: 0

Thanks a lot, I'll try to dig in this direction. Will ask when more questions arise, if you don't mind.

And how do you know where the sources that I need to look at are located? My biggest problem with phoneME is the lack of adequate documentation that would explain to me what directories and files in phoneME project are responsible for what and it takes a great deal of time to figure out, what functions are being called for a particular action, the task becoming next to impossible for complex actions like drawing.

Do you have such documentation? Or you are talking from your own experience?

strim
Offline
Joined: 2006-10-20
Points: 0

Sure, you are welcome with further questions!

My knowledge of the sources is easy explainable - I'm phoneME developer :)
Unfortunately, should agree the documentation is the weak point of the project,
hope it can be improved as time goes by.