本文整理汇总了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 );
}
示例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());
}
}
}
}
示例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 );
}
}
示例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() );
}
}
}
}
示例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" ) );
}