本文整理汇总了Java中org.pentaho.di.trans.steps.mapping.MappingParameters.getVariable方法的典型用法代码示例。如果您正苦于以下问题:Java MappingParameters.getVariable方法的具体用法?Java MappingParameters.getVariable怎么用?Java MappingParameters.getVariable使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.pentaho.di.trans.steps.mapping.MappingParameters
的用法示例。
在下文中一共展示了MappingParameters.getVariable方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addParametersTab
import org.pentaho.di.trans.steps.mapping.MappingParameters; //导入方法依赖的package包/类
private void addParametersTab(final MappingParameters parameters)
{
CTabItem wParametersTab = new CTabItem(wTabFolder, SWT.NONE);
wParametersTab.setText(Messages.getString("MappingDialog.Parameters.Title")); //$NON-NLS-1$
wParametersTab.setToolTipText(Messages.getString("MappingDialog.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 checkbox: inherit all variables...
//
Button wInheritAll = new Button(wParametersComposite, SWT.CHECK);
wInheritAll.setText(Messages.getString("MappingDialog.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(100,-30);
wInheritAll.setLayoutData(fdInheritAll);
wInheritAll.setSelection(parameters.isInheritingAllVariables());
// Now add a tableview with the 2 columns to specify: input and output
// fields for the source and target steps.
//
ColumnInfo[] colinfo = new ColumnInfo[] {
new ColumnInfo(
Messages.getString("MappingDialog.Parameters.column.Variable"), ColumnInfo.COLUMN_TYPE_TEXT, false, false), //$NON-NLS-1$
new ColumnInfo(
Messages.getString("MappingDialog.Parameters.column.ValueOrField"), ColumnInfo.COLUMN_TYPE_TEXT, false, false), //$NON-NLS-1$
};
colinfo[1].setUsingVariables(true);
final TableView wMappingParameters = new TableView(transMeta, wParametersComposite,
SWT.FULL_SELECTION | SWT.SINGLE | SWT.BORDER, colinfo, parameters.getVariable().length,
lsMod, props);
props.setLook(wMappingParameters);
FormData fdMappings = new FormData();
fdMappings.left = new FormAttachment(0, 0);
fdMappings.right = new FormAttachment(100, 0);
fdMappings.top = new FormAttachment(0, 0);
fdMappings.bottom = new FormAttachment(wInheritAll, -margin*2);
wMappingParameters.setLayoutData(fdMappings);
for (int i = 0; i < parameters.getVariable().length; i++)
{
TableItem tableItem = wMappingParameters.table.getItem(i);
tableItem.setText(1, parameters.getVariable()[i]);
tableItem.setText(2, parameters.getInputField()[i]);
}
wMappingParameters.setRowNums();
wMappingParameters.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);
changeList.add(new MappingParametersTab(wMappingParameters, wInheritAll, parameters));
}
示例2: addParametersTab
import org.pentaho.di.trans.steps.mapping.MappingParameters; //导入方法依赖的package包/类
private void addParametersTab(final MappingParameters parameters)
{
CTabItem wParametersTab = new CTabItem(wTabFolder, SWT.NONE);
wParametersTab.setText(BaseMessages.getString(PKG, "MappingDialog.Parameters.Title")); //$NON-NLS-1$
wParametersTab.setToolTipText(BaseMessages.getString(PKG, "MappingDialog.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 checkbox: inherit all variables...
//
Button wInheritAll = new Button(wParametersComposite, SWT.CHECK);
wInheritAll.setText(BaseMessages.getString(PKG, "MappingDialog.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(100,-30);
wInheritAll.setLayoutData(fdInheritAll);
wInheritAll.setSelection(parameters.isInheritingAllVariables());
// Now add a tableview with the 2 columns to specify: input and output
// fields for the source and target steps.
//
ColumnInfo[] colinfo = new ColumnInfo[] {
new ColumnInfo(
BaseMessages.getString(PKG, "MappingDialog.Parameters.column.Variable"), ColumnInfo.COLUMN_TYPE_TEXT, false, false), //$NON-NLS-1$
new ColumnInfo(
BaseMessages.getString(PKG, "MappingDialog.Parameters.column.ValueOrField"), ColumnInfo.COLUMN_TYPE_TEXT, false, false), //$NON-NLS-1$
};
colinfo[1].setUsingVariables(true);
final TableView wMappingParameters = new TableView(transMeta, wParametersComposite,
SWT.FULL_SELECTION | SWT.SINGLE | SWT.BORDER, colinfo, parameters.getVariable().length,
lsMod, props);
props.setLook(wMappingParameters);
FormData fdMappings = new FormData();
fdMappings.left = new FormAttachment(0, 0);
fdMappings.right = new FormAttachment(100, 0);
fdMappings.top = new FormAttachment(0, 0);
fdMappings.bottom = new FormAttachment(wInheritAll, -margin*2);
wMappingParameters.setLayoutData(fdMappings);
for (int i = 0; i < parameters.getVariable().length; i++)
{
TableItem tableItem = wMappingParameters.table.getItem(i);
tableItem.setText(1, parameters.getVariable()[i]);
tableItem.setText(2, parameters.getInputField()[i]);
}
wMappingParameters.setRowNums();
wMappingParameters.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);
changeList.add(new MappingParametersTab(wMappingParameters, wInheritAll, parameters));
}
示例3: addParametersTab
import org.pentaho.di.trans.steps.mapping.MappingParameters; //导入方法依赖的package包/类
private void addParametersTab( final MappingParameters parameters ) {
CTabItem wParametersTab = new CTabItem( wTabFolder, SWT.NONE );
wParametersTab.setText( BaseMessages.getString( PKG, "MappingDialog.Parameters.Title" ) );
wParametersTab.setToolTipText( BaseMessages.getString( PKG, "MappingDialog.Parameters.Tooltip" ) );
Composite wParametersComposite = new Composite( wTabFolder, SWT.NONE );
props.setLook( wParametersComposite );
FormLayout parameterTabLayout = new FormLayout();
parameterTabLayout.marginWidth = 15;
parameterTabLayout.marginHeight = 15;
wParametersComposite.setLayout( parameterTabLayout );
// Add a checkbox: inherit all variables...
//
Button wInheritAll = new Button( wParametersComposite, SWT.CHECK );
wInheritAll.setText( BaseMessages.getString( PKG, "MappingDialog.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( 100, -30 );
wInheritAll.setLayoutData( fdInheritAll );
wInheritAll.setSelection( parameters.isInheritingAllVariables() );
// Now add a tableview with the 2 columns to specify: input and output
// fields for the source and target steps.
//
ColumnInfo[] colinfo =
new ColumnInfo[] {
new ColumnInfo(
BaseMessages.getString( PKG, "MappingDialog.Parameters.column.Variable" ),
ColumnInfo.COLUMN_TYPE_TEXT, false, false ),
new ColumnInfo(
BaseMessages.getString( PKG, "MappingDialog.Parameters.column.ValueOrField" ),
ColumnInfo.COLUMN_TYPE_TEXT, false, false ), };
colinfo[ 1 ].setUsingVariables( true );
final TableView wMappingParameters =
new TableView(
transMeta, wParametersComposite, SWT.FULL_SELECTION | SWT.SINGLE | SWT.BORDER, colinfo, parameters
.getVariable().length, lsMod, props
);
props.setLook( wMappingParameters );
FormData fdMappings = new FormData();
fdMappings.left = new FormAttachment( 0, 0 );
fdMappings.right = new FormAttachment( 100, 0 );
fdMappings.top = new FormAttachment( 0, 0 );
fdMappings.bottom = new FormAttachment( wInheritAll, -10 );
wMappingParameters.setLayoutData( fdMappings );
wMappingParameters.getTable().addListener( SWT.Resize, new ColumnsResizer( 0, 50, 50 ) );
for ( int i = 0; i < parameters.getVariable().length; i++ ) {
TableItem tableItem = wMappingParameters.table.getItem( i );
tableItem.setText( 1, Const.NVL( parameters.getVariable()[ i ], "" ) );
tableItem.setText( 2, Const.NVL( parameters.getInputField()[ i ], "" ) );
}
wMappingParameters.setRowNums();
wMappingParameters.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 );
parameterChanges = new MappingParametersTab( wMappingParameters, wInheritAll, parameters );
}
示例4: addParametersTab
import org.pentaho.di.trans.steps.mapping.MappingParameters; //导入方法依赖的package包/类
private void addParametersTab( final MappingParameters parameters ) {
CTabItem wParametersTab = new CTabItem( wTabFolder, SWT.NONE );
wParametersTab.setText( BaseMessages.getString( PKG, "SimpleMappingDialog.Parameters.Title" ) );
wParametersTab.setToolTipText( BaseMessages.getString( PKG, "SimpleMappingDialog.Parameters.Tooltip" ) );
Composite wParametersComposite = new Composite( wTabFolder, SWT.NONE );
props.setLook( wParametersComposite );
FormLayout parameterTabLayout = new FormLayout();
parameterTabLayout.marginWidth = 15;
parameterTabLayout.marginHeight = 15;
wParametersComposite.setLayout( parameterTabLayout );
// Add a checkbox: inherit all variables...
//
Button wInheritAll = new Button( wParametersComposite, SWT.CHECK );
wInheritAll.setText( BaseMessages.getString( PKG, "SimpleMappingDialog.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( 100, -30 );
wInheritAll.setLayoutData( fdInheritAll );
wInheritAll.setSelection( parameters.isInheritingAllVariables() );
// Now add a tableview with the 2 columns to specify: input and output
// fields for the source and target steps.
//
ColumnInfo[] colinfo =
new ColumnInfo[] {
new ColumnInfo(
BaseMessages.getString( PKG, "SimpleMappingDialog.Parameters.column.Variable" ),
ColumnInfo.COLUMN_TYPE_TEXT, false, false ),
new ColumnInfo(
BaseMessages.getString( PKG, "SimpleMappingDialog.Parameters.column.ValueOrField" ),
ColumnInfo.COLUMN_TYPE_TEXT, false, false ), };
colinfo[ 1 ].setUsingVariables( true );
final TableView wMappingParameters =
new TableView(
transMeta, wParametersComposite, SWT.FULL_SELECTION | SWT.SINGLE | SWT.BORDER, colinfo, parameters
.getVariable().length, false, lsMod, props, false
);
props.setLook( wMappingParameters );
FormData fdMappings = new FormData();
fdMappings.left = new FormAttachment( 0, 0 );
fdMappings.right = new FormAttachment( 100, 0 );
fdMappings.top = new FormAttachment( 0, 0 );
fdMappings.bottom = new FormAttachment( wInheritAll, -10 );
wMappingParameters.setLayoutData( fdMappings );
wMappingParameters.getTable().addListener( SWT.Resize, new ColumnsResizer( 0, 50, 50 ) );
for ( int i = 0; i < parameters.getVariable().length; i++ ) {
TableItem tableItem = wMappingParameters.table.getItem( i );
tableItem.setText( 1, parameters.getVariable()[ i ] );
tableItem.setText( 2, parameters.getInputField()[ i ] );
}
wMappingParameters.setRowNums();
wMappingParameters.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 );
changeList.add( new MappingParametersTab( wMappingParameters, wInheritAll, parameters ) );
}