}
}
});
butDetailsJob.setLayoutData(new GridData(GridData.FILL, GridData.BEGINNING, false, false));
butDetailsJob.setText("Parameter");
butDetailsJob.addFocusListener(new FocusAdapter() {
public void focusGained(final FocusEvent e) {
if(checkParameter) {
listener.fillChain(tNodes);
checkParameter = false;
}
}
});
butAddMissingNodes = new Button(gNodes, SWT.NONE);
butAddMissingNodes.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(final SelectionEvent e) {
try {
if(tNodes.getSelectionCount() > 0) {
TableItem item = tNodes.getSelection()[0];
if(!listener.checkForState(item.getText(3))) {
listener.selectNode(null);
listener.applyNode(true, item.getText(3), "", "", "", "", false,"", "");
}
if(!listener.checkForState(item.getText(4))) {
listener.selectNode(null);
listener.applyNode(true, item.getText(4), "", "", "", "", false,"", "");
}
listener.fillChain(tNodes);
bApplyNode.setEnabled(false);
bRemoveNode.setEnabled(false);
listener.selectNode(null);
fillNode(true);
enableNode(false);
//listener.applyNode(bFullNode.getSelection() || bEndNode.getSelection(), tState.getText(), cJob.getText(), tDelay.getText(), cNextState.getText(), cErrorState.getText(),bRemoveFile.getSelection(),tMoveTo.getText(), cOnError.getText());
}
} catch (Exception ex) {
try {
new ErrorLog("error in " + sos.util.SOSClassUtil.getMethodName() , ex);
} catch(Exception ee) {
//tu nichts
}
}
}
});
butAddMissingNodes.setEnabled(false);
butAddMissingNodes.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, false, false));
butAddMissingNodes.setText("Add Missing Nodes");
bRemoveNode = new Button(gNodes, SWT.NONE);
bRemoveNode.setEnabled(false);
bRemoveNode.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(final SelectionEvent e) {
if (tNodes.getSelectionCount() > 0) {
int c = MainWindow.message(getShell(), "Do you want remove the job node from this job chain?", SWT.ICON_QUESTION | SWT.YES | SWT.NO );
if(c != SWT.YES)
return;
int index = tNodes.getSelectionIndex();
listener.deleteNode(tNodes);
tNodes.remove(index);
if (index >= tNodes.getItemCount())
index--;
boolean empty = tNodes.getItemCount() == 0;
fillNode(empty);
enableNode(!empty);
bRemoveNode.setEnabled(!empty);
if (!empty) {
tNodes.select(index);
listener.selectNode(tNodes);
} else {
listener.selectNode(null);
}
}
}
});
bRemoveNode.setLayoutData(new GridData(GridData.FILL, GridData.END, false, false));
bRemoveNode.setText("Remove Node");
gFileOrderSource = new Group(jobChainGroup, SWT.NONE);
final GridData gridData_10 = new GridData(GridData.FILL, GridData.CENTER, true, false);
gridData_10.heightHint = 169;
gFileOrderSource.setLayoutData(gridData_10);
gFileOrderSource.setText("File Order Source");
final GridLayout gridLayout_1 = new GridLayout();
gridLayout_1.marginTop = 5;
gridLayout_1.marginBottom = 5;
gridLayout_1.numColumns = 5;
gFileOrderSource.setLayout(gridLayout_1);
final Label directoryLabel = new Label(gFileOrderSource, SWT.NONE);
directoryLabel.setFont(SWTResourceManager.getFont("", 8, SWT.NONE));
directoryLabel.setText("Directory");
tDirectory = new Text(gFileOrderSource, SWT.BORDER);
tDirectory.addFocusListener(new FocusAdapter() {
public void focusGained(final FocusEvent e) {
tDirectory.selectAll();
}
});
tDirectory.addModifyListener(new ModifyListener() {
public void modifyText(final ModifyEvent e) {
bApplyFileOrderSource.setEnabled(isValidSource());
if (bApplyFileOrderSource.getEnabled())
getShell().setDefaultButton(bApplyFileOrderSource);
}
});
tDirectory.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(final SelectionEvent e) {
}
});
tDirectory.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
final Label delay_after_errorLabel = new Label(gFileOrderSource, SWT.NONE);
delay_after_errorLabel.setText("Delay after error");
tDelayAfterError = new Text(gFileOrderSource, SWT.BORDER);
tDelayAfterError.addFocusListener(new FocusAdapter() {
public void focusGained(final FocusEvent e) {
tDelayAfterError.selectAll();
}
});
tDelayAfterError.addModifyListener(new ModifyListener() {
public void modifyText(final ModifyEvent e) {
bApplyFileOrderSource.setEnabled(isValidSource());
if (bApplyFileOrderSource.getEnabled())
getShell().setDefaultButton(bApplyFileOrderSource);
}
});
tDelayAfterError.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
bApplyFileOrderSource = new Button(gFileOrderSource, SWT.NONE);
bApplyFileOrderSource.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(final SelectionEvent e) {
applyFileOrderSource();
}
});
bApplyFileOrderSource.setEnabled(false);
bApplyFileOrderSource.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, false, false));
bApplyFileOrderSource.setText("Apply File Order Source");
final Label regexLabel = new Label(gFileOrderSource, SWT.NONE);
regexLabel.setFont(SWTResourceManager.getFont("", 8, SWT.NONE));
regexLabel.setText("Regex");
tRegex = new Text(gFileOrderSource, SWT.BORDER);
tRegex.addFocusListener(new FocusAdapter() {
public void focusGained(final FocusEvent e) {
tRegex.selectAll();
}
});
tRegex.addModifyListener(new ModifyListener() {
public void modifyText(final ModifyEvent e) {
bApplyFileOrderSource.setEnabled(isValidSource());
if (bApplyFileOrderSource.getEnabled())
getShell().setDefaultButton(bApplyFileOrderSource);
}
});
tRegex.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
final Label repeatLabel = new Label(gFileOrderSource, SWT.NONE);
repeatLabel.setText("Repeat");
tRepeat = new Text(gFileOrderSource, SWT.BORDER);
tRepeat.addFocusListener(new FocusAdapter() {
public void focusGained(final FocusEvent e) {
tRepeat.selectAll();
}
});
tRepeat.addModifyListener(new ModifyListener() {
public void modifyText(final ModifyEvent e) {
bApplyFileOrderSource.setEnabled(isValidSource());
if (bApplyFileOrderSource.getEnabled())
getShell().setDefaultButton(bApplyFileOrderSource);
}
});
tRepeat.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
new Label(gFileOrderSource, SWT.NONE);
final Label maxLabel = new Label(gFileOrderSource, SWT.NONE);
maxLabel.setText("Max");
tMax = new Text(gFileOrderSource, SWT.BORDER);
tMax.addFocusListener(new FocusAdapter() {
public void focusGained(final FocusEvent e) {
tMax.selectAll();
}
});
tMax.addModifyListener(new ModifyListener() {
public void modifyText(final ModifyEvent e) {
bApplyFileOrderSource.setEnabled(isValidSource());
if (bApplyFileOrderSource.getEnabled())
getShell().setDefaultButton(bApplyFileOrderSource);
}
});
tMax.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
final Label stateLabel = new Label(gFileOrderSource, SWT.NONE);
stateLabel.setText("Next state");
tNextState = new Text(gFileOrderSource, SWT.BORDER);
tNextState.addFocusListener(new FocusAdapter() {
public void focusGained(final FocusEvent e) {
tNextState.selectAll();
}
});
tNextState.addModifyListener(new ModifyListener() {