Button coursePackageButton = new Button(buttonsComposite, SWT.NONE);
coursePackageButton.setText("Gerar pacote com os cursos selecionados");
coursePackageButton.addListener(SWT.Selection, new Listener(){
public void handleEvent(Event arg0) {
if(!isSelectedCourseAPackage()){
new AddCoursePackageDialog(getParent().getShell(), getMySelf(), courseTable.getSelection()).open();
setErrorMessage("");
} else {
setErrorMessage("Voc� n�o pode montar um pacote com outro pacote.");
}
}
});
editCourseButton = new Button(buttonsComposite, SWT.NONE);
editCourseButton.setText("Editar");
editCourseButton.addListener(SWT.Selection, new Listener(){
public void handleEvent(Event arg0) {
if(!isSelectedCourseAPackage()){
new AddCourseDialog(getParent().getShell(), getMySelf(), courseTable.getSelection()[0].getText(0)).open();
} else {
new AddCoursePackageDialog(getParent().getShell(), getMySelf(), courseTable.getSelection(), courseTable.getSelection()[0].getText(0)).open();
}
}
});