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


Java CTabItem.setToolTipText方法代碼示例

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


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

示例1: addApplication

import org.eclipse.swt.custom.CTabItem; //導入方法依賴的package包/類
public void addApplication(int index, final IWorkbenchApplication app) {
	if (index < 0) {
		index = 0;
	}
	else if (index > tabFolder.getItemCount()) {
		index = tabFolder.getItemCount();
	}
	final CTabItem tabItem = new CTabItem(tabFolder, SWT.NONE, index);
	tabItem.setText(app.getLabel());
	tabItem.setImage(ImageHelper.getImage(
			app.getIcon(),
			PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJ_ELEMENT)));
	tabItem.setToolTipText(app.getTooltip());
	final WorkbenchApplicationTree appTree = new WorkbenchApplicationTree(tabFolder, app, this);
	final WorkbenchApplicationContext context = new WorkbenchApplicationContext(workbenchContext, app, appTree);
	tabItem.setControl(appTree);
	tabItem.setData(app);
	tabItem.addDisposeListener(new DisposeListener() {
		@Override
		public void widgetDisposed(final DisposeEvent e) {
			app.onDispose();
		}
	});
	app.onContextInitialize(context);
}
 
開發者ID:jo-source,項目名稱:jo-widgets,代碼行數:26,代碼來源:WorkbenchApplicationFolder.java

示例2: createCTabItem

import org.eclipse.swt.custom.CTabItem; //導入方法依賴的package包/類
public static CTabItem createCTabItem(CTabFolder tf, Control control, int style, String text, String tooltip) {
	CTabItem item = new CTabItem(tf, style);
	item.setText(text);
	item.setToolTipText(tooltip);
	item.setControl(control);
	
	return item;
}
 
開發者ID:Transkribus,項目名稱:TranskribusSwtGui,代碼行數:9,代碼來源:SWTUtil.java

示例3: createIdentifiersTabItem

import org.eclipse.swt.custom.CTabItem; //導入方法依賴的package包/類
private void createIdentifiersTabItem(CTabFolder folder) {
	CTabItem tbtmMain = new CTabItem(folder, SWT.NONE);
	tbtmMain.setText("IDs");
	tbtmMain.setToolTipText("External Identifiers");
	tbtmMain.setData("id", "id");

	final ScrolledComposite scrollComposite = new ScrolledComposite(folder,
			SWT.V_SCROLL | SWT.H_SCROLL | SWT.BORDER);
	final Composite idsComp = new Composite(scrollComposite, SWT.NONE);
	tbtmMain.setControl(scrollComposite);
	scrollComposite.setContent(idsComp);
	scrollComposite.setExpandVertical(true);
	scrollComposite.setExpandHorizontal(true);
	scrollComposite.addControlListener(new ControlAdapter() {
		@Override
		public void controlResized(ControlEvent e) {
			Rectangle r = scrollComposite.getClientArea();
			scrollComposite.setMinSize(idsComp.computeSize(r.width,
					SWT.DEFAULT));
		}
	});

	idsComp.setLayout(new GridLayout(
			BTSUIConstants.PASSPORT_COLUMN_NUMBER, true));
	((GridLayout) idsComp.getLayout()).marginWidth = 0;
	((GridLayout) idsComp.getLayout()).marginHeight = 0;


}
 
開發者ID:cplutte,項目名稱:bts,代碼行數:30,代碼來源:PassportEditorPart.java

示例4: createTabFolders

import org.eclipse.swt.custom.CTabItem; //導入方法依賴的package包/類
/**
  * Creates the contents
  * 
  * @param shell the parent shell
  */
 private void createTabFolders(Composite tabComposite) {
   // Create the containing tab folder
tabFolder = new CTabFolder(tabComposite, SWT.NONE);
tabFolder.setLayout(new FillLayout());
//tabFolder.setSimple(false);
tabFolder.setLayoutData(new GridData(GridData.FILL_BOTH));

   // Create each tab and set its text, tool tip text,
   // image, and control
   tabItemMets = new CTabItem(tabFolder, SWT.FILL);
   tabItemMets.setText("Mets");
   tabItemMets.setToolTipText("Set export options for METS export");
   tabItemMets.setControl(getTabOneControl(tabFolder));

   tabItemPDF = new CTabItem(tabFolder, SWT.FILL);
   tabItemPDF.setText("PDF");
   tabItemPDF.setToolTipText("Set export options for PDF export");
   tabItemPDF.setControl(getTabTwoControl(tabFolder));
   
   tabItemTEI = new CTabItem(tabFolder, SWT.FILL);
   tabItemTEI.setText("TEI");
   tabItemTEI.setToolTipText("Set export options for TEI export");
   tabItemTEI.setControl(getTabThreeControl(tabFolder));

   tabItemDOCX = new CTabItem(tabFolder, SWT.FILL);
   tabItemDOCX.setText("DOCX");
   tabItemDOCX.setToolTipText("Set export options for DOCX export");
   tabItemDOCX.setControl(getTabFourControl(tabFolder));
   
   tabFolder.setSelectionBackground(new Color[]{shell.getDisplay().getSystemColor(SWT.COLOR_TITLE_INACTIVE_BACKGROUND_GRADIENT), shell.getDisplay().getSystemColor(SWT.COLOR_TITLE_BACKGROUND)}, new int[]{100}, true);
   tabFolder.pack();
   
   if (!isMetsExport()){
   	recursiveSetEnabled(tabItemMets.getControl(), false);
   }
   if (!isPdfExport())
   	recursiveSetEnabled(tabItemPDF.getControl(), false);
   if(!isTeiExport())
   	recursiveSetEnabled(tabItemTEI.getControl(), false);
   if(!isDocxExport())
   	recursiveSetEnabled(tabItemDOCX.getControl(), false);
   
   showTab(0);

 }
 
開發者ID:Transkribus,項目名稱:TranskribusSwtGui,代碼行數:51,代碼來源:CommonExportDialog.java


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