jobchainLabel = new Label(jobsAndOrdersGroup, SWT.NONE);
final GridData gridData_10 = new GridData();
jobchainLabel.setLayoutData(gridData_10);
jobchainLabel.setText("Job chain");
cJobchain = new Combo(jobsAndOrdersGroup, SWT.NONE);
cJobchain.setEnabled(false);
cJobchain.setItems(listener.getJobChains());
cJobchain.addModifyListener(new org.eclipse.swt.events.ModifyListener() {
public void modifyText(org.eclipse.swt.events.ModifyEvent e) {
if(!event)
return;
listener.setJobChain(cJobchain.getText());
String curstate = Utils.getAttributeValue("state", listener.getCommand());
tState.setItems(listener.getStates());
tState.setText(curstate);
String curEndstate = Utils.getAttributeValue("end_state", listener.getCommand());
cboEndstate.setItems(listener.getStates());
cboEndstate.setText(curEndstate);
}
});
final GridData gridData_8 = new GridData(GridData.FILL, GridData.CENTER, false, false, 2, 1);
gridData_8.widthHint = 114;
cJobchain.setLayoutData(gridData_8);
lblJob = new Label(jobsAndOrdersGroup, SWT.NONE);
lblJob.setLayoutData(new GridData(73, SWT.DEFAULT));
lblJob.setText("Job / Order ID");
tJob = new Text(jobsAndOrdersGroup, SWT.BORDER);
tJob.addFocusListener(new FocusAdapter() {
public void focusGained(final FocusEvent e) {
tJob.selectAll();
}
});
tJob.addModifyListener(new org.eclipse.swt.events.ModifyListener() {
public void modifyText(org.eclipse.swt.events.ModifyEvent e) {
if(type == Editor.JOB){
listener.setJob(tJob.getText());
} else {
listener.setOrderId(tJob.getText());
}
}
});
final GridData gridData_3 = new GridData(GridData.FILL, GridData.CENTER, false, false, 2, 1);
tJob.setLayoutData(gridData_3);
final Label startAtLabel = new Label(jobsAndOrdersGroup, SWT.NONE);
startAtLabel.setLayoutData(new GridData());
startAtLabel.setText("Start at");
final Composite composite = new Composite(jobsAndOrdersGroup, SWT.NONE);
final GridData gridData = new GridData(GridData.BEGINNING, GridData.FILL, false, false);
composite.setLayoutData(gridData);
final GridLayout gridLayout = new GridLayout();
gridLayout.numColumns = 11;
gridLayout.verticalSpacing = 0;
gridLayout.marginWidth = 0;
gridLayout.marginHeight = 0;
gridLayout.horizontalSpacing = 0;
composite.setLayout(gridLayout);
txtYear = new Text(composite, SWT.BORDER);
txtYear.addModifyListener(new ModifyListener() {
public void modifyText(final ModifyEvent e) {
if(!event)
return;
setTime();
}
});
txtYear.setEnabled(false);
txtYear.addVerifyListener(new VerifyListener() {
public void verifyText(final VerifyEvent e) {
e.doit = Utils.isOnlyDigits(e.text);
}
});
txtYear.setTextLimit(4);
final GridData gridData_7 = new GridData(GridData.FILL, GridData.CENTER, false, false);
gridData_7.widthHint = 40;
txtYear.setLayoutData(gridData_7);
final Label label = new Label(composite, SWT.NONE);
label.setText("-");
txtMonth = new Text(composite, SWT.BORDER);
txtMonth.addFocusListener(new FocusAdapter() {
public void focusLost(final FocusEvent e) {
txtMonth.setText(Utils.fill(2, txtMonth.getText()));
}
});
txtMonth.setEnabled(false);
txtMonth.addModifyListener(new ModifyListener() {
public void modifyText(final ModifyEvent e) {
if(!event)
return;
Utils.setBackground(1, 12, txtMonth);
if(!txtMonth.getBackground().equals(Options.getRequiredColor()))
setTime();
}
});
txtMonth.addVerifyListener(new VerifyListener() {
public void verifyText(final VerifyEvent e) {
e.doit = Utils.isOnlyDigits(e.text);
}
});
txtMonth.setTextLimit(2);
final GridData gridData_9 = new GridData(GridData.FILL, GridData.CENTER, false, false);
gridData_9.widthHint = 20;
txtMonth.setLayoutData(gridData_9);
final Label label_1 = new Label(composite, SWT.NONE);
label_1.setText("-");
txtDay = new Text(composite, SWT.BORDER);
txtDay.addFocusListener(new FocusAdapter() {
public void focusLost(final FocusEvent e) {
txtDay.setText(Utils.fill(2, txtDay.getText()));
}
});
txtDay.setEnabled(false);
txtDay.addModifyListener(new ModifyListener() {
public void modifyText(final ModifyEvent e) {
if(!event)
return;
Utils.setBackground(1, 31, txtDay);
if(!txtDay.getBackground().equals(Options.getRequiredColor()))
setTime();
}
});
txtDay.addVerifyListener(new VerifyListener() {
public void verifyText(final VerifyEvent e) {
e.doit = Utils.isOnlyDigits(e.text);
}
});
txtDay.setTextLimit(2);
final GridData gridData_13 = new GridData(GridData.FILL, GridData.CENTER, false, false);
gridData_13.widthHint = 20;
txtDay.setLayoutData(gridData_13);
final Label label_2 = new Label(composite, SWT.NONE);
label_2.setText(" ");
txtHour = new Text(composite, SWT.BORDER);
txtHour.addFocusListener(new FocusAdapter() {
public void focusLost(final FocusEvent e) {
txtHour.setText(Utils.fill(2, txtHour.getText()));
}
});
txtHour.setEnabled(false);
txtHour.addModifyListener(new ModifyListener() {
public void modifyText(final ModifyEvent e) {
if(!event)
return;
Utils.setBackground(0, 24, txtHour);
if(!txtHour.getBackground().equals(Options.getRequiredColor()))
setTime();
}
});
txtHour.addVerifyListener(new VerifyListener() {
public void verifyText(final VerifyEvent e) {
e.doit = Utils.isOnlyDigits(e.text);
}
});
txtHour.setTextLimit(2);
final GridData gridData_14 = new GridData(GridData.FILL, GridData.CENTER, false, false);
gridData_14.widthHint = 20;
txtHour.setLayoutData(gridData_14);
final Label label_3 = new Label(composite, SWT.NONE);
label_3.setText(":");
txtMin = new Text(composite, SWT.BORDER);
txtMin.addFocusListener(new FocusAdapter() {
public void focusLost(final FocusEvent e) {
txtMin.setText(Utils.fill(2, txtMin.getText()));
}
});
txtMin.setEnabled(false);
txtMin.addModifyListener(new ModifyListener() {
public void modifyText(final ModifyEvent e) {
if(!event)
return;
Utils.setBackground(0, 60, txtMin);
if(!txtMin.getBackground().equals(Options.getRequiredColor()))
setTime();
}
});
txtMin.addVerifyListener(new VerifyListener() {
public void verifyText(final VerifyEvent e) {
e.doit = Utils.isOnlyDigits(e.text);
}
});
txtMin.setTextLimit(2);
final GridData gridData_1 = new GridData(GridData.FILL, GridData.CENTER, false, false);
gridData_1.widthHint = 20;
txtMin.setLayoutData(gridData_1);
final Label label_4 = new Label(composite, SWT.NONE);
label_4.setText(":");
txtSec = new Text(composite, SWT.BORDER);
txtSec.addFocusListener(new FocusAdapter() {
public void focusLost(final FocusEvent e) {
txtSec.setText(Utils.fill(2, txtSec.getText()));
}
});
txtSec.setEnabled(false);
txtSec.addModifyListener(new ModifyListener() {
public void modifyText(final ModifyEvent e) {
if(!event)
return;
Utils.setBackground(0, 60, txtSec);
if(!txtSec.getBackground().equals(Options.getRequiredColor()))
setTime();
}
});
txtSec.addVerifyListener(new VerifyListener() {
public void verifyText(final VerifyEvent e) {
e.doit = Utils.isOnlyDigits(e.text);
}
});
txtSec.setTextLimit(2);
final GridData gridData_6 = new GridData(GridData.FILL, GridData.CENTER, false, false);
gridData_6.widthHint = 20;
txtSec.setLayoutData(gridData_6);
cboTimes = new Combo(jobsAndOrdersGroup, SWT.READ_ONLY);
cboTimes.setVisibleItemCount(7);
cboTimes.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(final SelectionEvent e) {
normalized(cboTimes.getText());
setTime();
initTimes(listener.getAt());
}
});
cboTimes.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
priorityLabel = new Label(jobsAndOrdersGroup, SWT.NONE);
final GridData gridData_11 = new GridData();
priorityLabel.setLayoutData(gridData_11);
priorityLabel.setText("Priority");
tPriority = new Text(jobsAndOrdersGroup, SWT.BORDER);
tPriority.addFocusListener(new FocusAdapter() {
public void focusGained(final FocusEvent e) {
tPriority.selectAll();
}
});
tPriority.setEnabled(false);
tPriority.addModifyListener(new org.eclipse.swt.events.ModifyListener() {
public void modifyText(org.eclipse.swt.events.ModifyEvent e) {
listener.setPriority(tPriority.getText());
}
});
tPriority.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, false, false, 2, 1));
titleLabel = new Label(jobsAndOrdersGroup, SWT.NONE);
titleLabel.setLayoutData(new GridData());
titleLabel.setText("Title");
tTitle = new Text(jobsAndOrdersGroup, SWT.BORDER);
tTitle.addFocusListener(new FocusAdapter() {
public void focusGained(final FocusEvent e) {
tTitle.selectAll();
}
});
tTitle.setEnabled(false);
tTitle.addModifyListener(new org.eclipse.swt.events.ModifyListener() {
public void modifyText(org.eclipse.swt.events.ModifyEvent e) {
listener.setTitle(tTitle.getText());
}
});
final GridData gridData_5 = new GridData(GridData.FILL, GridData.CENTER, false, false, 2, 1);
tTitle.setLayoutData(gridData_5);
stateLabel = new Label(jobsAndOrdersGroup, SWT.NONE);
stateLabel.setLayoutData(new GridData());
stateLabel.setText("State");
tState = new Combo(jobsAndOrdersGroup, SWT.BORDER);
tState.setEnabled(false);
tState.addModifyListener(new org.eclipse.swt.events.ModifyListener() {
public void modifyText(org.eclipse.swt.events.ModifyEvent e) {
if(event)
listener.setState(tState.getText());
}
});
final GridData gridData_2 = new GridData(GridData.FILL, GridData.CENTER, false, false, 2, 1);
tState.setLayoutData(gridData_2);
endStateLabel = new Label(jobsAndOrdersGroup, SWT.NONE);
endStateLabel.setLayoutData(new GridData());
endStateLabel.setText("End State");
cboEndstate = new Combo(jobsAndOrdersGroup, SWT.NONE);
cboEndstate.addModifyListener(new ModifyListener() {
public void modifyText(final ModifyEvent e) {
if(event)
listener.setEndState(cboEndstate.getText());
}