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


Java ComboVar.add方法代码示例

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


在下文中一共展示了ComboVar.add方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setEncodings

import org.pentaho.di.ui.core.widget.ComboVar; //导入方法依赖的package包/类
private void setEncodings(ComboVar var)
{
 // Encoding of the text file:
      String encoding=Const.NVL(var.getText(),Const.getEnvironmentVariable("file.encoding", "UTF-8"));
      var.removeAll();
      ArrayList<Charset> values = new ArrayList<Charset>(Charset.availableCharsets().values());
      for (int i=0;i<values.size();i++)
      {
          Charset charSet = (Charset)values.get(i);
          var.add( charSet.displayName() );
      }
      
      // Now select the default!
      int idx = Const.indexOfString(encoding, var.getItems() );
      if (idx>=0) var.select( idx );
  }
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:17,代码来源:ChangeFileEncodingDialog.java

示例2: addDatabases

import org.pentaho.di.ui.core.widget.ComboVar; //导入方法依赖的package包/类
public void addDatabases(ComboVar wConnection, Class<? extends DatabaseInterface> databaseType) {
for (int i = 0; i < transMeta.nrDatabases(); i++) {
    DatabaseMeta ci = transMeta.getDatabase(i);
    if (databaseType==null || ci.getDatabaseInterface().getClass().equals(databaseType)) {
 	  wConnection.add(ci.getName());
   }
}
//  Add the metaDBConnectionName if we have it 
//  and it is already not added to the list in wConnection.
if (!Const.isEmpty(input.getDbConnectionName())) {
 String[] arrayDatabaseList = wConnection.getItems();
 if (arrayDatabaseList == null) {
  List<String> databaseNameList = Arrays.asList(arrayDatabaseList);
  if (!databaseNameList.contains(input.getDbConnectionName())) {
   wConnection.add(input.getDbConnectionName());
  }
 }
}
}
 
开发者ID:bsspirit,项目名称:kettle-4.4.0-stable,代码行数:20,代码来源:MonetDBBulkLoaderDialog.java

示例3: setEncodings

import org.pentaho.di.ui.core.widget.ComboVar; //导入方法依赖的package包/类
private void setEncodings( ComboVar var ) {
  // Encoding of the text file:
  String encoding = Const.NVL( var.getText(), Const.getEnvironmentVariable( "file.encoding", "UTF-8" ) );
  var.removeAll();
  ArrayList<Charset> values = new ArrayList<Charset>( Charset.availableCharsets().values() );
  for ( int i = 0; i < values.size(); i++ ) {
    Charset charSet = values.get( i );
    var.add( charSet.displayName() );
  }

  // Now select the default!
  int idx = Const.indexOfString( encoding, var.getItems() );
  if ( idx >= 0 ) {
    var.select( idx );
  }
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:17,代码来源:ChangeFileEncodingDialog.java

示例4: addDatabases

import org.pentaho.di.ui.core.widget.ComboVar; //导入方法依赖的package包/类
public void addDatabases( ComboVar wConnection, Class<? extends DatabaseInterface> databaseType ) {
  for ( int i = 0; i < transMeta.nrDatabases(); i++ ) {
    DatabaseMeta ci = transMeta.getDatabase( i );
    if ( databaseType == null || ci.getDatabaseInterface().getClass().equals( databaseType ) ) {
      wConnection.add( ci.getName() );
    }
  }
  // Add the metaDBConnectionName if we have it
  // and it is already not added to the list in wConnection.
  if ( !Utils.isEmpty( input.getDbConnectionName() ) ) {
    String[] arrayDatabaseList = wConnection.getItems();
    if ( arrayDatabaseList == null ) {
      List<String> databaseNameList = Arrays.asList();
      if ( !databaseNameList.contains( input.getDbConnectionName() ) ) {
        wConnection.add( input.getDbConnectionName() );
      }
    }
  }
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:20,代码来源:MonetDBBulkLoaderDialog.java

示例5: addRowsToProcessControllers

import org.pentaho.di.ui.core.widget.ComboVar; //导入方法依赖的package包/类
private void addRowsToProcessControllers() {
  wlRowsToProcess = new Label( wgRowHandling, SWT.RIGHT );
  wlRowsToProcess.setText( BaseMessages.getString( PKG, "CPythonScriptExecutorDialog.NumberOfRowsToProcess.Label" ) );
  props.setLook( wlRowsToProcess );
  fd = new FormData();
  fd.left = new FormAttachment( 0, 0 );
  fd.right = new FormAttachment( FIRST_LABEL_RIGHT_PERCENTAGE, 0 );
  fd.top = new FormAttachment( lastControl, MARGIN );
  wlRowsToProcess.setLayoutData( getFirstLabelFormData() );

  wcvRowsToProcess = new ComboVar( transMeta, wgRowHandling, SWT.BORDER | SWT.READ_ONLY );
  props.setLook( wcvRowsToProcess );
  wcvRowsToProcess.setEditable( false );
  wcvRowsToProcess.addSelectionListener( new SelectionAdapter() {
    @Override public void widgetSelected( SelectionEvent e ) {
      m_inputMeta.setChanged();
      handleRowsToProcessChange();
      if ( wtvInputFrames.getItemCount() > 1 && wbReservoirSampling.getSelection() && wcvRowsToProcess.getText()
          .equals( BaseMessages.getString( PKG,
              "CPythonScriptExecutorDialog.NumberOfRowsToProcess.Dropdown.RowByRowEntry.Label" ) ) ) {
        ShowMessageDialog
            smd =
            new ShowMessageDialog( shell, SWT.OK | SWT.ICON_WARNING,
                BaseMessages.getString( PKG, "CPythonScriptExecutorDialog.RowByRowWarning.Title" ),
                BaseMessages.getString( PKG, "CPythonScriptExecutorDialog.RowByRowWarning.Message" ), false );
        smd.open();
      }
    }
  } );
  wcvRowsToProcess.setLayoutData( getFirstPromptFormData( wlRowsToProcess ) );
  wcvRowsToProcess.add(
      BaseMessages.getString( PKG, "CPythonScriptExecutorDialog.NumberOfRowsToProcess.Dropdown.AllEntry.Label" ) );
  wcvRowsToProcess.add( BaseMessages
      .getString( PKG, "CPythonScriptExecutorDialog.NumberOfRowsToProcess.Dropdown.RowByRowEntry.Label" ) );
  wcvRowsToProcess.add(
      BaseMessages.getString( PKG, "CPythonScriptExecutorDialog.NumberOfRowsToProcess.Dropdown.BatchEntry.Label" ) );
  wcvRowsToProcess.setToolTipText(
      BaseMessages.getString( PKG, "CPythonScriptExecutorDialog.NumberOfRowsToProcess.Dropdown.TipText" ) );

  wlRowsToProcessSize = new Label( wgRowHandling, SWT.RIGHT );
  wlRowsToProcessSize
      .setText( BaseMessages.getString( PKG, "CPythonScriptExecutorDialog.NumberOfRowsToProcess.Size.Label" ) );
  props.setLook( wlRowsToProcessSize );
  wlRowsToProcessSize.setLayoutData( getSecondLabelFormData( wcvRowsToProcess ) );

  wtvRowsToProcessSize = new TextVar( transMeta, wgRowHandling, SWT.SINGLE | SWT.LEAD | SWT.BORDER );
  props.setLook( wtvRowsToProcessSize );
  wtvRowsToProcessSize.addModifyListener( simpleModifyListener );
  wtvRowsToProcessSize.setLayoutData( getSecondPromptFormData( wlRowsToProcessSize ) );
  wtvRowsToProcessSize.setEnabled( false );
  lastControl = wtvRowsToProcessSize;
  wtvRowsToProcessSize.setToolTipText(
      BaseMessages.getString( PKG, "CPythonScriptExecutorDialog.NumberOfRowsToProcess.Size.TipText" ) );
}
 
开发者ID:pentaho-labs,项目名称:pentaho-cpython-plugin,代码行数:55,代码来源:CPythonScriptExecutorDialog.java


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