Skip to main content

Q : Add Command List in The Form ?

7 replies [Last post]
Anonymous

Hi guys....

is this possible.... ?

i want to create a list of command in the left soft key. when i read the LWUIT docs, it said if there are 3 command added in the form then it will automatically make a menu of my command list in the right soft key...

what i wanna do is something like this :

======================
            FORM
======================
                                           |
                                           |
                                           |
                                           |
                                           |
--------------                             |
open      |                             |
--------------                             |
setting   |                              |
-------------                              |
======================
options                        next
======================

so when i click option it will appear : open and setting command ?

dwi ardi irawan - 'penyihirkecil'
http://dwiardiirawan.blogspot.com

[att1.html]

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Francis De Brabandere

this might help:

UIManager.getInstance().getLookAndFeel().setReverseSoftButtons(true);

On Mon, Jul 28, 2008 at 4:29 AM, Penyihir Kecil
wrote:
> Hi guys....
>
> is this possible.... ?
>
> i want to create a list of command in the left soft key. when i read the
> LWUIT docs, it said if there are 3 command added in the form then it will
> automatically make a menu of my command list in the right soft key...
>
> what i wanna do is something like this :
>
>
> ======================
> FORM
> ======================
> |
> |
> |
> |
> |
> -------------- |
> open | |
> -------------- |
> setting | |
> ------------- |
> ======================
> options next
> ======================
>
>
> so when i click option it will appear : open and setting command ?
>
> dwi ardi irawan - 'penyihirkecil'
> http://dwiardiirawan.blogspot.com
>
>

--
http://www.somatik.be
Microsoft gives you windows, Linux gives you the whole house.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
For additional commands, e-mail: users-help@lwuit.dev.java.net

Penyihir Kecil

i have a problem here.

i create 3 Command component : open, setting and exit
but when i do this :

Form.addCommand(open);       
Form.addCommand(setting );
Form.addCommand(exit);

the left soft keys shows : menu -> open : setting : exit
and the right soft keys show : exit

????

what i want is the left soft keys only show : menu -> open : setting ... (without exit)
and the right soft keys is shows : exit

could anybody help make me clear bout this adding command concept ???

thnx u

dwi ardi irawan - 'penyihirkecil'
http://dwiardiirawan.blogspot.com

--- On Mon, 7/28/08, Francis De Brabandere wrote:

UIManager.getInstance().getLookAndFeel().setReverseSoftButtons(true);

On Mon, Jul 28, 2008 at 4:29 AM, Penyihir Kecil
wrote:
> Hi guys....
>
> is this possible.... ?
>
> i want to create a list of command in the left soft key. when i read the
> LWUIT docs, it said if there are 3 command added in the form then it will
> automatically make a menu of my command list in the right soft key...
>
> what i wanna do is something like this :
>
>
> ======================
> FORM
> ======================
> |
> |
> |
> |
> |
> -------------- |
> open | |
> -------------- |
> setting | |
> ------------- |
> ======================
> options next
> ======================
>
>
> so when i click option it will appear : open and setting command ?

this might help:

[att1.html]

chen

Hi,
This is a default behaviour of LWUIT menus, you can override this
behavior extend Form and override

protected List createCommandList(Vector commands)

rearrange the commands or remove your exit command.

Regards,
Chen

Penyihir Kecil wrote:
> i have a problem here.
>
> i create 3 Command component : open, setting and exit
> but when i do this :
>
> Form.addCommand(open);
> Form.addCommand(setting );
> Form.addCommand(exit);
>
> the left soft keys shows : menu -> open : setting : exit
> and the right soft keys show : exit
>
> ????
>
> what i want is the left soft keys only show : menu -> open : setting
> ... (without exit)
> and the right soft keys is shows : exit
>
> could anybody help make me clear bout this adding command concept ???
>
> thnx u
>
> dwi ardi irawan - 'penyihirkecil'
> http://dwiardiirawan.blogspot.com
>
>
> --- On *Mon, 7/28/08, Francis De Brabandere //*
> wrote:
>
> UIManager.getInstance().getLookAndFeel().setReverseSoftButtons(true);
>
> On Mon, Jul 28, 2008 at 4:29 AM, Penyihir Kecil
> wrote:
> > Hi guys....
> >
> > is this possible.... ?
> >
> > i want to create a list of command in the left soft key. when i read the
> > LWUIT docs, it said if there are 3 command added in the form then it will
> > automatically make a menu of my command list in the right soft key...
> >
> > what i wanna do is something like this :
> >
> >
> > ======================
> > FORM
> > ======================
> > |
> > |
> > |
> > |
> > |
> > --------------
> |
> > open | |
> > -------------- |
> > setting | |
> > ------------- |
> > ======================
> > options next
> > ======================
> >
> >
> > so when i click option it will appear : open and setting command ?
>
>
>
>
>
> this might help:
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
For additional commands, e-mail: users-help@lwuit.dev.java.net

Penyihir Kecil

thnx u very much ^_^v

dwi ardi irawan - 'penyihirkecil'
http://dwiardiirawan.blogspot.com

--- On Mon, 7/28/08, chen wrote:
From: chen
Subject: Re: Q : Add Command List in The Form ?
To: users@lwuit.dev.java.net
Date: Monday, July 28, 2008, 6:35 PM

Hi,
This is a default behaviour of LWUIT menus, you can override this
behavior extend Form and override

protected List createCommandList(Vector commands)

rearrange the commands or remove your exit command.

Regards,
Chen

Penyihir Kecil wrote:
> i have a problem here.
>
> i create 3 Command component : open, setting and exit
> but when i do this :
>
> Form.addCommand(open);
> Form.addCommand(setting );
> Form.addCommand(exit);
>
> the left soft keys shows : menu -> open : setting : exit
> and the right soft keys show : exit
>
> ????
>
> what i want is the left soft keys only show : menu -> open : setting
> ... (without exit)
> and the right soft keys is shows : exit
>
> could anybody help make me clear bout this adding command concept ???
>
> thnx u
>
> dwi ardi irawan - 'penyihirkecil'
> http://dwiardiirawan.blogspot.com
>
>
> --- On *Mon, 7/28/08, Francis De Brabandere //*

> wrote:
>
> UIManager.getInstance().getLookAndFeel().setReverseSoftButtons(true);
>
> On Mon, Jul 28, 2008 at 4:29 AM, Penyihir Kecil

> wrote:
> > Hi guys....
> >
> > is this possible.... ?
> >
> > i want to create a list of command in the left soft key. when i
read the
> > LWUIT docs, it said if there are 3 command added in the form then
it will
> > automatically make a menu of my command list in the right soft
key...
> >
> > what i wanna do is something like this :
> >
> >
> > ======================
> > FORM
> > ======================
> > |
> > |
> > |
> > |
> > |
> > --------------
> |
> > open | |
> > -------------- |
> > setting | |
> > ------------- |
> > ======================
> > options next
> > ======================
> >
> >
> > so when i click option it will appear : open and setting command
?
>
>
>
>
>
> this might help:
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
For additional commands, e-mail: users-help@lwuit.dev.java.net

[att1.html]

Penyihir Kecil

if you don't mind, could you give me simple example...i try to overide it but always fail

dwi ardi irawan - 'penyihirkecil'
http://dwiardiirawan.blogspot.com

--- On Tue, 7/29/08, Penyihir Kecil
wrote:
From: Penyihir Kecil
Subject: Re: Q : Add Command List in The Form ?
To: users@lwuit.dev.java.net
Date: Tuesday, July 29, 2008, 10:11 AM

thnx u very much ^_^v

dwi ardi irawan - 'penyihirkecil'
http://dwiardiirawan.blogspot.com

--- On Mon, 7/28/08, chen wrote:
From: chen
Subject: Re: Q : Add Command List in The Form ?
To: users@lwuit.dev.java.net
Date: Monday, July 28, 2008, 6:35 PM

Hi,
This is a default behaviour of LWUIT menus, you can override this
behavior extend Form and override

protected List createCommandList(Vector commands)

rearrange the commands or remove your exit command.

Regards,
Chen

Penyihir Kecil wrote:
> i have a problem here.
>
> i create 3 Command component : open, setting and exit
> but
when i do this :
>
> Form.addCommand(open);
> Form.addCommand(setting );
> Form.addCommand(exit);
>
> the left soft keys shows : menu -> open : setting : exit
> and the right soft keys show : exit
>
> ????
>
> what i want is the left soft keys only show : menu -> open : setting
> ... (without exit)
> and the right soft keys is shows : exit
>
> could anybody help make me clear bout this adding command concept ???
>
> thnx u
>
> dwi ardi irawan - 'penyihirkecil'
> http://dwiardiirawan.blogspot.com
>
>
> --- On *Mon, 7/28/08, Francis De Brabandere //*

> wrote:
>
> UIManager.getInstance().getLookAndFeel().setReverseSoftButtons(true);
>
> On Mon, Jul 28, 2008 at 4:29 AM, Penyihir Kecil

>
wrote:
> > Hi guys....
> >
> > is this possible.... ?
> >
> > i want to create a list of command in the left soft key. when i
read the
> > LWUIT docs, it said if there are 3 command added in the form then
it will
> > automatically make a menu of my command list in the right soft
key...
> >
> > what i wanna do is something like this :
> >
> >
> > ======================
> > FORM
> > ======================
> > |
> > |
> > |
> > |
> > |
> > --------------

> |
> > open | |
> > -------------- |
> > setting | |
> > ------------- |
> > ======================
> > options next
> > ======================
> >
> >
> > so when i click option it will appear : open and setting command
?
>
>
>
>
>
> this might help:
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
For additional commands, e-mail: users-help@lwuit.dev.java.net

[att1.html]

chen

Hi,
Try this:

protected List createCommandList(Vector commands) {
int size = commands.size();
Vector v = new Vector();
for (int i = 0; i < size; i++) {
Command cmd = (Command)commands.elementAt(i);
if(!cmd.getCommandName().equals("Exit")){
v.addElement(cmd);
}
}
return super.createCommandList(v);
}

Regards,
Chen

Penyihir Kecil wrote:
> if you don't mind, could you give me simple example...i try to overide
> it but always fail
>
> dwi ardi irawan - 'penyihirkecil'
> http://dwiardiirawan.blogspot.com
>
>
> --- On *Tue, 7/29/08, Penyihir Kecil /
/* wrote:
>
> From: Penyihir Kecil
> Subject: Re: Q : Add Command List in The Form ?
> To: users@lwuit.dev.java.net
> Date: Tuesday, July 29, 2008, 10:11 AM
>
> thnx u very much ^_^v
>
> dwi ardi irawan - 'penyihirkecil'
> http://dwiardiirawan.blogspot.com
>
>
> --- On *Mon, 7/28/08, chen //* wrote:
>
> From: chen
> Subject: Re: Q : Add Command List in The Form ?
> To: users@lwuit.dev.java.net
> Date: Monday, July 28, 2008, 6:35 PM
>
> Hi,
> This is a default behaviour of LWUIT menus, you can override this
> behavior extend Form and override
>
> protected List createCommandList(Vector commands)
>
>
> rearrange the commands or remove your exit command.
>
> Regards,
> Chen
>
>
>
>
> Penyihir Kecil wrote:
> > i have a problem here.
> >
> > i create 3 Command component : open, setting and exit
> > but
> when i do this :
> >
> > Form.addCommand(open);
> > Form.addCommand(setting );
> >
> Form.addCommand(exit);
> >
> > the left soft keys shows : menu -> open : setting : exit
> > and the right soft keys show : exit
> >
> > ????
> >
> > what i want is the left soft keys only show : menu -> open : setting
> > ... (without exit)
> > and the right soft keys is shows : exit
> >
> > could anybody help make me clear bout this adding command concept ???
> >
> > thnx u
> >
> > dwi ardi irawan - 'penyihirkecil'
> > http://dwiardiirawan.blogspot.com
> >
> >
> > --- On *Mon, 7/28/08, Francis De Brabandere //*
>
> > wrote:
> >
> > UIManager.getInstance().getLookAndFeel().setReverseSoftButtons(true);
> >
> > On Mon, Jul 28, 2008 at 4:29 AM, Penyihir Kecil
>
> >
> wrote:
> > > Hi guys....
> > >
> > > is this possible.... ?
> >
> >
> > > i want to create a list of command in the left soft key. when i
> read the
> > > LWUIT docs, it said if there are 3 command added in the form then
> it will
> > > automatically make a menu of my command list in the right soft
> key...
> > >
> > > what i wanna do is something like this :
> > >
> > >
> > > ======================
> > > FORM
> > > ======================
> > > |
> > > |
> > > |
> > > |
> > > |
> > > --------------
>
> > |
> > > open | |
> >
> > -------------- |
> > > setting | |
> > > ------------- |
> > > ======================
> > > options next
> > > ======================
> > >
> > >
> > > so when i click option it will appear : open and setting command
> ?
> >
> >
> >
> >
> >
> > this might help:
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
> For additional commands, e-mail: users-help@lwuit.dev.java.net
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
For additional commands, e-mail: users-help@lwuit.dev.java.net

RehamH
Offline
Joined: 2012-10-07
Points: 0

Could you please help me,if i want to remove some commands too..Do i have to override another methods ?