public void widgetSelected(SelectionEvent e) {
fDeleteNewsByCountValue.setEnabled(fDeleteNewsByCountCheck.getSelection());
}
});
fDeleteNewsByCountValue = new Spinner(group, SWT.BORDER);
fDeleteNewsByCountValue.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, false, false));
fDeleteNewsByCountValue.setEnabled(fDeleteNewsByCountCheck.getSelection());
fDeleteNewsByCountValue.setMinimum(0);
fDeleteNewsByCountValue.setMaximum(99999);
fDeleteNewsByCountValue.setSelection(fGlobalScope.getInteger(DefaultPreferences.DEL_NEWS_BY_COUNT_VALUE));
/* Delete by Age */
fDeleteNewsByAgeCheck = new Button(group, SWT.CHECK);
fDeleteNewsByAgeCheck.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, false, false));
fDeleteNewsByAgeCheck.setSelection(fGlobalScope.getBoolean(DefaultPreferences.DEL_NEWS_BY_AGE_STATE));
fDeleteNewsByAgeCheck.setText("Maximum age of news in days: ");
fDeleteNewsByAgeCheck.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
fDeleteNewsByAgeValue.setEnabled(fDeleteNewsByAgeCheck.getSelection());
}
});
fDeleteNewsByAgeValue = new Spinner(group, SWT.BORDER);
fDeleteNewsByAgeValue.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, false, false));
fDeleteNewsByAgeValue.setEnabled(fDeleteNewsByAgeCheck.getSelection());
fDeleteNewsByAgeValue.setMinimum(0);
fDeleteNewsByAgeValue.setMaximum(99999);
fDeleteNewsByAgeValue.setSelection(fGlobalScope.getInteger(DefaultPreferences.DEL_NEWS_BY_AGE_VALUE));