Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » How to use the class "ElementListSelectionDialog"?
How to use the class "ElementListSelectionDialog"? [message #452368] Fri, 18 March 2005 11:31 Go to next message
julian is currently offline julianFriend
Messages: 3
Registered: July 2009
Junior Member
import java.util.ArrayList;
import org.eclipse.jdt.internal.corext.util.TypeInfo;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.jface.window.Window;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.dialogs.ElementListSelectionDialog;

public class RunShell {
public static void main(String[] args) {
final Display display = Display.getDefault();
final Shell shell = new Shell();
shell.setSize(327, 253);
shell.setText("SWT Application");
shell.layout();
shell.open();

ElementListSelectionDialog dialog = new
ElementListSelectionDialog (shell,new LabelProvider());
dialog.setMultipleSelection(false);
dialog.setMessage("Input pattern(support ? and *):");
dialog.setTitle("Select the string:");
dialog.setElements(new Object[]{"aa","bb","cc","dd"});
if (dialog.open() == Window.OK) {
System.out.println(dialog.getFirstResult());
}
}
}
When I input "" or "a",there is empty in the next pane, why?
Re: How to use the class "ElementListSelectionDialog"? [message #452395 is a reply to message #452368] Sat, 19 March 2005 12:33 Go to previous messageGo to next message
julian is currently offline julianFriend
Messages: 3
Registered: July 2009
Junior Member
It is seemed too easy!
but i can't resove it!
please help me!
Re: How to use the class "ElementListSelectionDialog"? [message #452493 is a reply to message #452395] Mon, 21 March 2005 14:55 Go to previous message
Grant Gayed is currently offline Grant GayedFriend
Messages: 2150
Registered: July 2009
Senior Member
If you do not get a response to your question here then you should ask this
on the eclipse.platform newsgroup since ElementListSelectionDialog is a UI
class.

Grant

"luggle" <dutzzl@163.com> wrote in message
news:d1h67f$ric$1@www.eclipse.org...
> It is seemed too easy!
> but i can't resove it!
> please help me!
>
Previous Topic:TreeViewer: getExpandedState
Next Topic:Controlling border in a table cell
Goto Forum:
  


Current Time: Sat Oct 19 17:28:39 GMT 2019

Powered by FUDForum. Page generated in 0.02068 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top