|
From: Fabrice M. <fab...@if...> - 2003-05-01 13:31:51
|
Ok, you're right.
I'll had this array.
Sincerely,
Fabrice
----- Original Message -----
From: "Felix Berger" <bf...@gm...>
To: <ooi...@li...>
Sent: Tuesday, April 29, 2003 6:00 PM
Subject: Re: [Ooimlib-joscarlib] another feature request
>
> > > JComboBox jcb = new JComboBox(StatusModeEnum.STATUS_MODES);
> >
> > True, it will create a JComboBox with all possible status.
> > But, then you'll have to map the selected item to an action, with
something
> > like :
> >
> > public void actionPerformed(ActionEvent e){
> > String str = jcb.getSelectedItem();
> >
> > if(str.equals(new StatusModeEnum(StatusModeEnum.ONLINE).toString()))
> > OscarInterface.changeStatus(connection, new
> > StatusModeEnum(StatusModeEnum.ONLINE));
> >
> > else if(str.equals(new
StatusModeEnum(StatusModeEnum.DND).toString()))
> > OscarInterface.changeStatus(connection, new
> > StatusModeEnum(StatusModeEnum.DND));
> >
> > // ...
> > // etc
> > // ...
> > }
>
> Not really:
>
> The returned object is an instance of StatusModeEnum:
>
> StatusModeEnum state = (StatusModeEnum)jcb.getSelectedItem();
> OscarInterface.changeStatus(connection, state);
>
> Sincerely,
> Felix
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> Ooimlib-joscarlib mailing list
> Ooi...@li...
> https://lists.sourceforge.net/lists/listinfo/ooimlib-joscarlib
> _____________________________________________________________________
> Envie de discuter en "live" avec vos amis ? Télécharger MSN Messenger
> http://www.ifrance.com/_reloc/m la 1ère messagerie instantanée de France
_____________________________________________________________________
Envie de discuter en "live" avec vos amis ? Télécharger MSN Messenger
http://www.ifrance.com/_reloc/m la 1ère messagerie instantanée de France
|