/** * Called when a button is selected. (non-Javadoc) * * @see * org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent) */ public void widgetSelected(SelectionEvent e) { if (e.widget.equals(verifyRun) || e.widget.equals(verifyStep)) handleVerify(e.widget.equals(verifyStep)); else if (e.widget.equals(close)) cancelPressed(); else if (e.widget.equals(fileBar.getNewFileButton())) handleNewFile(); else if (e.widget.equals(fileBar.getDeleteFileButton())) handleDeleteFile(); }
private Composite createFileTreeArea(Composite parent) { Composite top = new Composite(parent, SWT.NULL); top.setLayout(new FormLayout()); fileBar = new ConfigFileBar(top, SWT.NULL); Composite tree = createModePropertyTree(top); fileBar.getNewFileButton().addSelectionListener(this); fileBar.getDeleteFileButton().addSelectionListener(this); FormData layoutData = new FormData(); layoutData.top = new FormAttachment(0, 0); layoutData.left = new FormAttachment(0, 5); layoutData.right = new FormAttachment(100, -5); fileBar.setLayoutData(layoutData); layoutData = new FormData(); layoutData.top = new FormAttachment(fileBar, 3); layoutData.left = new FormAttachment(0, 5); layoutData.right = new FormAttachment(100, -5); layoutData.bottom = new FormAttachment(100, 5); tree.setLayoutData(layoutData); return top; }