final GridData gridData = new GridData(GridData.FILL, GridData.FILL, true, true, 2, 1);
tabFolder.setLayoutData(gridData);
{
everyDayTabItem = new TabItem(tabFolder, SWT.NONE);
everyDayTabItem.setText(JobAssistentPeriodForms.EVERY_DAY );
{
final Group group = new Group(tabFolder, SWT.NONE);
group.setLayout(new GridLayout());
everyDayTabItem.setControl(group);
{
newPeriodButton = new Button(group, SWT.NONE);
newPeriodButton.setFocus();
newPeriodButton.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(final SelectionEvent e) {
Element period = periodsListener.getNewPeriod();
periodForm.setPeriod(period);
periodForm.setEnabled(true);
addPeriodButton.setEnabled(true);
bApply = JobAssistentPeriodForms.EVERY_DAY;
}
});
newPeriodButton.setLayoutData(new GridData(GridData.END, GridData.CENTER, true, false));
newPeriodButton.setText("New Period");
}
createPeriodForm(JobAssistentPeriodForms.EVERY_DAY, group, everyDayTabItem);
}
}
{
weekdayTabItem = new TabItem(tabFolder, SWT.NONE);
weekdayTabItem.setText(JobAssistentPeriodForms.WEEK_DAY);
{
final Group group = new Group(tabFolder, SWT.NONE);
final GridLayout gridLayout_1 = new GridLayout();
group.setLayout(gridLayout_1);
weekdayTabItem.setControl(group);
{
comboWeekDay = new Combo(group, SWT.NONE);
comboWeekDay.setItems(DaysListener.getWeekdays());
createPeriodForm(JobAssistentPeriodForms.WEEK_DAY, group, weekdayTabItem);
comboWeekDay.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(final SelectionEvent e) {
discardChanges();
if(comboWeekDay.getText() == null || comboWeekDay.getText().length() == 0)
return;
getListener();
addPeriodButton.setEnabled(true);
bApply = JobAssistentPeriodForms.WEEK_DAY;
}
});
comboWeekDay.setLayoutData(new GridData(GridData.END, GridData.CENTER, true, false));
}
}
}
{
monthDayTabItem = new TabItem(tabFolder, SWT.NONE);
monthDayTabItem.setText(MONTH_DAY);
{
final Group group = new Group(tabFolder, SWT.NONE);
group.setLayout(new GridLayout());
monthDayTabItem.setControl(group);
{
comboMonth = new Combo(group, SWT.NONE);
comboMonth.setItems(DaysListener.getMonthdays());
comboMonth.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(final SelectionEvent e) {
discardChanges();
if(comboMonth.getText() == null || comboMonth.getText().length() == 0)
return;
getMonthListener();
addPeriodButton.setEnabled(true);
bApply=JobAssistentPeriodForms.MONTH_DAY;
}
});
comboMonth.setLayoutData(new GridData(GridData.END, GridData.BEGINNING, true, false));
}
createPeriodForm(JobAssistentPeriodForms.MONTH_DAY, group, monthDayTabItem);
}
}
{
specificDayTabItem = new TabItem(tabFolder, SWT.NONE);
specificDayTabItem.setText(SPECIFIC_DAY);
{
final Group group = new Group(tabFolder, SWT.NONE);
group.setLayout(new GridLayout());
specificDayTabItem.setControl(group);