txtName.addFocusListener(new FocusAdapter() {
public void focusGained(final FocusEvent e) {
txtName.selectAll();
}
});
txtName.addVerifyListener(new VerifyListener() {
public void verifyText(final VerifyEvent e) {
if(!init)//w�hrend der initialiserung sollen keine �berpr�fungen stattfinden
e.doit = Utils.checkElement(txtName.getText(), dom, sos.scheduler.editor.app.Editor.SCHEDULE, null);
}
});
txtName.addModifyListener(new ModifyListener() {
public void modifyText(final ModifyEvent e) {
if(!init && !existScheduleName())
listener.setName(txtName.getText());
}
});
txtName.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, false, false, 2, 1));
final Label titleLabel = new Label(scheduleGroup, SWT.NONE);
titleLabel.setLayoutData(new GridData(GridData.BEGINNING, GridData.BEGINNING, false, false));
titleLabel.setText("Title");
txtTitle = new Text(scheduleGroup, SWT.BORDER);
txtTitle.addFocusListener(new FocusAdapter() {
public void focusGained(final FocusEvent e) {
txtTitle.selectAll();
}
});
txtTitle.addModifyListener(new ModifyListener() {
public void modifyText(final ModifyEvent e) {
if(!init)
listener.setTitle(txtTitle.getText());
}
});
txtTitle.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, false, false, 2, 1));
final Label substitueLabel = new Label(scheduleGroup, SWT.NONE);
substitueLabel.setText("Substitute");
cboCombo = new Combo(scheduleGroup, SWT.NONE);
cboCombo.addModifyListener(new ModifyListener() {
public void modifyText(final ModifyEvent e) {
if(!init)
listener.setSubstitut(cboCombo.getText());
}
});
cboCombo.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, false, false, 2, 1));
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();
}
});
final Composite composite_1 = new Composite(scheduleGroup, SWT.NONE);
composite_1.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false));
final GridLayout gridLayout_2 = new GridLayout();
gridLayout_2.numColumns = 6;
composite_1.setLayout(gridLayout_2);
txtHourTo = new Text(composite_1, SWT.CENTER | SWT.BORDER);
txtHourTo.addFocusListener(new FocusAdapter() {
public void focusGained(final FocusEvent e) {
txtHourTo.selectAll();
}
});
txtHourTo.setTextLimit(2);
txtHourTo.addVerifyListener(new VerifyListener() {
public void verifyText(final VerifyEvent e) {
e.doit = Utils.isOnlyDigits(e.text);
}
});
txtHourTo.setEnabled(false);
txtHourTo.addModifyListener(new ModifyListener() {
public void modifyText(final ModifyEvent e) {
setValidDateTo();
}
});
final GridData gridData_1_1 = new GridData(GridData.FILL, GridData.FILL, false, false);
gridData_1_1.minimumWidth = 30;
gridData_1_1.widthHint = 30;
txtHourTo.setLayoutData(gridData_1_1);
final Label label_2 = new Label(composite_1, SWT.NONE);
label_2.setText(":");
txtMinuteTo = new Text(composite_1, SWT.CENTER | SWT.BORDER);
txtMinuteTo.addFocusListener(new FocusAdapter() {
public void focusGained(final FocusEvent e) {
txtMinuteTo.selectAll();
}
});
txtMinuteTo.setTextLimit(2);
txtMinuteTo.addVerifyListener(new VerifyListener() {
public void verifyText(final VerifyEvent e) {
e.doit = Utils.isOnlyDigits(e.text);
}
});
txtMinuteTo.setEnabled(false);
txtMinuteTo.addModifyListener(new ModifyListener() {
public void modifyText(final ModifyEvent e) {
setValidDateTo();
}
});
final GridData gridData_2_1 = new GridData(GridData.FILL, GridData.CENTER, false, false);
gridData_2_1.minimumWidth = 30;
gridData_2_1.widthHint = 30;
txtMinuteTo.setLayoutData(gridData_2_1);
final Label label_1_1 = new Label(composite_1, SWT.NONE);
label_1_1.setText(":");
txtSecondTo = new Text(composite_1, SWT.CENTER | SWT.BORDER);
txtSecondTo.addFocusListener(new FocusAdapter() {
public void focusGained(final FocusEvent e) {
txtSecondTo.selectAll();
}
});
txtSecondTo.setTextLimit(2);
txtSecondTo.addVerifyListener(new VerifyListener() {
public void verifyText(final VerifyEvent e) {
e.doit = Utils.isOnlyDigits(e.text);
}
});
txtSecondTo.setEnabled(false);