/** * Selects the database with the specified name in the Combo Box component. * * @param wConnection the Combo Box component * @param name the name of the database to select */ public void selectDatabase( CCombo wConnection, String name ) { int idx = wConnection.indexOf( name ); if ( idx >= 0 ) { wConnection.select( idx ); } }
/** * Selects a database from the combo box * * @param wConnection * the combo box list of connections * @param name * the name */ public void selectDatabase( CCombo wConnection, String name ) { int idx = wConnection.indexOf( name ); if ( idx >= 0 ) { wConnection.select( idx ); } }
private void fillModelCombo() { String[] modelList = getModelList(); if ( modelList != null ) { for ( String modelName : modelList ) { if ( comboModelName.indexOf( modelName ) == -1 ) { comboModelName.add( modelName ); } } } }
public void selectDatabase( ComboVar wConnection, String name ) { int idx = wConnection.getCComboWidget().indexOf( name ); if ( idx >= 0 ) { wConnection.select( idx ); } }
private void setModelComboOptions() { String[] objectList = getModelList(); if ( objectList == null ) { return; } for ( String objectName : objectList ) { if ( comboModelName.indexOf( objectName ) == -1 ) { comboModelName.add( objectName ); } } }
private void setModelComboOptions() { String[] objectList = getModelList(); if ( objectList == null ) { return; } for ( String objectName : objectList ) { if ( comboModelName.indexOf( objectName ) == -1 ) { comboModelName.add( objectName ); } } }
case ValueMetaInterface.TYPE_INTEGER: wFormat.setItems( Const.getNumberFormats() ); int index = ( !Utils.isEmpty( formatString ) ) ? wFormat.indexOf( formatString ) : wFormat.indexOf( "#" ); index = wFormat.indexOf( formatString ); case ValueMetaInterface.TYPE_NUMBER: wFormat.setItems( Const.getNumberFormats() ); index = ( !Utils.isEmpty( formatString ) ) ? wFormat.indexOf( formatString ) : wFormat.indexOf( "#.#" ); index = wFormat.indexOf( formatString ); wFormat.setItems( Const.getDateFormats() ); index = ( !Utils.isEmpty( formatString ) ) ? wFormat.indexOf( formatString ) : wFormat .indexOf( "yyyy/MM/dd HH:mm:ss" ); // default; index = wFormat.indexOf( formatString );
private void fillStoredData() { if ( stepname != null ) { textStepName.setText( stepname ); } int index = addConnectionLine.indexOf( meta.getDatabaseMeta() != null ? meta.getDatabaseMeta().getName() : "" ); if ( index >= 0 ) { addConnectionLine.select( index ); } if ( meta.getModelName() != null ) { comboModelName.add( meta.getModelName() ); comboModelName.select( 0 ); } textCommitBatchSize.setText( String.valueOf( meta.getCommitBatchSize() ) ); comboIDFieldName.setText( meta.getIdFieldName() ); }
int index = addConnectionLine.indexOf( meta.getDatabaseMeta() != null ? meta.getDatabaseMeta().getName() : "" ); if ( index >= 0 ) { addConnectionLine.select( index );
private void fillStoredData() { if ( stepname != null ) { textStepName.setText( stepname ); } int index = addConnectionLine.indexOf( meta.getDatabaseMeta() != null ? meta.getDatabaseMeta().getName() : "" ); if ( index >= 0 ) { addConnectionLine.select( index ); } if ( meta.getModelName() != null ) { comboModelName.add( meta.getModelName() ); comboModelName.select( 0 ); } textReadBatchSize.setText( String.valueOf( meta.getReadBatchSize() ) ); tableViewFields.table.removeAll(); tableViewFilter.table.removeAll(); populateFielsTable( meta.getMappings() ); populateFiltersTable( meta.getFilterList() ); fillFilterCombos(); }
/** * Copy information from the meta-data input to the dialog fields. */ public void getData() { if ( jobEntry.getName() != null ) { textStepName.setText( jobEntry.getName() ); } textStepName.selectAll(); int index = addConnectionLine.indexOf( jobEntry.getDatabaseMeta() != null ? jobEntry.getDatabaseMeta().getName() : "" ); if ( index >= 0 ) { addConnectionLine.select( index ); } if ( jobEntry.getCubeName() != null ) { comboCubeName.add( jobEntry.getCubeName() ); comboCubeName.select( 0 ); } }
private void fillStoredData() { if ( stepname != null ) { textStepName.setText( stepname ); } int index = addConnectionLine.indexOf( meta.getDatabaseMeta() != null ? meta.getDatabaseMeta().getName() : "" ); if ( index >= 0 ) { addConnectionLine.select( index ); } if ( meta.getDimension() != null ) { comboDimension.add( meta.getDimension() ); comboDimension.select( 0 ); } buttonBaseElementsOnly.setSelection( meta.getBaseElementsOnly() ); tableViewFields.table.removeAll(); if ( meta.getLevels().size() > 0 ) { for ( PaloDimensionLevel level : meta.getLevels() ) { tableViewFields.add( level.getLevelName(), String.valueOf( level.getLevelNumber() ), level.getFieldName(), level.getFieldType() ); } tableViewFields.setRowNums(); tableViewFields.optWidth( true ); } }
/** * Copy information from the meta-data input to the dialog fields. */ public void getData() { if ( jobEntry.getName() != null ) { textStepName.setText( jobEntry.getName() ); } textStepName.selectAll(); int index = addConnectionLine.indexOf( jobEntry.getDatabaseMeta() != null ? jobEntry.getDatabaseMeta().getName() : "" ); if ( index >= 0 ) { addConnectionLine.select( index ); } if ( jobEntry.getCubeName() != null ) { textCubeName.setText( jobEntry.getCubeName() ); } tableViewFields.table.removeAll(); if ( jobEntry.getDimensionNames() != null && jobEntry.getDimensionNames().size() > 0 ) { for ( String dimensionName : jobEntry.getDimensionNames() ) { tableViewFields.add( dimensionName ); } } if ( tableViewFields.table.getItemCount() == 0 ) { tableViewFields.add( "" ); } tableViewFields.setRowNums(); }
int index = addConnectionLine.indexOf( meta.getDatabaseMeta() != null ? meta.getDatabaseMeta().getName() : "" ); if ( index >= 0 ) { addConnectionLine.select( index );
private void getPreviousFields() { // Save user-selected value, if applicable String selectedValue = wfieldevaluate.getText(); // Clear the existing list, and reload wfieldevaluate.removeAll(); try { RowMetaInterface r = transMeta.getPrevStepFields( stepname ); if ( r != null ) { for ( String item : r.getFieldNames() ) { wfieldevaluate.add( item ); } } // Re-select the user-selected value, if applicable if ( !Utils.isEmpty( selectedValue ) ) { wfieldevaluate.select( wfieldevaluate.indexOf( selectedValue ) ); } else { wfieldevaluate.select( 0 ); } } catch ( KettleException ke ) { new ErrorDialog( shell, BaseMessages.getString( PKG, "RegexEvalDialog.FailedToGetFields.DialogTitle" ), BaseMessages .getString( PKG, "RegexEvalDialog.FailedToGetFields.DialogMessage" ), ke ); } }
int index = addConnectionLine.indexOf( meta.getDatabaseMeta() != null ? meta.getDatabaseMeta().getName() : "" ); if ( index >= 0 ) { addConnectionLine.select( index );
private void doSelectConnection( boolean clearCurrentData ) { try { if ( clearCurrentData ) { comboCubeName.removeAll(); } if ( comboCubeName.getItemCount() > 1 ) { return; } if ( addConnectionLine.getText() != null ) { DatabaseMeta dbMeta = DatabaseMeta.findDatabase( jobMeta.getDatabases(), addConnectionLine.getText() ); if ( dbMeta != null ) { PaloHelper helper = new PaloHelper( dbMeta, DefaultLogLevel.getLogLevel() ); helper.connect(); List<String> cubes = helper.getCubesNames(); Collections.sort( cubes, new PaloNameComparator() ); for ( String cubename : cubes ) { if ( comboCubeName.indexOf( cubename ) == -1 ) { comboCubeName.add( cubename ); } } helper.disconnect(); } } } catch ( Exception ex ) { new ErrorDialog( shell, BaseMessages.getString( PKG, "PaloDimInputFlatDialog.RetreiveDimensionsErrorTitle" ), BaseMessages.getString( PKG, "PaloDimInputFlatDialog.RetreiveDimensionsError" ), ex ); } }
int index = addConnectionLine.indexOf( meta.getDatabaseMeta() != null ? meta.getDatabaseMeta().getName() : "" ); if ( index >= 0 ) { addConnectionLine.select( index );
wOperation.select( wOperation.indexOf( input.getOperation() ) ); if ( BaseMessages.getString( PKG, "LucidDBStreamingLoaderDialog.Operation.CCombo.Item2" ).equals( input.getOperation() ) ) {