The Source for Java Technology Collaboration

Home » java.net Forums » Mobile & Embedded » LWUIT

Thread: Customizing the Menu / MenuBar

Welcome, Guest Help
Login Login
Guest Settings Guest Settings
This question is answered. Helpful answers available: 2. Correct answers available: 1.

Reply to this Thread Reply to this Thread Search Forum Search Forum Back to Thread List Back to Thread List

Permlink Replies: 3 - Last Post: Nov 22, 2008 12:31 AM by: Shai Almog
klemensz

Posts: 31
Customizing the Menu / MenuBar
Posted: Nov 21, 2008 3:53 AM
 
  Click to reply to this thread Reply

Hi,
I have some things that I would need to chage in the behaviour of the MenuBar:

1) Write something in the center of the bar, like "OK" (this should be changable) to indicate what the FIRE button does.

2) Draw images to the left and right of the OK string (arrows, e.g. for indicating whether the form or a component is scrollable).

3) The command from the left soft button should not move to the menu when opening it with the right soft button, it should stay on the left side.

I wracked my brains for quite some time now but I'm not sure whether this is possible in a "legal" way without modifying the LWUIT source because I cannot override Form.MenuBar in a subclass.
I tried 1) by using the "third soft button" option, then getting it from the form and modifying the text of it, but it didn't work that well. I also tried the glass pane, but then there is a problem with dialogs.

Thanks!

Shai Almog
Re: Customizing the Menu / MenuBar
Posted: Nov 21, 2008 5:10 AM   in response to: klemensz
  Click to reply to this thread Reply

Hi,
On Nov 21, 2008, at 1:53 PM, lwuit-users@mobileandembedded.org wrote:

> Hi,
> I have some things that I would need to chage in the behaviour of
> the MenuBar:
>
> 1) Write something in the center of the bar, like "OK" (this should
> be changable) to indicate what the FIRE button does.

Look at 3 button mode in the DefaultLookAndFeel.

>
> 2) Draw images to the left and right of the OK string (arrows, e.g.
> for indicating whether the form or a component is scrollable).

For this I would suggest a glass pane.

> 3) The command from the left soft button should not move to the
> menu when opening it with the right soft button, it should stay on
> the left side.

See if this is OK with 3 button mode, you can manipulate the
resulting dialog in showMenuDialog.

>
> I wracked my brains for quite some time now but I'm not sure
> whether this is possible in a "legal" way without modifying the
> LWUIT source because I cannot override Form.MenuBar in a subclass.
> I tried 1) by using the "third soft button" option, then getting it
> from the form and modifying the text of it, but it didn't work that
> well. I also tried the glass pane, but then there is a problem with
> dialogs.
>
> Thanks!
> [Message sent by forum member 'klemensz' (klemensz)]
>
> http://forums.java.net/jive/thread.jspa?messageID=318079
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
> For additional commands, e-mail: users-help@lwuit.dev.java.net
>

Shai Almog
http://lwuit.blogspot.com/

[att1.html]


klemensz

Posts: 31
Re: Customizing the Menu / MenuBar
Posted: Nov 21, 2008 5:47 AM   in response to: Shai Almog
 
  Click to reply to this thread Reply

The only thing I found about the 3 button mode was in Display (setThirdSoftButton). Where do I have to look in DefaultLookAndFeel?

Shai Almog
Re: Customizing the Menu / MenuBar
Posted: Nov 22, 2008 12:31 AM   in response to: klemensz
  Click to reply to this thread Reply

Thats what I was talking about, I forgot it was moved to display
eventually.

> The only thing I found about the 3 button mode was in Display
> (setThirdSoftButton). Where do I have to look in DefaultLookAndFeel?
> [Message sent by forum member 'klemensz' (klemensz)]
>
> http://forums.java.net/jive/thread.jspa?messageID=318096
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
> For additional commands, e-mail: users-help@lwuit.dev.java.net
>

Shai Almog
http://lwuit.blogspot.com/

[att1.html]





 XML java.net RSS