Button print = new Button(buttons, SWT.PUSH);
print.setText("Visualizar");
print.addListener(SWT.MouseDown, new Listener() {
public void handleEvent(Event arg0) {
if(new GDDate(initialDateText.getText()).afterDay(new GDDate(endDateText.getText()))){
setErrorMessage("A data inicial deve ser menor que a data final.");
initialDateText.setFocus();
} else {
screenMessageLabel.setVisible(false);
setScreenMessage("");
screenMessageLabel.setText("");
screenMessageLabel.redraw();
if(allRadio.getSelection()){
CreateReports.createStudentWithoutPrintedCertifyReport(null, null, 0, true);
} else if(orderByRadio.getSelection()){
if(optionRadioButton1.getSelection()){
CreateReports.createStudentWithoutPrintedCertifyReport(new GDDate(initialDateText.getText()), new GDDate(endDateText.getText()), 0, ignoreDateCheck.getSelection());
} else if(optionRadioButton2.getSelection()){
CreateReports.createStudentWithoutPrintedCertifyReport(new GDDate(initialDateText.getText()), new GDDate(endDateText.getText()), 1, ignoreDateCheck.getSelection());
} else if(optionRadioButton3.getSelection()){
CreateReports.createStudentWithoutPrintedCertifyReport(new GDDate(initialDateText.getText()), new GDDate(endDateText.getText()), 2, ignoreDateCheck.getSelection());
}
}
screenMessageLabel.setVisible(true);
}
}