}
*/
}
}
});
tName.addFocusListener(new FocusAdapter() {
public void focusGained(final FocusEvent e) {
//tName.selectAll();
}
});
final GridData gridData_4 = new GridData(GridData.FILL, GridData.BEGINNING, true, false, 1, 1);
gridData_4.widthHint = 273;
tName.setLayoutData(gridData_4);
tName.setText(listener.getChainName());
tName.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_WHITE));
tName.addModifyListener(new org.eclipse.swt.events.ModifyListener() {
public void modifyText(org.eclipse.swt.events.ModifyEvent e) {
if(init) return;
boolean existname = Utils.existName(tName.getText(), listener.getChain(), "job_chain");
if (existname)
tName.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_YELLOW));
else {
//getShell().setDefaultButton(bApplyChain);
tName.setBackground(null);
}
if(update != null)
update.updateTreeItem("Job Chain: " + tName.getText());
listener.setChainName(tName.getText());
jobChainGroup.setText("Job Chain:" + (listener.getChainName() != null ? listener.getChainName() : ""));
changeJobChainName = true;
}
});
butDetails = new Button(jobChainGroup, SWT.NONE);
butDetails.setEnabled(true);
butDetails.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(final SelectionEvent e) {
if(listener.get_dom().isChanged() && changeJobChainName){
if(listener.get_dom().getFilename() == null)
MainWindow.message("Please save your Jobchain before selecting the Jobchain Node Parameters.", SWT.ICON_WARNING);
else
MainWindow.message("The Jobchain Name has been changed.\nPlease save your changes before selecting the Jobchain Node Parameters.", SWT.ICON_WARNING);
return;
} else {
changeJobChainName = false;
}
showDetails(null);
}
});
butDetails.setText("Parameter");
final Label titleLabel = new Label(jobChainGroup, SWT.NONE);
titleLabel.setText("Title");
txtTitle = new Text(jobChainGroup, SWT.BORDER);
txtTitle.addFocusListener(new FocusAdapter() {
public void focusGained(final FocusEvent e) {
txtTitle.selectAll();
}
});
txtTitle.addModifyListener(new ModifyListener() {