private void createWindow() {
this.display = Display.getCurrent();
this.shell = org.gudy.azureus2.ui.swt.components.shell.ShellFactory.createShell(SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL);
Messages.setLanguageText(this.shell,"wizard.webseedseditor.edit.title");
Utils.setShellIcon(shell);
GridLayout layout = new GridLayout();
layout.numColumns = 3;
shell.setLayout(layout);
GridData gridData;
if ( !anonymous ){
Label labelName = new Label(shell,SWT.NULL);
Messages.setLanguageText(labelName,"wizard.multitracker.edit.name");
textName = new Text(shell,SWT.BORDER);
textName.setText(currentName);
gridData = new GridData(GridData.FILL_HORIZONTAL);
gridData.horizontalSpan = 2;
textName.setLayoutData(gridData);
textName.addModifyListener(new ModifyListener() {
public void modifyText(ModifyEvent arg0) {
currentName = textName.getText();
computeSaveEnable();
}
});
}
treeGroups = new Tree(shell,SWT.BORDER);
gridData = new GridData(GridData.FILL_BOTH);
gridData.horizontalSpan = 3;
gridData.heightHint = 150;
treeGroups.setLayoutData(gridData);
treeGroups.addMouseListener(
new MouseAdapter()
{
public void
mouseDoubleClick(
MouseEvent arg0 )
{
if(treeGroups.getSelectionCount() == 1) {
TreeItem treeItem = treeGroups.getSelection()[0];
String type = (String) treeItem.getData("type");
if(type.equals("tracker")) {
editTreeItem(treeItem);
}
}
}
});
Label labelSeparator = new Label(shell,SWT.SEPARATOR | SWT.HORIZONTAL);
gridData = new GridData(GridData.FILL_HORIZONTAL);
gridData.horizontalSpan = 3;
labelSeparator.setLayoutData(gridData);
// button row
Label label = new Label(shell,SWT.NULL);
gridData = new GridData(GridData.FILL_HORIZONTAL );
label.setLayoutData(gridData);
Composite cButtons = new Composite(shell, SWT.NULL);
gridData = new GridData(GridData.FILL_HORIZONTAL);
gridData.horizontalSpan = 3;
cButtons.setLayoutData(gridData);
GridLayout layoutButtons = new GridLayout();
layoutButtons.numColumns = 3;
cButtons.setLayout(layoutButtons);
label = new Label(cButtons,SWT.NULL);
gridData = new GridData(GridData.FILL_HORIZONTAL );
label.setLayoutData(gridData);