Label validFromLabel = new Label(scheduleGroup, SWT.NONE);
validFromLabel.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, false, false));
validFromLabel.setText("Valid From");
validFrom = new DatePicker(scheduleGroup, SWT.BORDER);
validFrom.setEditable(true);
validFrom.addModifyListener(new ModifyListener() {
public void modifyText(final ModifyEvent e) {
setValidDateFrom();
}
});
final GridData gridData = new GridData();
gridData.grabExcessHorizontalSpace = true;
gridData.horizontalAlignment = SWT.FILL;
validFrom.setLayoutData(gridData);
final Composite composite_1_1 = new Composite(scheduleGroup, SWT.NONE);
composite_1_1.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false));
final GridLayout gridLayout_1 = new GridLayout();
gridLayout_1.numColumns = 6;
composite_1_1.setLayout(gridLayout_1);
txtHourFrom = new Text(composite_1_1, SWT.CENTER | SWT.BORDER);
txtHourFrom.addFocusListener(new FocusAdapter() {
public void focusGained(final FocusEvent e) {
txtHourFrom.selectAll();
}
});
txtHourFrom.setTextLimit(2);
txtHourFrom.addVerifyListener(new VerifyListener() {
public void verifyText(final VerifyEvent e) {
e.doit = Utils.isOnlyDigits(e.text);
}
});
txtHourFrom.addModifyListener(new ModifyListener() {
public void modifyText(final ModifyEvent e) {
setValidDateFrom();
}
});
txtHourFrom.setEnabled(false);
final GridData gridData_1_1_1 = new GridData(GridData.FILL, GridData.FILL, false, false);
gridData_1_1_1.minimumWidth = 30;
gridData_1_1_1.widthHint = 30;
txtHourFrom.setLayoutData(gridData_1_1_1);
final Label label_2_1 = new Label(composite_1_1, SWT.NONE);
label_2_1.setText(":");
txtMinuteFrom = new Text(composite_1_1, SWT.CENTER | SWT.BORDER);
txtMinuteFrom.addFocusListener(new FocusAdapter() {
public void focusGained(final FocusEvent e) {
txtMinuteFrom.selectAll();
}
});
txtMinuteFrom.setTextLimit(2);
txtMinuteFrom.addVerifyListener(new VerifyListener() {
public void verifyText(final VerifyEvent e) {
e.doit = Utils.isOnlyDigits(e.text);
}
});
txtMinuteFrom.setEnabled(false);
txtMinuteFrom.addModifyListener(new ModifyListener() {
public void modifyText(final ModifyEvent e) {
setValidDateFrom();
}
});
final GridData gridData_2_1_1 = new GridData(GridData.FILL, GridData.CENTER, false, false);
gridData_2_1_1.minimumWidth = 30;
gridData_2_1_1.widthHint = 30;
txtMinuteFrom.setLayoutData(gridData_2_1_1);
final Label label_1_1_1 = new Label(composite_1_1, SWT.NONE);
label_1_1_1.setText(":");
txtSecondFrom = new Text(composite_1_1, SWT.CENTER | SWT.BORDER);
txtSecondFrom.addFocusListener(new FocusAdapter() {
public void focusGained(final FocusEvent e) {
txtSecondFrom.selectAll();
}
});
txtSecondFrom.setTextLimit(2);
txtSecondFrom.addVerifyListener(new VerifyListener() {
public void verifyText(final VerifyEvent e) {
e.doit = Utils.isOnlyDigits(e.text);
}
});
txtSecondFrom.addModifyListener(new ModifyListener() {
public void modifyText(final ModifyEvent e) {
setValidDateFrom();
}
});
txtSecondFrom.setEnabled(false);
txtSecondFrom.setLayoutData(new GridData(30, SWT.DEFAULT));
final Label hhmmssLabel_1_1 = new Label(composite_1_1, SWT.NONE);
hhmmssLabel_1_1.setText("hh:mm:ss");
final Label validToLabel = new Label(scheduleGroup, SWT.NONE);
validToLabel.setText("Valid To");
validTo = new DatePicker(scheduleGroup, SWT.BORDER);
validTo.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
validTo.setEditable(true);
validTo.addModifyListener(new ModifyListener() {
public void modifyText(final ModifyEvent e) {
setValidDateTo();