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 arg0 ) { int[] idx = wList.getSelectionIndices(); reload(); wList.setSelection( idx ); refreshGrid(); } } );
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(); } } );
} else if ( wSelection.getSelectionCount() > 0 ) { selection = wSelection.getSelection()[0]; selectionNr = wSelection.getSelectionIndices()[0]; if ( quickSearch ) { for ( int i = 0; i < choices.length; i++ ) { indices = wSelection.getSelectionIndices();
stepsList.select( 0 ); int[] dataIndices = dataList.getSelectionIndices(); if ( dataIndices == null || dataIndices.length == 0 ) { dataIndices = new int[] { DATA_CHOICE_WRITTEN, };
stepsList.select( 0 ); int[] dataIndices = dataList.getSelectionIndices(); if ( dataIndices == null || dataIndices.length == 0 ) { dataIndices = new int[] { DATA_CHOICE_WRITTEN, };
jobEntry.setFileType( wTypes.getSelectionIndices() ); jobEntry.setZipFilename( wZipFilename.getText() ); jobEntry.setZipFiles( wZipFiles.getSelection() );
@Override protected int[] listGetSelectionIndices() { return list.getSelectionIndices(); }
@Override protected int[] listGetSelectionIndices() { return list.getSelectionIndices(); }
protected int[] listGetSelectionIndices() { return list.getSelectionIndices(); }
/** * Remove the current selection in the build list. */ private void removeSelection() { this.buildList.remove(this.buildList.getSelectionIndices()); }
@Override public void widgetSelected(SelectionEvent e) { int[] indices = swtList.getSelectionIndices(); clipboard.clear(); for (int i = 0; i < indices.length; i++) { clipboard.add(newList.get(indices[i])); } for (int i = indices.length - 1; i >= 0; i--) { newList.remove(indices[i]); swtList.remove(indices[i]); } }
int getInsertPostion() { int[] selected = swtList.getSelectionIndices(); return selected.length == 0 ? swtList.getItemCount() : selected[0]; }
protected void removeSelectedWorkspaces() { // This would be a lot less code if we could use Jakarta CollectionUtils and/or ArrayUtils int[] selected = workspacesList.getSelectionIndices(); java.util.List<String> workspaces = new ArrayList<String>(Arrays.asList(workspacesList.getItems())); // Iterate bottom-up because removal changes indices in the list for (int i = selected.length-1; i >= 0; i--) { workspaces.remove(selected[i]); } String[] newItems = new String[workspaces.size()]; workspaces.toArray(newItems); workspacesList.setItems(newItems); }
public String getControlValueRaw() { String value = ""; java.util.List<ListItemT> listItems = control instanceof MultiSelectListT ? ( (MultiSelectListT) control ).getListItem() : ( (SingleSelectListT) control ).getListItem(); int[] selection = listBox.getSelectionIndices(); for ( int i = 0; i < selection.length; i++ ) { value += listItems.get( selection[ i ] ).getEnumID(); if ( i + 1 != selection.length ) value += " "; } return "".equals( value ) ? null : value; }
private static void preserveSelection( final List list ) { IWidgetAdapter adapter = WidgetUtil.getAdapter( list ); Object selection; if( isSingle( list ) ) { selection = new Integer( list.getSelectionIndex() ); } else { selection = list.getSelectionIndices(); } adapter.preserve( PROP_SELECTION, selection ); }
public void widgetSelected(SelectionEvent e) { if (sc.isMultiple()) { int[] indices = list.getSelectionIndices(); String[] values = new String[indices.length]; for (int i = 0; i < indices.length; i++) { values[i] = (String) _values.get(indices[i]); } sc.setMultipleValues(values); } else { sc.setValue((String) _values.get(list .getSelectionIndex())); } } });
@Override public void preserveValues( List list ) { preserveProperty( list, PROP_ITEMS, list.getItems() ); preserveProperty( list, PROP_SELECTION_INDICES, list.getSelectionIndices() ); preserveProperty( list, PROP_TOP_INDEX, list.getTopIndex() ); preserveProperty( list, PROP_FOCUS_INDEX, list.getFocusIndex() ); preserveProperty( list, PROP_ITEM_DIMENSIONS, getItemDimensions( list ) ); }