public void widgetSelected( SelectionEvent event ) { // If there are multiple selections here AND there are multiple selections in the steps list, we only take the // first step in the selection... // if ( dataList.getSelectionCount() > 1 && stepsList.getSelectionCount() > 1 ) { stepsList.setSelection( stepsList.getSelectionIndices()[0] ); } updateGraph(); } } );
public void widgetSelected( SelectionEvent event ) { // If there are multiple selections here AND there are multiple selections in the steps list, we only take the // first step in the selection... // if ( dataList.getSelectionCount() > 1 && stepsList.getSelectionCount() > 1 ) { stepsList.setSelection( stepsList.getSelectionIndices()[0] ); } updateGraph(); } } );
public void widgetSelected( SelectionEvent event ) { // If there are multiple selections here AND there are multiple selections in the data list, we only take the // first data item in the selection... // if ( dataList.getSelectionCount() > 1 && stepsList.getSelectionCount() > 1 ) { dataList.setSelection( dataList.getSelectionIndices()[0] ); } updateGraph(); } } );
public void widgetSelected( SelectionEvent event ) { // If there are multiple selections here AND there are multiple selections in the data list, we only take the // first data item in the selection... // if ( dataList.getSelectionCount() > 1 && stepsList.getSelectionCount() > 1 ) { dataList.setSelection( dataList.getSelectionIndices()[0] ); } updateGraph(); } } );
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 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 ) ); } } );
private void ok() { if ( constant != null && wbUseConstant.getSelection() ) { selection = wConstantValue.getText(); } else if ( wSelection.getSelectionCount() > 0 ) { selection = wSelection.getSelection()[0]; selectionNr = wSelection.getSelectionIndices()[0];
public void refreshGrid() { applyChangedValue(); wTodo.removeAll(); wKey.setText( "" ); wMain.setText( "" ); wValue.setText( "" ); wSource.setText( "" ); selectedLocale = wLocale.getSelectionCount() == 0 ? null : wLocale.getSelection()[0]; selectedSourceFolder = wPackages.table.getSelectionCount() == 0 ? null : wPackages.table.getSelection()[0].getText( 1 ); selectedMessagesPackage = wPackages.table.getSelectionCount() == 0 ? null : wPackages.table.getSelection()[0].getText( 2 ); refreshPackages(); // Only continue with a locale & a messages package, otherwise we won't // budge ;-) // if ( selectedLocale != null && selectedSourceFolder != null && selectedMessagesPackage != null ) { // Get the list of keys that need a translation... // java.util.List<KeyOccurrence> todo = getTodoList( selectedLocale, selectedMessagesPackage, selectedSourceFolder, false ); String[] todoItems = new String[todo.size()]; for ( int i = 0; i < todoItems.length; i++ ) { todoItems[i] = todo.get( i ).getKey(); } wTodo.setItems( todoItems ); } }
public void refreshGrid() { try { if ( wList.getSelectionCount() > 0 ) { String[] languages = getSelectedLocale(); System.out.println( "Selected languages: " + languages.length ); for ( int i = 0; i < wList.getSelectionCount(); i++ ) { String dir = wList.getSelection()[i];
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 ); } }
if ( list.getSelectionCount() <= 0 ) { return;
boolean multiStep = stepsList.getSelectionCount() > 1; boolean multiData = dataList.getSelectionCount() > 1; boolean calcMoving = !multiStep && !multiData; // A single metric shown for a single step List<Double> movingList = new ArrayList<Double>();
boolean multiStep = stepsList.getSelectionCount() > 1; boolean multiData = dataList.getSelectionCount() > 1; boolean calcMoving = !multiStep && !multiData; // A single metric shown for a single step List<Double> movingList = new ArrayList<Double>();
if (themeSelectionList.getSelectionCount() > 0) { String selectedThemeName = themeSelectionList.getSelection()[0]; getPreferenceStore().setValue("colorTheme", selectedThemeName);
public void widgetSelected(SelectionEvent e) { boolean enabled = (EditDriverDialog.this.list .getSelectionCount() > 0); EditDriverDialog.this.mEditJar.setEnabled(enabled); EditDriverDialog.this.mRemoveJar .setEnabled(enabled); }
@Override public void copyValuesFromGUI() { m_selectedTypeNames = new String[typeList.getSelectionCount()]; for (int i = 0, j = 0; i < m_availableTypeNames.length; i++) { if (typeList.isSelected(i)) { m_selectedTypeNames[j++] = m_availableTypeNames[i]; } } }
private void jumpToSelectedLine(org.eclipse.swt.widgets.List list) { if (list.getSelectionCount() > 0) { StackTraceElement element = stackTrace.get(list.getSelectionIndex()); IFile classFile = getClassFile(element.getClassName()); if (classFile != null) { jumpAndCloseDialog(element, classFile); } } }
public void widgetSelected(SelectionEvent e) { if (EditDriverDialog.this.list.getSelectionCount() > 0) { String selectedItem = EditDriverDialog.this.list .getItem(EditDriverDialog.this.list .getSelectionIndex()); handleLocationEditButtonPressed(selectedItem); updateJarList(); } } });
public void widgetSelected(SelectionEvent event) { if (selectedListBox.getSelectionCount() > 0) setRemoveButtonEnabled(true); else setRemoveButtonEnabled(false); return; } });
public void widgetSelected(SelectionEvent e) { if (EditDriverDialog.this.list .getSelectionCount() > 0) { String[] selected = EditDriverDialog.this.list .getSelection(); for (int i = 0; i < selected.length; i++) { EditDriverDialog.this.list .remove(selected[i]); } updateJarList(); } } });