Demos and Usage of org.eclipse.swt.widgets.Table.setSelection(int index)


   1:     Shell shell = new Shell (display);
   2:     Table table = new Table (shell, SWT.BORDER | SWT.MULTI);
   3:     table.setSize (200, 200);
   4:         ...
   5:     }
   6:     table.setSelection(95);
   7:     shell.pack ();
   8:     shell.open ();
   9:     while (!shell.isDisposed ()) {

View Full Code Here
   1: import org.eclipse.jface.viewers.TableViewer;
   2: import org.eclipse.swt.widgets.Table;
   3: import org.eclipse.ui.PlatformUI;
   4:         ...
   5:         taskList.cancelEditing();
   6:         Table table = viewer.getTable();
   7:         int focusIndex = table.getSelectionIndex();
   8:         ...
   9:         if (focusIndex < count) {
  10:             table.setSelection(focusIndex);
  11:         } else if (count != 0) {
  12:         ...
  13:             table.setSelection(count - 1);

View Full Code Here
   1: import org.eclipse.swt.widgets.Composite;
   2: import org.eclipse.swt.widgets.Table;
   3: import org.eclipse.swt.widgets.TableColumn;
   4:         ...
   5:         
   6:         final Table table = new Table(innerSashForm, SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER | SWT.SINGLE | SWT.FULL_SELECTION);
   7:         data = new GridData(GridData.FILL_BOTH);
   8:         ...
   9:         
  10:         table.setSelection(0);
  11:         listener.widgetSelected(null);

View Full Code Here
   1: import org.eclipse.swt.widgets.Label;
   2: import org.eclipse.swt.widgets.Table;
   3: import org.eclipse.swt.widgets.Text;
   4:         ...
   5:         
   6:         Table table = fTableViewer.getTable();
   7:         int index = table.getSelectionIndex() - fElements.size();
   8:         ...
   9:         fTableViewer.remove(elements);
  10:         table.setSelection(index);
  11:         

View Full Code Here
   1: import org.eclipse.swt.widgets.Composite;
   2: import org.eclipse.swt.widgets.Table;
   3: import org.eclipse.swt.widgets.TableItem;
   4:         ...
   5:     private Text text;
   6:     private Table table;
   7:     private Button acceptButton;
   8:         ...
   9:         boolean jobsChanged = didJobsChange(jobs);
  10:         declineButton.setSelection(!jobsChanged && declineButton.getSelection());
  11:         ...
  12:         acceptButton.setSelection(!jobsChanged && acceptButton.getSelection());

View Full Code Here
   1: import org.eclipse.swt.widgets.Shell;
   2: import org.eclipse.swt.widgets.Table;
   3: import org.eclipse.swt.widgets.TableItem;
   4:         ...
   5: 
   6:     private Table fLowerList;
   7: 
   8:         ...
   9: 
  10:     protected Table createLowerList(Composite parent) {
  11:         Table list = new Table(parent, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);
  12:         ...
  13:         if (i != fQualifierElements.length) {
  14:             fLowerList.setSelection(i);

View Full Code Here
   1: import org.eclipse.swt.widgets.Shell;
   2: import org.eclipse.swt.widgets.Table;
   3: import org.eclipse.swt.widgets.TableColumn;
   4:         ...
   5: 
   6:     protected abstract void addItems(Table table, WorkbenchPage page);
   7: 
   8:         ...
   9:         case 1:
  10:             table.setSelection(0);
  11:             break;
  12:         ...
  13:         default:
  14:             table.setSelection(gotoDirection ? 1 : table.getItemCount() - 1);

View Full Code Here
   1: import org.eclipse.swt.widgets.Display;
   2: import org.eclipse.swt.widgets.Table;
   3: import org.eclipse.swt.widgets.TableItem;
   4:         ...
   5: 
   6:             Table table = fFeatureTable.getTable();
   7:             int index = table.getSelectionIndex();
   8:         ...
   9:             } else if ( index < count ) {
  10:                 table.setSelection( index );
  11:             } else {
  12:         ...
  13:                 table.setSelection( count - 1 );

View Full Code Here
   1: import org.eclipse.swt.widgets.Control;
   2: import org.eclipse.swt.widgets.Table;
   3: import org.eclipse.ui.IEditorInput;
   4:         ...
   5:             
   6:             Table table = fPluginTable.getTable();
   7:             int index = table.getSelectionIndex();
   8:         ...
   9:             } else if ( index < count ) {
  10:                 table.setSelection( index );
  11:             } else {
  12:         ...
  13:                 table.setSelection( count - 1 );

View Full Code Here
   1: import org.eclipse.swt.widgets.Shell;
   2: import org.eclipse.swt.widgets.Table;
   3: import org.eclipse.swt.widgets.TableItem;
   4:         ...
   5: 
   6:     private Table perspectivesTable;
   7:     
   8:         ...
   9:         openSameWindowButton
  10:                 .setSelection(IPreferenceConstants.OPM_ACTIVE_PAGE == openPerspMode);
  11:         openSameWindowButton.setFont(font);
  12:         ...
  13:         openNewWindowButton
  14:                 .setSelection(IPreferenceConstants.OPM_NEW_WINDOW == openPerspMode);

View Full Code Here
   1: import org.eclipse.swt.widgets.Composite;
   2: import org.eclipse.swt.widgets.Table;
   3: import org.eclipse.swt.widgets.TableItem;
   4:         ...
   5:         fLastTab = 0;
   6:         fTabFolder.setSelection(fLastTab);
   7:     }
   8:         ...
   9:         boolean useAllPlugins = getTarget().useAllPlugins();
  10:         fUseAllPlugins.setSelection(useAllPlugins);
  11:         fTabFolder.setEnabled(!useAllPlugins);
  12:         ...
  13:         TablePart table = getTablePart();

View Full Code Here
   1: import org.eclipse.swt.widgets.Listener;
   2: import org.eclipse.swt.widgets.Table;
   3: import org.eclipse.swt.widgets.TableItem;
   4:         ...
   5:     
   6:     protected Table resourceTypeTable;
   7: 
   8:         ...
   9: 
  10:     protected Table editorTable;
  11: 
  12:         ...
  13:         if (resourceTypeTable.getItemCount() > 0) {
  14:             resourceTypeTable.setSelection(0);

View Full Code Here
   1: import org.eclipse.swt.widgets.Shell;
   2: import org.eclipse.swt.widgets.Table;
   3: import org.eclipse.swt.widgets.TableColumn;
   4:         ...
   5: 
   6:     private Table table;
   7: 
   8:         ...
   9:                     if (index != -1 && table.getItemCount() > index + 1) {
  10:                         table.setSelection(index + 1);
  11:                     }
  12:         ...
  13:                     if (index != -1 && index >= 1) {
  14:                         table.setSelection(index - 1);

View Full Code Here
   1: import org.eclipse.swt.widgets.Shell;
   2: import org.eclipse.swt.widgets.Table;
   3: import org.eclipse.swt.widgets.TableItem;
   4:         ...
   5:     private PopupCloser2 fPopupCloser= new PopupCloser2();
   6:     private Table fProposalTable;
   7:     private KeyListener fKeyListener;
   8:         ...
   9:         fProposalShell= new Shell(control.getShell(), SWT.ON_TOP);
  10:         fProposalTable= new Table(fProposalShell, SWT.H_SCROLL | SWT.V_SCROLL);
  11: 
  12:         ...
  13: 
  14:         fProposalTable.setSelection(index);

View Full Code Here
   1: import org.eclipse.swt.widgets.Shell;
   2: import org.eclipse.swt.widgets.Table;
   3: import org.eclipse.swt.widgets.TableItem;
   4:         ...
   5: 
   6:     Table resourceNames;
   7: 
   8:         ...
   9:     Table folderNames;
  10: 
  11:         ...
  12:             });
  13:             showDerivedButton.setSelection(getShowDerived());

View Full Code Here