org.pentaho.di.ui.core.widget.TableView.getItemCount()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(6.4k)|赞(0)|评价(0)|浏览(113)

本文整理了Java中org.pentaho.di.ui.core.widget.TableView.getItemCount()方法的一些代码示例,展示了TableView.getItemCount()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。TableView.getItemCount()方法的具体详情如下:
包路径:org.pentaho.di.ui.core.widget.TableView
类名称:TableView
方法名:getItemCount

TableView.getItemCount介绍

暂无

代码示例

代码示例来源:origin: pentaho/pentaho-kettle

private Map<String, String> tableToMap( TableView table ) {
  return IntStream.range( 0, table.getItemCount() )
   .mapToObj( table::getItem )
   .collect( Collectors.toMap( strArray -> strArray[ 0 ], strArray -> strArray[ 1 ] ) );
 }
}

代码示例来源:origin: pentaho/pentaho-kettle

private Map<String, String> tableToMap( TableView table ) {
 return IntStream.range( 0, table.getItemCount() )
  .mapToObj( table::getItem )
  .collect( Collectors.toMap( strArray -> strArray[ 0 ], strArray -> strArray[ 1 ] ) );
}

代码示例来源:origin: pentaho/pentaho-kettle

List<StepOption> retrieveOptions() {
  IntStream.range( 0, optionsTable.getItemCount() )
   .mapToObj( i -> optionsTable.getItem( i ) )
   .forEach( item ->
    options.forEach( option -> {
     if ( option.getText().equals( item[ 0 ] ) ) {
      option.setValue( item[ 1 ] );
     }
    } )
   );
  return options;
 }
}

代码示例来源:origin: pentaho/pentaho-kettle

public static Map<String, String> getMapFromTableView( TableView table ) {
 int itemCount = table.getItemCount();
 Map<String, String> propertyValuesByName = new LinkedHashMap<>();
 for ( int rowIndex = 0; rowIndex < itemCount; rowIndex++ ) {
  TableItem row = table.getTable().getItem( rowIndex );
  String propertyName = row.getText( 1 );
  String propertyValue = row.getText( 2 );
  if ( !StringUtils.isBlank( propertyName ) && !propertyValuesByName.containsKey( propertyName ) ) {
   propertyValuesByName.put( propertyName, propertyValue );
  }
 }
 return propertyValuesByName;
}

代码示例来源:origin: pentaho/pentaho-kettle

private void getInfo( GetSubFoldersMeta in ) {
 stepname = wStepname.getText(); // return value
 int nrfiles = wFoldernameList.getItemCount();
 in.allocate( nrfiles );
 in.setFolderName( wFoldernameList.getItems( 0 ) );
 in.setFolderRequired( wFoldernameList.getItems( 1 ) );
 in.setIncludeRowNumber( wInclRownum.getSelection() );
 in.setDynamicFoldernameField( wFoldernameField.getText() );
 in.setFolderField( wFolderField.getSelection() );
 in.setRowNumberField( wInclRownumField.getText() );
 in.setRowLimit( Const.toLong( wLimit.getText(), 0L ) );
}

代码示例来源:origin: pentaho/pentaho-kettle

private List<StepOption> saveOptions() {
 IntStream.range( 0, optionsTable.getItemCount() )
  .mapToObj( i -> optionsTable.getItem( i ) )
  .forEach( item ->

代码示例来源:origin: pentaho/pentaho-kettle

private void ok() {
 try {
  stringRowMeta = new RowMeta();
  for ( ValueMetaInterface valueMeta : rowMeta.getValueMetaList() ) {
   ValueMetaInterface stringValueMeta = ValueMetaFactory.cloneValueMeta( valueMeta,
    ValueMetaInterface.TYPE_STRING );
   stringRowMeta.addValueMeta( stringValueMeta );
  }
  List<Object[]> list = new ArrayList<Object[]>();
  // Now read all the rows in the dialog, including the empty rows...
  //
  for ( int i = 0; i < wFields.getItemCount(); i++ ) {
   TableItem item = wFields.getTable().getItem( i );
   Object[] row = getRowForData( item, i + 1 );
   list.add( row );
  }
  outputList = list;
  dispose();
 } catch ( Exception e ) {
  new ErrorDialog( shell, "Error", BaseMessages.getString( PKG, "EditRowsDialog.ErrorConvertingData" ), e );
 }
}

代码示例来源:origin: pentaho/pentaho-kettle

for ( int i = 0; i < wFields.getItemCount(); i++ ) {
  String[] row = wFields.getItem( i );
  if ( StringUtils.isNotBlank( row[0] ) ) {
for ( int i = 0; i < wServers.getItemCount(); i++ ) {
 String[] row = wServers.getItem( i );
 if ( StringUtils.isNotBlank( row[0] ) ) {
for ( int i = 0; i < wSettings.getItemCount(); i++ ) {
 String[] row = wSettings.getItem( i );
 in.addSetting( row[0], row[1] );

代码示例来源:origin: pentaho/pentaho-kettle

private void get() {
 try {
  if ( wFilenameList.getItemCount() > 0 ) {
   String filename = transMeta.environmentSubstitute( wFilenameList.getItem( 0 )[ 0 ] );
   List<String> paths = new ArrayList<>();

代码示例来源:origin: pentaho/pentaho-kettle

private void getInfo( GetFileNamesMeta in ) {
 stepname = wStepname.getText(); // return value
 int nrfiles = wFilenameList.getItemCount();
 in.allocate( nrfiles );
 in.setFileName( wFilenameList.getItems( 0 ) );
 in.setFileMask( wFilenameList.getItems( 1 ) );
 in.setExcludeFileMask( wFilenameList.getItems( 2 ) );
 in.setFileRequired( wFilenameList.getItems( 3 ) );
 in.setIncludeSubFolders( wFilenameList.getItems( 4 ) );
 in.setFilterFileType( FileInputList.FileTypeFilter.getByOrdinal( wFilterFileType.getSelectionIndex() ) );
 in.setIncludeRowNumber( wInclRownum.getSelection() );
 in.setAddResultFile( wAddResult.getSelection() );
 in.setDynamicFilenameField( wFilenameField.getText() );
 in.setDynamicWildcardField( wWildcardField.getText() );
 in.setDynamicExcludeWildcardField( wExcludeWildcardField.getText() );
 in.setFileField( wFileField.getSelection() );
 in.setRowNumberField( wInclRownumField.getText() );
 in.setRowLimit( Const.toLong( wLimit.getText(), 0L ) );
 in.setDynamicIncludeSubFolders( wIncludeSubFolder.getSelection() );
 in.setdoNotFailIfNoFile( wdoNotFailIfNoFile.getSelection() );
}

代码示例来源:origin: pentaho/pentaho-kettle

int nrFiles = wFilenameList.getItemCount();

代码示例来源:origin: pentaho/pentaho-kettle

in.setYamlField( wYAMLLField.getText() );
int nrFiles = wFilenameList.getItemCount();
int nrFields = wFields.nrNonEmpty();

代码示例来源:origin: pentaho/pentaho-kettle

in.setFieldValue( wFieldValue.getText() );
int nrFiles = wFilenameList.getItemCount();
int nrFields = wFields.nrNonEmpty();

代码示例来源:origin: pentaho/pentaho-kettle

in.setXMLField( wXMLField.getText() );
int nrFiles = wFilenameList.getItemCount();
int nrFields = wFields.nrNonEmpty();

代码示例来源:origin: pentaho/pentaho-kettle

in.setMultiValuedSeparator( wMultiValuedSeparator.getText() );
int nrFiles = wFilenameList.getItemCount();
int nrFields = wFields.nrNonEmpty();

代码示例来源:origin: pentaho/pentaho-kettle

in.setRowNumberField( wInclRownumField.getText() );
in.setResetRowNumber( wResetRownum.getSelection() );
int nrFiles = wFilenameList.getItemCount();
int nrFields = wFields.nrNonEmpty();
in.allocate( nrFiles, nrFields );

代码示例来源:origin: pentaho/pentaho-kettle

in.setIncludeSubFolders( new String[0] );
} else {
 in.allocate( wFilenameList.getItemCount(), nrFields );

代码示例来源:origin: pentaho/pentaho-kettle

if ( selectionIndex >= 0 && selectionIndex < model.logDisplayTableView.getItemCount() ) {
 model.logDisplayTableView.table.select( selectionIndex );
 showLogEntry();

代码示例来源:origin: pentaho/pentaho-kettle

if ( selectionIndex >= 0 && selectionIndex < model.logDisplayTableView.getItemCount() ) {
 model.logDisplayTableView.table.select( selectionIndex );
 showLogEntry();

代码示例来源:origin: pentaho/pentaho-kettle

in.setResetRowNumber( wResetRownum.getSelection() );
in.setResolveValueVariable( wresolveValueVariable.getSelection() );
int nrFiles = wFilenameList.getItemCount();
int nrFields = wFields.nrNonEmpty();
in.allocate( nrFiles, nrFields );

相关文章