Re: [Swingwt-developers] JInternalFrame and setJMenuBar
Status: Beta
Brought to you by:
bobintetley
From: <ro...@ra...> - 2004-02-13 18:31:24
|
Whoops - that class signature should be: public class JListSingleSelection extends JList { :) On Fri, Feb 13, 2004 at 04:01:42PM +0000, robin wrote: > There isn't at the moment. I hope to get ListSelectionModel implemented > sometime in the next couple of weeks (it's on my todo list).=20 >=20 > If you are absolutely desparate for this functionality now, then create > a new component, like this: >=20 >=20 > public class JListSingleSelection { > public void setSwingWTParent(swingwt.awt.Container parent) throws Exc= eption { > ppeer =3D new org.eclipse.swt.widgets.Table(parent.getComposite(), > SWT.BORDER | SWT.SINGLE ); > this.parent =3D parent; > updateList(); > if (pSelectedIndex !=3D -1) > ppeer.select(pSelectedIndex); > peer =3D ppeer; > this.parent =3D parent; > registerListEvents(); > } > } >=20 > Use this in place of JList and it will default to single selection for > now. >=20 > Rob >=20 > On Thu, Feb 12, 2004 at 09:50:14PM +0100, Juan Velasco wrote: > > Hi, > >=20 > > I have another little problem, how do I create a list where you can only > > select one item at the time ? > >=20 > > I tried this: > >=20 > > $list.setSelectionMode(ListSelectionModel.SINGLE_INTERVAL_SELECTION); > >=20 > > But it does not work since setSelectionMode is not implemented and > > the object ListSelectionModel neither. > >=20 > > thanks, > > juan >=20 > --=20 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > Robin Rawson-Tetley (ro...@ra...) --=20 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D Robin Rawson-Tetley Animal Shelter Manager (http://sheltermanager.sf.net) SwingWT (http://swingwt.sf.net) |