gridLayout.marginHeight = 0;
gridLayout.horizontalSpacing = 0;
composite.setLayout(gridLayout);
cJobchain = new Combo(composite, SWT.NONE);
cJobchain.setMenu(new sos.scheduler.editor.app.ContextMenu(cJobchain, dom, Editor.JOB_CHAIN).getMenu());
cJobchain.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
cJobchain.addModifyListener(new org.eclipse.swt.events.ModifyListener() {
public void modifyText(org.eclipse.swt.events.ModifyEvent e) {
if (event)
if(checkName()) {
listener.setCommandAttribute("job_chain", cJobchain.getText());
String curstate = listener.getCommandAttribute("state");
tState.setItems(listener.getStates());
tState.setText(curstate);
cboStates.setItems(listener.getStates());
cboStates.add("global");
cboStates.setText("global");
String curEndstate = listener.getCommandAttribute("end_state");
cboEndState.setItems(listener.getStates());
cboEndState.setText(curEndstate);
butDetails.setEnabled(cJobchain.getText().length() > 0);
cboStates.setEnabled(cJobchain.getText().length() > 0);
existDetailsConfigurationsFile();
}
}
});
/*Button butBrowse = new Button(gOrder, SWT.NONE);
butBrowse.setLayoutData(new GridData(GridData.END, GridData.CENTER, false, false));
butBrowse.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(final SelectionEvent e) {
String jobname = IOUtils.openDirectoryFile(MergeAllXMLinDirectory.MASK_JOB_CHAIN);
if(jobname != null && jobname.length() > 0) {
cJobchain.setText(jobname);
}
}
});
butBrowse.setText("Browse");
*/
final Label titleLabel = new Label(gOrder, SWT.NONE);
final GridData gridData_6 = new GridData(GridData.BEGINNING, GridData.CENTER, false, false, 2, 1);
gridData_6.widthHint = 47;
titleLabel.setLayoutData(gridData_6);
titleLabel.setText("Title");
tTitle = new Text(gOrder, SWT.BORDER);
tTitle.addFocusListener(new FocusAdapter() {
public void focusGained(final FocusEvent e) {
tTitle.selectAll();
}
});
tTitle.addModifyListener(new org.eclipse.swt.events.ModifyListener() {
public void modifyText(org.eclipse.swt.events.ModifyEvent e) {
if (event)
listener.setCommandAttribute("title", tTitle.getText());
}
});
tTitle.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false, 5, 1));
final Label priorityLabel = new Label(gOrder, SWT.NONE);
priorityLabel.setLayoutData(new GridData(GridData.BEGINNING, GridData.CENTER, false, false, 2, 1));
priorityLabel.setText("Priority");
tPriority = new Text(gOrder, SWT.BORDER);
tPriority.addFocusListener(new FocusAdapter() {
public void focusGained(final FocusEvent e) {
tPriority.selectAll();
}
});
tPriority.addVerifyListener(new VerifyListener() {
public void verifyText(final VerifyEvent e) {
e.doit = Utils.isOnlyDigits(e.text);
}
});
tPriority.addModifyListener(new org.eclipse.swt.events.ModifyListener() {
public void modifyText(org.eclipse.swt.events.ModifyEvent e) {
if (event)
listener.setCommandAttribute("priority", tPriority.getText());
}
});
tPriority.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false, 5, 1));
final Label stateLabel = new Label(gOrder, SWT.NONE);
stateLabel.setLayoutData(new GridData(GridData.BEGINNING, GridData.CENTER, false, false, 2, 1));
stateLabel.setText("State");
tState = new Combo(gOrder, SWT.BORDER);
tState.addModifyListener(new org.eclipse.swt.events.ModifyListener() {
public void modifyText(org.eclipse.swt.events.ModifyEvent e) {
if (event)
listener.setCommandAttribute("state", tState.getText());
}
});
tState.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false, 5, 1));
final Label endStateLabel = new Label(gOrder, SWT.NONE);
endStateLabel.setLayoutData(new GridData(GridData.BEGINNING, GridData.CENTER, false, false, 2, 1));
endStateLabel.setText("End State");
cboEndState = new Combo(gOrder, SWT.NONE);
cboEndState.addModifyListener(new ModifyListener() {
public void modifyText(final ModifyEvent e) {
if (event)
listener.setCommandAttribute("end_state", cboEndState.getText());
}
});
cboEndState.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false, 5, 1));
new Label(gOrder, SWT.NONE);
new Label(gOrder, SWT.NONE);
final Label stateLabel_1 = new Label(gOrder, SWT.NONE);
stateLabel_1.setText("State:");
cboStates = new Combo(gOrder, SWT.NONE);
cboStates.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
butRemove = new Button(gOrder, SWT.NONE);
butRemove.addFocusListener(new FocusAdapter() {
public void focusGained(final FocusEvent e) {