Java Code Examples for org.eclipse.swt.widgets.TabItem#getData()
The following examples show how to use
org.eclipse.swt.widgets.TabItem#getData() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: EditboxPreferencePage.java From gama with GNU General Public License v3.0 | 6 votes |
@Override public void widgetSelected(final SelectionEvent e) { final int i = categoryList.getSelectionIndex(); if (i > -1) { final String name = categoryList.getItem(i); categoryList.remove(i); categoryFiles.remove(name); namesList.setItems(new String[0]); bAddFile.setEnabled(false); final TabItem ti = folder.getItem(i + 1); final Object o = ti.getData(); ti.dispose(); if (o instanceof BoxSettingsTab) { ((BoxSettingsTab) o).dispose(); } BoxProviderRegistry.getInstance().removeProvider(name); providersChanged = true; } }
Example 2
Source File: NativeTabProvider.java From neoscada with Eclipse Public License 1.0 | 5 votes |
private int findIndex ( final int index ) { final TabItem[] items = this.folder.getItems (); for ( int i = 0; i < items.length; i++ ) { final TabItem item = items[i]; final int order = (Integer)item.getData ( "order" ); if ( order > index ) { return i; } } return -1; }
Example 3
Source File: BuildPathsBlock.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 5 votes |
private void tabChanged(Widget widget) { if (widget instanceof TabItem) { TabItem tabItem= (TabItem) widget; BuildPathBasePage newPage= (BuildPathBasePage) tabItem.getData(); if (fCurrPage != null) { List<?> selection= fCurrPage.getSelection(); if (!selection.isEmpty()) { newPage.setSelection(selection, false); } } fCurrPage= newPage; fPageIndex= tabItem.getParent().getSelectionIndex(); } }