GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
buttonsComposite.setLayoutData(gridData);
GDDate date = new GDDate();
final DateText fromDateText = new DateText(buttonsComposite, SWT.SINGLE | SWT.BORDER | SWT.READ_ONLY);
date.setFirstDayOfMonth();
fromDateText.setValue(date.getDate());
gridData = new GridData();
gridData.widthHint = 80;
fromDateText.setLayoutData(gridData);
Label label = new Label(buttonsComposite, SWT.NONE);
label.setText(" � ");
final DateText toDateText = new DateText(buttonsComposite, SWT.SINGLE | SWT.BORDER | SWT.READ_ONLY);
date.setLastDayOfMonth();
toDateText.setValue(date.getDate());
toDateText.setLayoutData(gridData);
createModifyValidatorDateText(fromDateText, toDateText);
Button filterByDate = new Button(buttonsComposite, SWT.NONE);
filterByDate.setText("Filtrar");
filterByDate.addListener(SWT.Selection, new Listener() {
public void handleEvent(Event arg0) {
if (checkIffromDateIsAftertoDate(fromDateText.getText(), toDateText.getText())){
setErrorMessage("A data Inicial deve ser menor que a data Final!");
}else{
setErrorMessage("");
expendituresTable.setFromDate(new GDDate(fromDateText.getText()));
expendituresTable.setToDate(new GDDate(toDateText.getText()));
expendituresTable.updateTable();
}
}
});