本文整理汇总了Java中org.pentaho.di.trans.steps.jobexecutor.JobExecutorParameters类的典型用法代码示例。如果您正苦于以下问题:Java JobExecutorParameters类的具体用法?Java JobExecutorParameters怎么用?Java JobExecutorParameters使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
JobExecutorParameters类属于org.pentaho.di.trans.steps.jobexecutor包,在下文中一共展示了JobExecutorParameters类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addParametersTab
import org.pentaho.di.trans.steps.jobexecutor.JobExecutorParameters; //导入依赖的package包/类
private void addParametersTab()
{
CTabItem wParametersTab = new CTabItem(wTabFolder, SWT.NONE);
wParametersTab.setText(BaseMessages.getString(PKG, "JobExecutorDialog.Parameters.Title")); //$NON-NLS-1$
wParametersTab.setToolTipText(BaseMessages.getString(PKG, "JobExecutorDialog.Parameters.Tooltip")); //$NON-NLS-1$
Composite wParametersComposite = new Composite(wTabFolder, SWT.NONE);
props.setLook(wParametersComposite);
FormLayout parameterTabLayout = new FormLayout();
parameterTabLayout.marginWidth = Const.FORM_MARGIN;
parameterTabLayout.marginHeight = Const.FORM_MARGIN;
wParametersComposite.setLayout(parameterTabLayout);
// Add a button: get parameters
//
wGetParameters = new Button(wParametersComposite, SWT.PUSH);
wGetParameters.setText(BaseMessages.getString(PKG, "JobExecutorDialog.Parameters.GetParameters"));
props.setLook(wGetParameters);
FormData fdGetParameters = new FormData();
fdGetParameters.bottom = new FormAttachment(100,0);
fdGetParameters.right = new FormAttachment(100, 0);
wGetParameters.setLayoutData(fdGetParameters);
wGetParameters.setSelection(jobExecutorMeta.getParameters().isInheritingAllVariables());
wGetParameters.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) {
getParametersFromJob();
} });
// Add a checkbox: inherit all variables...
//
wInheritAll = new Button(wParametersComposite, SWT.CHECK);
wInheritAll.setText(BaseMessages.getString(PKG, "JobExecutorDialog.Parameters.InheritAll"));
props.setLook(wInheritAll);
FormData fdInheritAll = new FormData();
fdInheritAll.bottom = new FormAttachment(100,0);
fdInheritAll.left = new FormAttachment(0,0);
fdInheritAll.right = new FormAttachment(wGetParameters, -margin);
wInheritAll.setLayoutData(fdInheritAll);
wInheritAll.setSelection(jobExecutorMeta.getParameters().isInheritingAllVariables());
// Now add a table view with the 3 columns to specify: variable name, input field & optional static input
//
parameterColumns = new ColumnInfo[] {
new ColumnInfo(BaseMessages.getString(PKG, "JobExecutorDialog.Parameters.column.Variable"), ColumnInfo.COLUMN_TYPE_TEXT, false, false),
new ColumnInfo(BaseMessages.getString(PKG, "JobExecutorDialog.Parameters.column.Field"), ColumnInfo.COLUMN_TYPE_CCOMBO, new String[] {}, false),
new ColumnInfo(BaseMessages.getString(PKG, "JobExecutorDialog.Parameters.column.Input"), ColumnInfo.COLUMN_TYPE_TEXT, false, false),
};
parameterColumns[1].setUsingVariables(true);
JobExecutorParameters parameters = jobExecutorMeta.getParameters();
wJobExecutorParameters = new TableView(transMeta, wParametersComposite,
SWT.FULL_SELECTION | SWT.SINGLE | SWT.BORDER, parameterColumns, parameters.getVariable().length,
lsMod, props);
props.setLook(wJobExecutorParameters);
FormData fdJobExecutors = new FormData();
fdJobExecutors.left = new FormAttachment(0, 0);
fdJobExecutors.right = new FormAttachment(100, 0);
fdJobExecutors.top = new FormAttachment(0, 0);
fdJobExecutors.bottom = new FormAttachment(wInheritAll, -margin*2);
wJobExecutorParameters.setLayoutData(fdJobExecutors);
for (int i = 0; i < parameters.getVariable().length; i++) {
TableItem tableItem = wJobExecutorParameters.table.getItem(i);
tableItem.setText(1, Const.NVL(parameters.getVariable()[i], ""));
tableItem.setText(2, Const.NVL(parameters.getField()[i], ""));
tableItem.setText(3, Const.NVL(parameters.getInput()[i], ""));
}
wJobExecutorParameters.setRowNums();
wJobExecutorParameters.optWidth(true);
FormData fdParametersComposite = new FormData();
fdParametersComposite.left = new FormAttachment(0, 0);
fdParametersComposite.top = new FormAttachment(0, 0);
fdParametersComposite.right = new FormAttachment(100, 0);
fdParametersComposite.bottom = new FormAttachment(100, 0);
wParametersComposite.setLayoutData(fdParametersComposite);
wParametersComposite.layout();
wParametersTab.setControl(wParametersComposite);
}