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

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

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

TableView.getTable介绍

暂无

代码示例

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

@Override protected String[] getFieldNames() {
 return stream( fieldsTable.getTable().getItems() ).map( row -> row.getText( 2 ) ).toArray( String[]::new );
}

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

public String[] getFieldNames() {
 return stream( fieldsTable.getTable().getItems() ).map( row -> row.getText( 2 ) ).toArray( String[]::new );
}

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

private void populateSSLData() {
 sslTable.getTable().removeAll();
 new TableItem( sslTable.getTable(), SWT.NONE );
 checkNotNull( sslTable.getItem( 0 ) );
 checkState( sslTable.getItem( 0 ).length == 2 );
 List<String> keys = Lists.newArrayList( sslConfig.keySet() );
 sort( keys );
 String firstKey = keys.remove( 0 );
 sslTable.getTable().getItem( 0 ).setText( 1, firstKey );
 sslTable.getTable().getItem( 0 ).setText( 2, sslConfig.get( firstKey ) );
 keys
  .forEach( key -> sslTable.add( key, sslConfig.get( key ) ) );
}

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

public int[] getFieldTypes() {
 return stream( fieldsTable.getTable().getItems() )
  .mapToInt( row -> ValueMetaFactory.getIdForValueMeta( row.getText( 3 ) ) ).toArray();
}

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

@Override protected int[] getFieldTypes() {
 return stream( fieldsTable.getTable().getItems() )
  .mapToInt( row -> ValueMetaFactory.getIdForValueMeta( row.getText( 3 ) ) ).toArray();
}

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

private void populateSSLData() {
 propertiesTable.getTable().removeAll();
 new TableItem( propertiesTable.getTable(), SWT.NONE );
 checkNotNull( propertiesTable.getItem( 0 ) );
 checkState( propertiesTable.getItem( 0 ).length == 2 );
 if ( dataMap.size() == 0 ) {
  //no data initialized
  return;
 }
 List<String> keys = Lists.newArrayList( dataMap.keySet() );
 sort( keys );
 String firstKey = keys.remove( 0 );
 propertiesTable.getTable().getItem( 0 ).setText( 1, firstKey );
 propertiesTable.getTable().getItem( 0 ).setText( 2, dataMap.get( firstKey ) );
 keys.stream()
  .forEach( key -> propertiesTable.add( key, dataMap.get( key ) ) );
}

代码示例来源: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 populateProperties() {
 int rowIndex = 0;
 for ( Map.Entry<String, String> entry : meta.getPropertyValuesByName().entrySet() ) {
  TableItem key = propertiesTable.getTable().getItem( rowIndex++ );
  key.setText( 1, entry.getKey() );
  key.setText( 2, entry.getValue() );
 }
}

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

private void populateTopicsData() {
 List<String> topics = mqttMeta.getTopics();
 int rowIndex = 0;
 for ( String topic : topics ) {
  TableItem key = topicsTable.getTable().getItem( rowIndex++ );
  if ( topic != null ) {
   key.setText( 1, topic );
  }
 }
}

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

private void populateFieldData() {
 TableItem messageItem = fieldsTable.getTable().getItem( 0 );
 messageItem.setText( 1, BaseMessages.getString( PKG, "JmsConsumerDialog.InputName.Message" ) );
 messageItem.setText( 2, message );
 messageItem.setText( 3, "String" );
 TableItem topicItem = fieldsTable.getTable().getItem( 1 );
 topicItem.setText( 1, BaseMessages.getString( PKG, "JmsConsumerDialog.InputName.Destination" ) );
 topicItem.setText( 2, destination );
 topicItem.setText( 3, "String" );
}

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

private void populateFieldData() {
 TableItem messageItem = fieldsTable.getTable().getItem( 0 );
 messageItem.setText( 1, BaseMessages.getString( PKG, "MQTTConsumerDialog.InputName.Message" ) );
 messageItem.setText( 2, mqttMeta.getMsgOutputName() );
 messageItem.setText( 3, "String" );
 TableItem topicItem = fieldsTable.getTable().getItem( 1 );
 topicItem.setText( 1, BaseMessages.getString( PKG, "MQTTConsumerDialog.InputName.Topic" ) );
 topicItem.setText( 2, mqttMeta.getTopicOutputName() );
 topicItem.setText( 3, "String" );
}

代码示例来源: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

topicsTable.getTable().addListener( SWT.Resize, event -> {
 Table table = (Table) event.widget;
 table.getColumn( 1 ).setWidth( 330 );
stream( topicsTable.getTable().getColumns() ).forEach( column -> {
 if ( column.getWidth() > 0 ) {

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

propertiesTable.getTable().addListener( SWT.Resize, event -> {
 Table table = (Table) event.widget;
 table.getColumn( 1 ).setWidth( 215 );
Arrays.stream( propertiesTable.getTable().getColumns() ).forEach( column -> {
 if ( column.getWidth() > 0 ) {

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

propertiesTable.getTable().addListener( SWT.Resize, event -> {
 Table table = (Table) event.widget;
 table.getColumn( 1 ).setWidth( 200 );
stream( propertiesTable.getTable().getColumns() ).forEach( column -> {
 if ( column.getWidth() > 0 ) {

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

sslTable.getTable().addListener( SWT.Resize, event -> {
 Table table = (Table) event.widget;
 table.getColumn( 1 ).setWidth( 200 );
stream( sslTable.getTable().getColumns() ).forEach( column -> {
 if ( column.getWidth() > 0 ) {

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

wPackages.setRowNums();
wPackages.optWidth( true );
wPackages.getTable().getColumn( 1 ).setWidth( 100 );

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

fieldsTable.getTable().addListener( SWT.Resize, event -> {
 Table table = (Table) event.widget;
 table.getColumn( 1 ).setWidth( 147 );
stream( fieldsTable.getTable().getColumns() ).forEach( column -> {
 if ( column.getWidth() > 0 ) {

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

fieldsTable.getTable().addListener( SWT.Resize, event -> {
 Table table = (Table) event.widget;
 table.getColumn( 1 ).setWidth( 147 );
stream( fieldsTable.getTable().getColumns() ).forEach( column -> {
 if ( column.getWidth() > 0 ) {

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

int nrRows = input.getArgumentFieldNames().length;
if ( nrRows <= 0 ) {
 wArgumentFields.getTable().setItemCount( 1 );
} else {
 wArgumentFields.getTable().setItemCount( nrRows );
 for ( int i = 0; i < input.getArgumentFieldNames().length; i++ ) {
  TableItem item = wArgumentFields.getTable().getItem( i );
  item.setText( 1, input.getArgumentFieldNames()[i] );

相关文章