當前位置: 首頁>>代碼示例>>Java>>正文


Java CTabItem.dispose方法代碼示例

本文整理匯總了Java中org.eclipse.swt.custom.CTabItem.dispose方法的典型用法代碼示例。如果您正苦於以下問題:Java CTabItem.dispose方法的具體用法?Java CTabItem.dispose怎麽用?Java CTabItem.dispose使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.eclipse.swt.custom.CTabItem的用法示例。


在下文中一共展示了CTabItem.dispose方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: closeTabWithDatFile

import org.eclipse.swt.custom.CTabItem; //導入方法依賴的package包/類
public void closeTabWithDatFile(DatFile df) {
    if (View.DUMMY_DATFILE.equals(df) || df == null) {
        return;
    }
    for (CTabItem ti : tabFolder_OpenDatFiles[0].getItems()) {
        if (df.equals(ti.getData())) {
            ti.dispose();
            Project.removeOpenedFile(df);
            if (!closeDatfile(df)) {
                Project.addOpenedFile(df);
                updateTabs();
            }
            Editor3DWindow.getWindow().getShell().forceFocus();
            regainFocus();
            break;
        }
    }
}
 
開發者ID:nilsschmidt1337,項目名稱:ldparteditor,代碼行數:19,代碼來源:Editor3DWindow.java

示例2: closeView

import org.eclipse.swt.custom.CTabItem; //導入方法依賴的package包/類
@Override
public void closeView() {
	try {

		// In theory mdi.closeEntry will dispose of the swtItem (ctabitem or other)
		// via #close(false).  Not sure what happens to composite though,
		// so I don't know fi that TYPE_DESTROY actually gets called
		// The CTabItem scan seems pointless now, though

		Composite c = getComposite();

		if (c != null && !c.isDisposed()) {

			Composite parent = c.getParent();

			triggerEvent(UISWTViewEvent.TYPE_DESTROY, null);

			if (parent instanceof CTabFolder) {

				for (CTabItem item : ((CTabFolder) parent).getItems()) {

					if (item.getControl() == c) {

						item.dispose();
					}
				}
			}
		}
	} catch (Throwable e) {
		Debug.out(e);
	}

}
 
開發者ID:BiglySoftware,項目名稱:BiglyBT,代碼行數:34,代碼來源:UISWTViewImpl.java

示例3: disposeOrphanItems

import org.eclipse.swt.custom.CTabItem; //導入方法依賴的package包/類
public void disposeOrphanItems() {
	if(!this.isDisposed()) {
		List<TGDocument> documents = TGDocumentListManager.getInstance(this.context).getDocuments();
		while( this.tabItems.size() > documents.size() ) {
			int index = (this.tabItems.size() - 1);
			CTabItem cTabItem = this.tabItems.get(index);
			cTabItem.dispose();
			this.tabItems.remove(index);
		}
	}
}
 
開發者ID:theokyr,項目名稱:TuxGuitar-1.3.1-fork,代碼行數:12,代碼來源:TGTabFolder.java

示例4: reload

import org.eclipse.swt.custom.CTabItem; //導入方法依賴的package包/類
public void reload() {
	logger.info("reloading vkeyboard tab list...");
	
	for (CTabItem c : getItems()) {
		if (c!=null && !c.isDisposed())
			c.dispose();
	}

	try {
		logger.info("loading virtual keyboards from file: "+VK_XML.getAbsolutePath());
		
		conf = new XMLPropertiesConfiguration();
		conf.setEncoding("UTF-8");
		conf.setFile(VK_XML);
		conf.load();
		conf.setAutoSave(true);
		
		List<UnicodeList> unicodeLists = loadVirtualKeyboardsXml(conf);
		for (UnicodeList ul : unicodeLists) {
			addVirtualKeyboardTab(ul);
		}
	} catch (Exception e) {
		logger.error(e.getMessage(), e);
	}
	
	if (getItemCount()>0)
		setSelection(0);
	
}
 
開發者ID:Transkribus,項目名稱:TranskribusSwtGui,代碼行數:30,代碼來源:TrpVirtualKeyboardsTabWidget.java

示例5: removeTabItem

import org.eclipse.swt.custom.CTabItem; //導入方法依賴的package包/類
private static void removeTabItem(String tabName) {
    for (int i = 0; i < tabContent.getItemCount(); i++) {
        CTabItem item = tabContent.getItem(i);
        String name = item.getText();
        if (name.contains("*")) {
            if (name.substring(1, name.length()).equals(tabName)) {
                item.dispose();
            }
        } else {
            if (name.equals(tabName)) {
                item.dispose();
            }
        }
    }
}
 
開發者ID:hoozheng,項目名稱:AndroidRobot,代碼行數:16,代碼來源:AndroidRobot.java

示例6: closeTabWithDatfile

import org.eclipse.swt.custom.CTabItem; //導入方法依賴的package包/類
public void closeTabWithDatfile(DatFile e) {
    CTabItem[] items =  tabFolder[0].getItems().clone();
    for (CTabItem item : items) {
        CompositeTab cTab = (CompositeTab) item;
        if (cTab.getState().getFileNameObj().equals(e)) {
            item.dispose();
        }
    }
    if (isSeperateWindow() && tabFolder[0].getItemCount() == 0) {
        Project.getOpenTextWindows().remove(this);
        close();
    }
}
 
開發者ID:nilsschmidt1337,項目名稱:ldparteditor,代碼行數:14,代碼來源:EditorTextWindow.java

示例7: removeItem

import org.eclipse.swt.custom.CTabItem; //導入方法依賴的package包/類
@Override
public void removeItem(final int index) {
    final CTabItem item = getUiReference().getItem(index);
    items.remove(item);
    final Control control = item.getControl();
    if (control != null && !control.isDisposed()) {
        control.dispose();
    }
    item.dispose();
}
 
開發者ID:jo-source,項目名稱:jo-widgets,代碼行數:11,代碼來源:TabFolderImpl.java

示例8: removeApplication

import org.eclipse.swt.custom.CTabItem; //導入方法依賴的package包/類
public void removeApplication(final IWorkbenchApplication app) {
	for (final CTabItem item : tabFolder.getItems()) {
		if (item.getData() == app) {
			// unselect to clear perspective
			final WorkbenchApplicationTree tree = (WorkbenchApplicationTree) item.getControl();
			tree.clearSelection(true);
			tree.dispose();
			item.dispose();
			break;
		}
	}
}
 
開發者ID:jo-source,項目名稱:jo-widgets,代碼行數:13,代碼來源:WorkbenchApplicationFolder.java

示例9: closeAllTabs

import org.eclipse.swt.custom.CTabItem; //導入方法依賴的package包/類
public void closeAllTabs() {
    CTabItem[] items =  tabFolder[0].getItems().clone();
    for (CTabItem item : items) {
        item.dispose();
    }
}
 
開發者ID:nilsschmidt1337,項目名稱:ldparteditor,代碼行數:7,代碼來源:EditorTextWindow.java


注:本文中的org.eclipse.swt.custom.CTabItem.dispose方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。