本文整理匯總了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);
}
示例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;
}
示例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;
}
示例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);
}