Java Code Examples for org.eclipse.jface.resource.JFaceResources#DIALOG_FONT
The following examples show how to use
org.eclipse.jface.resource.JFaceResources#DIALOG_FONT .
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: XbaseInformationControl.java From xtext-eclipse with Eclipse Public License 2.0 | 6 votes |
/** * Creates and initializes the text layout used to compute the size hint. * * @since 3.2 */ private void createTextLayout() { fTextLayout = new TextLayout(fSashForm.getDisplay()); // Initialize fonts String symbolicFontName = fSymbolicFontName == null ? JFaceResources.DIALOG_FONT : fSymbolicFontName; Font font = JFaceResources.getFont(symbolicFontName); fTextLayout.setFont(font); fTextLayout.setWidth(-1); font = JFaceResources.getFontRegistry().getBold(symbolicFontName); fBoldStyle = new TextStyle(font, null, null); // Compute and set tab width fTextLayout.setText(" "); //$NON-NLS-1$ int tabWidth = fTextLayout.getBounds().width; fTextLayout.setTabs(new int[] { tabWidth }); fTextLayout.setText(""); //$NON-NLS-1$ }
Example 2
Source File: HoverControlCreator.java From typescript.java with MIT License | 6 votes |
@Override public IInformationControl doCreateInformationControl(Shell parent) { String tooltipAffordanceString = "Press F2 for focus"; if (BrowserInformationControl.isAvailable(parent)) { String font = JFaceResources.DIALOG_FONT; BrowserInformationControl iControl = new BrowserInformationControl( parent, font, tooltipAffordanceString) { /* * @see org.eclipse.jface.text.IInformationControlExtension5# * getInformationPresenterControlCreator() */ @Override public IInformationControlCreator getInformationPresenterControlCreator() { return fInformationPresenterControlCreator; } }; addLinkListener(iControl); return iControl; } else { return new DefaultInformationControl(parent, tooltipAffordanceString); } }
Example 3
Source File: CustomBrowserInformationControl.java From APICloud-Studio with GNU General Public License v3.0 | 6 votes |
/** * Creates and initializes the text layout used to compute the size hint. * * @since 3.2 */ private void createTextLayout() { fTextLayout = new TextLayout(fBrowser.getDisplay()); // Initialize fonts String symbolicFontName = fSymbolicFontName == null ? JFaceResources.DIALOG_FONT : fSymbolicFontName; Font font = JFaceResources.getFont(symbolicFontName); fTextLayout.setFont(font); fTextLayout.setWidth(-1); font = JFaceResources.getFontRegistry().getBold(symbolicFontName); fBoldStyle = new TextStyle(font, null, null); // Compute and set tab width fTextLayout.setText(" "); //$NON-NLS-1$ int tabWidth = fTextLayout.getBounds().width; fTextLayout.setTabs(new int[] { tabWidth }); fTextLayout.setText(""); //$NON-NLS-1$ }