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


Java ColumnInfo类代码示例

本文整理汇总了Java中org.pentaho.di.ui.core.widget.ColumnInfo的典型用法代码示例。如果您正苦于以下问题:Java ColumnInfo类的具体用法?Java ColumnInfo怎么用?Java ColumnInfo使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ColumnInfo类属于org.pentaho.di.ui.core.widget包,在下文中一共展示了ColumnInfo类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: addTableView

import org.pentaho.di.ui.core.widget.ColumnInfo; //导入依赖的package包/类
private void addTableView() {
  int margin = Const.MARGIN;
  ColumnInfo[] colinf = new ColumnInfo[rowMeta.size()];
  for ( int i = 0; i < rowMeta.size(); i++ ) {
    ValueMetaInterface v = rowMeta.getValueMeta( i );
    colinf[i] = new ColumnInfo( v.getName(), ColumnInfo.COLUMN_TYPE_TEXT, v.isNumeric() );
    colinf[i].setToolTip( v.toStringMeta() );
    colinf[i].setValueMeta( v );
  }

  wSeriesTable =
      new TableView( variables, shell, SWT.BORDER | SWT.FULL_SELECTION | SWT.MULTI, colinf, 0, null, props );
  wSeriesTable.setShowingBlueNullValues( true ); //// TODO: 25/05/16 wat?

  fdSeriesTable = new FormData();
  fdSeriesTable.left = new FormAttachment( 0, 0 );
  fdSeriesTable.top = new FormAttachment( 0, margin );
  fdSeriesTable.right = new FormAttachment( 100, 0 );
  fdSeriesTable.bottom = new FormAttachment( 100, -50 );
  wSeriesTable.setLayoutData( fdSeriesTable );

  fillTableView();
}
 
开发者ID:andtorg,项目名称:sdmx-kettle,代码行数:24,代码来源:PreviewTimeSeriesDialog.java

示例2: updateSchema

import org.pentaho.di.ui.core.widget.ColumnInfo; //导入依赖的package包/类
private void updateSchema()
{

  try {
    avroSchema = null;
    avroSchema = new Schema.Parser().parse( new File( transMeta.environmentSubstitute( wSchema.getText() ) ) );

    validSchema = true;

    wFields.setColumnInfo( 1, new ColumnInfo(
      BaseMessages.getString( PKG, "AvroOutputDialog.AvroColumn.Column" ),
      ColumnInfo.COLUMN_TYPE_CCOMBO, getSchemaFields(), false ) );
  } catch (Exception ex) {
    validSchema = false;
    avroSchema = null;
  }

}
 
开发者ID:cdeptula,项目名称:AvroOutputPlugin,代码行数:19,代码来源:AvroOutputDialog.java

示例3: getColumnInfo

import org.pentaho.di.ui.core.widget.ColumnInfo; //导入依赖的package包/类
private ColumnInfo[] getColumnInfo() 
{
	ColumnInfo[] return_value = new ColumnInfo[] 
	{
		new ColumnInfo(BaseMessages.getString(PKG, "ParseJsonStringDialog.ColumnInfo.FieldName"), ColumnInfo.COLUMN_TYPE_TEXT, false),
		new ColumnInfo(BaseMessages.getString(PKG, "ParseJsonStringDialog.ColumnInfo.XPath"), ColumnInfo.COLUMN_TYPE_TEXT, false), 
		new ColumnInfo(BaseMessages.getString(PKG, "ParseJsonStringDialog.ColumnInfo.FieldType"), ColumnInfo.COLUMN_TYPE_CCOMBO, ValueMeta.getTypes()),
		new ColumnInfo(BaseMessages.getString(PKG, "ParseJsonStringDialog.ColumnInfo.FieldFormat"), ColumnInfo.COLUMN_TYPE_TEXT, false),
		new ColumnInfo(BaseMessages.getString(PKG, "ParseJsonStringDialog.ColumnInfo.FieldLength"), ColumnInfo.COLUMN_TYPE_TEXT, false),
		new ColumnInfo(BaseMessages.getString(PKG, "ParseJsonStringDialog.ColumnInfo.FieldPrecision"), ColumnInfo.COLUMN_TYPE_TEXT, false),
		new ColumnInfo(BaseMessages.getString(PKG, "ParseJsonStringDialog.ColumnInfo.FieldCurrency"), ColumnInfo.COLUMN_TYPE_TEXT, false),
		new ColumnInfo(BaseMessages.getString(PKG, "ParseJsonStringDialog.ColumnInfo.FieldDecimal"), ColumnInfo.COLUMN_TYPE_TEXT, false),
		new ColumnInfo(BaseMessages.getString(PKG, "ParseJsonStringDialog.ColumnInfo.FieldGroup"), ColumnInfo.COLUMN_TYPE_TEXT, false),
		new ColumnInfo(BaseMessages.getString(PKG, "ParseJsonStringDialog.ColumnInfo.FieldTrimType"),ColumnInfo.COLUMN_TYPE_CCOMBO, ValueMeta.getTrimTypeDescriptions(), true),
		new ColumnInfo(BaseMessages.getString(PKG, "ParseJsonStringDialog.ColumnInfo.FieldRepeat"),ColumnInfo.COLUMN_TYPE_CCOMBO, new String[] { "Y", "N" })
	} ;
	return return_value ;
}
 
开发者ID:instaclick,项目名称:pdi-plugin-parsejsonstring,代码行数:19,代码来源:ParseJsonStringDialog.java

示例4: buildContent

import org.pentaho.di.ui.core.widget.ColumnInfo; //导入依赖的package包/类
@Override
protected void buildContent( Composite parent ) {
  ColumnInfo fieldColumn = new ColumnInfo(
      BaseMessages.getString(PKG, "GetSessionVariableDialog.Column.FieldName" ),
      ColumnInfo.COLUMN_TYPE_TEXT, false );
  ColumnInfo variableColumn = new ColumnInfo(
      BaseMessages.getString(PKG, "GetSessionVariableDialog.Column.VariableName" ),
      ColumnInfo.COLUMN_TYPE_TEXT, false );
  variableColumn.setUsingVariables( true );
  ColumnInfo defaultValueColumn = new ColumnInfo(
      BaseMessages.getString(PKG, "GetSessionVariableDialog.Column.DefaultValue" ),
      ColumnInfo.COLUMN_TYPE_TEXT, false );
  defaultValueColumn.setUsingVariables( true );
  defaultValueColumn.setToolTip( BaseMessages.getString( PKG, "GetSessionVariableDialog.Column.DefaultValue.Tooltip" ) );
  wFields = new TableViewBuilder( props, parent, variables )
      .addColumnInfo(fieldColumn )
      .addColumnInfo(variableColumn )
      .addColumnInfo(defaultValueColumn )
      .setTopPlacement( 0 )
      .setBottomPlacement( 100 )
      .setLeftPlacement( LEFT_PLACEMENT )
      .setRightPlacement( RIGHT_PLACEMENT )
      .build();
  wFields.addModifyListener( changeListener );
}
 
开发者ID:pentaho,项目名称:pdi-platform-utils-plugin,代码行数:26,代码来源:GetSessionVariableDialog.java

示例5: testCreateWidget

import org.pentaho.di.ui.core.widget.ColumnInfo; //导入依赖的package包/类
@Test
public void testCreateWidget() throws Exception {
  TableView tableViewMock = mock( TableView.class );
  doReturn( tableViewMock ).when( tableViewBuilderSDpy ).createTableView( any( VariableSpace.class ),
      any( Composite.class ), anyInt(), any( ColumnInfo[].class ), anyInt(), any( ModifyListener.class ),
      any( PropsUI.class ) );
  Table tableMock = mock( Table.class );
  doReturn( tableMock ).when( tableViewMock ).getTable();

  TableColumn[] tableColumnMock = new TableColumn[ 0 ]; ;
  doReturn( tableColumnMock ).when( tableMock ).getColumns();

  tableViewBuilderSDpy.addColumnInfo( new ColumnInfo( "col", 0 ) );
  tableViewBuilderSDpy.setRowsCount( 0 );
  tableViewBuilderSDpy.setModifyListener( modifyListener );
  TableView tableView = tableViewBuilderSDpy.createWidget( parent );
  assertNotNull( tableView );
}
 
开发者ID:pentaho,项目名称:pdi-platform-utils-plugin,代码行数:19,代码来源:TableViewBuilderTest.java

示例6: setComboBoxes

import org.pentaho.di.ui.core.widget.ColumnInfo; //导入依赖的package包/类
protected void setComboBoxes()
  {
      // Something was changed in the row.
      //
      final Map<String, Integer> fields = new HashMap<String, Integer>();
      
      // Add the currentMeta fields...
      fields.putAll(inputFields);
      
      
      Set<String> keySet = fields.keySet();
      List<String> entries = new ArrayList<String>(keySet);

      String fieldNames[] = (String[]) entries.toArray(new String[entries.size()]);

      Const.sortStrings(fieldNames);
      
      bPreviousFieldsLoaded = true;
      for (int i = 0; i < fieldColumns.size(); i++) 
      {
	ColumnInfo colInfo = (ColumnInfo) fieldColumns.get(i);
	colInfo.setComboValues(fieldNames);
}
  }
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:25,代码来源:SelectValuesDialog.java

示例7: setComboValues

import org.pentaho.di.ui.core.widget.ColumnInfo; //导入依赖的package包/类
private void setComboValues() {
	Runnable fieldLoader = new Runnable() {
		public void run() {
			try {
				prevFields = transMeta.getPrevStepFields(stepname);

			} catch (KettleException e) {
				String msg = Messages.getString("IfNullDialog.DoMapping.UnableToFindInput");
				log.logError(toString(), msg);
			}
			String[] prevStepFieldNames = prevFields.getFieldNames();
			if(prevStepFieldNames!=null){
				Arrays.sort(prevStepFieldNames);

				for (int i = 0; i < fieldColumns.size(); i++) {
					ColumnInfo colInfo = (ColumnInfo) fieldColumns.get(i);
					if(colInfo!=null) colInfo.setComboValues(prevStepFieldNames);
				}
			}
		}
	};
	new Thread(fieldLoader).start();
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:24,代码来源:IfNullDialog.java

示例8: setComboValues

import org.pentaho.di.ui.core.widget.ColumnInfo; //导入依赖的package包/类
private void setComboValues() {
	Runnable fieldLoader = new Runnable() {
		public void run() {
			try {
				prevFields = transMeta.getPrevStepFields(stepname);

			} catch (KettleException e) {
				String msg = BaseMessages.getString(PKG, "IfNullDialog.DoMapping.UnableToFindInput");
				logError(msg);
			}
			String[] prevStepFieldNames = prevFields.getFieldNames();
			if(prevStepFieldNames!=null){
				Arrays.sort(prevStepFieldNames);

				for (int i = 0; i < fieldColumns.size(); i++) {
					ColumnInfo colInfo = (ColumnInfo) fieldColumns.get(i);
					if(colInfo!=null) colInfo.setComboValues(prevStepFieldNames);
				}
			}
		}
	};
	new Thread(fieldLoader).start();
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:24,代码来源:IfNullDialog.java

示例9: setComboValues

import org.pentaho.di.ui.core.widget.ColumnInfo; //导入依赖的package包/类
private void setComboValues() {
	Runnable fieldLoader = new Runnable() {
		public void run() {
			try {
				prevFields = transMeta.getPrevStepFields(stepname);
			} catch (KettleException e) {
				prevFields = new RowMeta();
				String msg = BaseMessages.getString(PKG, "SapInputDialog.DoMapping.UnableToFindInput");
				logError(msg);
			}
			String[] prevStepFieldNames = prevFields.getFieldNames();
			Arrays.sort(prevStepFieldNames);
			for (int i = 0; i < inputFieldColumns.size(); i++) {
				ColumnInfo colInfo = (ColumnInfo) outputFieldColumns.get(i);
				colInfo.setComboValues(prevStepFieldNames);
			}
		}
	};
	new Thread(fieldLoader).start();
}
 
开发者ID:bsspirit,项目名称:kettle-4.4.0-stable,代码行数:21,代码来源:SapInputDialog.java

示例10: setComboValues

import org.pentaho.di.ui.core.widget.ColumnInfo; //导入依赖的package包/类
private void setComboValues() {
  Runnable fieldLoader = new Runnable() {
    public void run() {
      try {
        prevFields = transMeta.getPrevStepFields( stepname );
      } catch ( KettleException e ) {
        prevFields = new RowMeta();
        String msg = BaseMessages.getString( PKG, "SapInputDialog.DoMapping.UnableToFindInput" );
        logError( msg );
      }
      String[] prevStepFieldNames = prevFields.getFieldNames();
      Arrays.sort( prevStepFieldNames );
      for ( int i = 0; i < inputFieldColumns.size(); i++ ) {
        ColumnInfo colInfo = outputFieldColumns.get( i );
        colInfo.setComboValues( prevStepFieldNames );
      }
    }
  };
  new Thread( fieldLoader ).start();
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:21,代码来源:SapInputDialog.java

示例11: setComboValues

import org.pentaho.di.ui.core.widget.ColumnInfo; //导入依赖的package包/类
private void setComboValues() {
    Runnable fieldLoader = new Runnable() {
        public void run() {
            try {
                prevFields = transMeta.getPrevStepFields(stepname);
            } catch (KettleException e) {
                prevFields = new RowMeta();
                String msg = BaseMessages.getString(PKG, "SelectValuesDialog.DoMapping.UnableToFindInput");
                logError(msg);
            }
            String[] prevStepFieldNames = prevFields.getFieldNames();
            Arrays.sort(prevStepFieldNames);
            // bPreviousFieldsLoaded = true;
            for (int i = 0; i < fieldColumns.size(); i++) {
                ColumnInfo colInfo = (ColumnInfo) fieldColumns.get(i);
                colInfo.setComboValues(prevStepFieldNames);
            }
        }
    };
    shell.getDisplay().asyncExec(fieldLoader);
}
 
开发者ID:bsspirit,项目名称:kettle-4.4.0-stable,代码行数:22,代码来源:WebServiceDialog.java

示例12: setComboValues

import org.pentaho.di.ui.core.widget.ColumnInfo; //导入依赖的package包/类
private void setComboValues() {
	Runnable fieldLoader = new Runnable() {
		public void run() {
			try {
				prevFields = transMeta.getPrevStepFields(stepname);
			} catch (KettleException e) {
				prevFields = new RowMeta();
				String msg = BaseMessages.getString(PKG, "SelectValuesDialog.DoMapping.UnableToFindInput");
				logError(msg);
			}
			String[] prevStepFieldNames = prevFields.getFieldNames();
			Arrays.sort(prevStepFieldNames);
			bPreviousFieldsLoaded = true;
			for (int i = 0; i < fieldColumns.size(); i++) {
				ColumnInfo colInfo = (ColumnInfo) fieldColumns.get(i);
				colInfo.setComboValues(prevStepFieldNames);
			}
		}
	};
	shell.getDisplay().asyncExec(fieldLoader);
}
 
开发者ID:bsspirit,项目名称:kettle-4.4.0-stable,代码行数:22,代码来源:SelectValuesDialog.java

示例13: fillPreviousFieldTableViewColumn

import org.pentaho.di.ui.core.widget.ColumnInfo; //导入依赖的package包/类
private void fillPreviousFieldTableViewColumn() throws KettleException {
  RowMetaInterface r = transMeta.getPrevStepFields( stepname );
  if ( r != null ) {
    String[] fieldNames = r.getFieldNames();
    colinf[2] = new ColumnInfo( getLocalizedColumn( 2 ), ColumnInfo.COLUMN_TYPE_CCOMBO, fieldNames, true );

    /* Get all number fields to include in the consolidation factor column */
    String[] fieldTypes = r.getFieldNamesAndTypes( 0 );
    ArrayList<String> intFields = new ArrayList<String>();
    intFields.add( BaseMessages.getString( PKG, "PaloDimOutputDialog.ConsolidationFactorDefault" ) );
    for ( int i = 0; i < fieldNames.length; i++ ) {
      if ( fieldTypes[i].toLowerCase().indexOf( "integer" ) >= 0
        || fieldTypes[i].toLowerCase().indexOf( "number" ) > 0 ) {
        intFields.add( fieldNames[i] );
      }
    }

    String[] fieldNamesDefault = intFields.toArray( new String[intFields.size()] );
    colinf[3] = new ColumnInfo( getLocalizedColumn( 3 ), ColumnInfo.COLUMN_TYPE_CCOMBO, fieldNamesDefault, true );
  }
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:22,代码来源:PaloDimOutputDialog.java

示例14: setComboValues

import org.pentaho.di.ui.core.widget.ColumnInfo; //导入依赖的package包/类
private void setComboValues() {
	Runnable fieldLoader = new Runnable() {
		public void run() {
			try {
				prevFields = transMeta.getPrevStepFields(stepname);
			} catch (KettleException e) {
				prevFields = new RowMeta();
				String msg = BaseMessages.getString(PKG, "SelectValuesDialog.DoMapping.UnableToFindInput");
				logError(msg);
			}
			String[] prevStepFieldNames = prevFields!=null ? prevFields.getFieldNames() : new String[0];
			Arrays.sort(prevStepFieldNames);
			bPreviousFieldsLoaded = true;
			for (int i = 0; i < fieldColumns.size(); i++) {
				ColumnInfo colInfo = (ColumnInfo) fieldColumns.get(i);
				colInfo.setComboValues(prevStepFieldNames);
			}
		}
	};
	shell.getDisplay().asyncExec(fieldLoader);
}
 
开发者ID:jjeb,项目名称:kettle-trunk,代码行数:22,代码来源:SelectValuesDialog.java

示例15: setComboValues

import org.pentaho.di.ui.core.widget.ColumnInfo; //导入依赖的package包/类
private void setComboValues() {
	Runnable fieldLoader = new Runnable() {
		public void run() {
			try {
				prevFields = transMeta.getPrevStepFields(stepname);
			} catch (KettleException e) {
				prevFields = new RowMeta();
				String msg = BaseMessages.getString(PKG, "DatabaseLookupDialog.DoMapping.UnableToFindInput");
				logError(msg);
			}
			String[] prevStepFieldNames = prevFields.getFieldNames();
			Arrays.sort(prevStepFieldNames);
			for (int i = 0; i < fieldColumns.size(); i++) {
				ColumnInfo colInfo = (ColumnInfo) fieldColumns.get(i);
				colInfo.setComboValues(prevStepFieldNames);
			}
		}
	};
	new Thread(fieldLoader).start();
}
 
开发者ID:jjeb,项目名称:kettle-trunk,代码行数:21,代码来源:DatabaseLookupDialog.java


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