public void widgetSelected( SelectionEvent event ) { showSelectedValidatorField( wValidationsList.getSelection()[0] ); } } );
private void add() { if ( wSource.getSelectionCount() == 1 && wTarget.getSelectionCount() == 1 ) { String sourceString = wSource.getSelection()[0]; String targetString = wTarget.getSelection()[0]; int srcIndex = Const.indexOfString( sourceString, sourceList ); int tgtIndex = Const.indexOfString( targetString, targetList ); if ( srcIndex >= 0 && tgtIndex >= 0 ) { // New mapping: add it to the list... SourceToTargetMapping mapping = new SourceToTargetMapping( srcIndex, tgtIndex ); mappings.add( mapping ); refreshMappings(); } } }
public void setAccessTypes() { if ( wDBType.getSelectionCount() < 1 ) { return; } int[] acc = DatabaseMeta.getAccessTypeList( wDBType.getSelection()[0] ); wAccType.removeAll(); for ( int i = 0; i < acc.length; i++ ) { wAccType.add( DatabaseMeta.getAccessTypeDescLong( acc[i] ) ); } // If nothing is selected: select the first item (mostly the native driver) if ( wAccType.getSelectionIndex() < 0 ) { wAccType.select( 0 ); } }
public void modifyText( ModifyEvent event ) { // See if there is a selected Validation // if ( wValidationsList != null && wValidationsList.getItemCount() > 0 && wValidationsList.getSelection().length == 1 ) { int index = wValidationsList.getSelectionIndex(); String description = wValidationsList.getItem( index ); Validation validation = Validation.findValidation( selectionList, description ); String newDescription = wDescription.getText(); validation.setName( newDescription ); wValidationsList.setItem( index, newDescription ); wValidationsList.select( index ); } } } );
public boolean canFinish() { String[] sel = wListSource.getSelection(); boolean canFlip = sel.length > 0; return canFlip; }
public void widgetSelected( SelectionEvent event ) { if ( list.getSelectionCount() <= 0 ) { return; } String name = list.getSelection()[0]; String value = variables.getVariable( name ); Rectangle shellBounds = shell.getBounds(); String message = BaseMessages.getString( PKG, "TextVar.VariableValue.Message", name, value ); if ( name.startsWith( Const.INTERNAL_VARIABLE_PREFIX ) ) { message += BaseMessages.getString( PKG, "TextVar.InternalVariable.Message" ); } toolTip.setText( message ); toolTip.hide(); toolTip.show( new Point( shellBounds.width, 0 ) ); } } );
public String getSelection() { return wListSource.getSelection()[0]; } }
public void dragSetData( DragSourceEvent event ) { String[] ti = wListSource.getSelection(); String data = new String(); for ( int i = 0; i < ti.length; i++ ) { data += ti[i] + Const.CR; } event.data = data; }
public DatabaseMeta getTargetDatabase() { if ( wTargetDB.getSelection().length == 1 ) { String targetDbName = wTargetDB.getSelection()[0]; return DatabaseMeta.findDatabase( databases, targetDbName ); } return null; }
public DatabaseMeta getSourceDatabase() { if ( wSourceDB.getSelection().length == 1 ) { String sourceDbName = wSourceDB.getSelection()[0]; return DatabaseMeta.findDatabase( databases, sourceDbName ); } return null; }
public DatabaseMeta getSourceDatabase() { if ( wSourceDB.getSelection().length == 1 ) { String sourceDbName = wSourceDB.getSelection()[0]; return DatabaseMeta.findDatabase( databases, sourceDbName ); } return null; }
public DatabaseMeta getTargetDatabase() { if ( wTargetDB.getSelection().length == 1 ) { String targetDbName = wTargetDB.getSelection()[0]; return DatabaseMeta.findDatabase( databases, targetDbName ); } return null; }
public void keyPressed( KeyEvent e ) { if ( e.character == SWT.CR ) { delFromSelection( wListDest.getSelection() ); } } } );
public void keyPressed( KeyEvent e ) { if ( e.character == SWT.CR ) { addToSelection( wListSource.getSelection() ); } } } );
/** * Remove the selected entries from the allowed entries */ protected void removeAllowedValue() { String[] selection = wAllowedValues.getSelection(); for ( String string : selection ) { wAllowedValues.remove( string ); } }
public void widgetSelected( SelectionEvent e ) { delFromSelection( wListDest.getSelection() ); } } );
public void widgetDefaultSelected( SelectionEvent e ) { addToSelection( wListSource.getSelection() ); } } );
public void widgetSelected( SelectionEvent e ) { addToSelection( wListSource.getSelection() ); } } );
public void widgetDefaultSelected( SelectionEvent e ) { delFromSelection( wListDest.getSelection() ); } } );
private void delete() { String[] result = wResult.getSelection(); for ( int i = result.length - 1; i >= 0; i-- ) { int idx = wResult.indexOf( result[i] ); if ( idx >= 0 && idx < mappings.size() ) { mappings.remove( idx ); } } refreshMappings(); }