当前位置: 首页>>代码示例>>Java>>正文


Java MappingParameters.getVariable方法代码示例

本文整理汇总了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));
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:71,代码来源:MappingDialog.java

示例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));
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:71,代码来源:MappingDialog.java

示例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 );
  }
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:74,代码来源:MappingDialog.java

示例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 ) );
  }
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:74,代码来源:SimpleMappingDialog.java


注:本文中的org.pentaho.di.trans.steps.mapping.MappingParameters.getVariable方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。