Reputation: 1391
I am starting a project using solely SWT.
I have never used SWT so I am trying to learn the ins and outs.
I want to create a base dialog window(I will call it a dialog from working with Swing but not sure about SWT).
This window will be the first thing the user sees after clicking a menu action. The window will eventually have buttons that perform actions, it will also have a tableviewer. It is basically like the user opens a small application from the main application.
In Swing - I would just create a dialog class and add a tablelistener. But with SWT, I am not sure if it is dialog or a form or what.
What should I use to create this base SWT window?
Upvotes: 1
Views: 1148
Reputation: 32391
There are a lot of helpful dialogs in SWT. I was usually extending FormDialog, but you can take a look at the Eclipse bundles code to learn from. Please see below an example:
public class SomeDialog extends FormDialog {
public SomeDialog(Shell shell) {
super(shell);
}
@Override
protected void createFormContent() {
}
}
And another hint that may help you a lot. On Windows, you can open a dialog or focus a view or editor and press ALT + SHIFT + F1 to open the Plug-in Spy that will show you the path to the source code of that widget.
Upvotes: 1