List of usage examples for org.eclipse.jface.resource JFaceResources TEXT_FONT
String TEXT_FONT
To view the source code for org.eclipse.jface.resource JFaceResources TEXT_FONT.
Click Source Link
"org.eclipse.jface.textfont"
). From source file:com.twinsoft.convertigo.eclipse.views.loggers.EngineLogViewLabelProvider.java
License:Open Source License
public Font getFont(Object element, int columnIndex) { return JFaceResources.getFont(JFaceResources.TEXT_FONT); }
From source file:com.twinsoft.convertigo.eclipse.wizards.setup.LicensePage.java
License:Open Source License
public void createControl(Composite parent) { container = new Composite(parent, SWT.NONE); container.setLayout(new GridLayout(1, true)); Text licenseText = new Text(container, SWT.MULTI | SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL); licenseText.setEditable(false);/* w ww .j a v a2 s . c o m*/ Font terminalFont = JFaceResources.getFont(JFaceResources.TEXT_FONT); licenseText.setFont(terminalFont); GridData gd = new GridData(GridData.FILL_BOTH); licenseText.setLayoutData(gd); try { licenseText.setText(IOUtils.toString(this.getClass().getResourceAsStream("license.txt"), "utf8")); } catch (Exception e) { licenseText.setText("Unable to get the license text!\n" + e.getMessage()); } Label acceptation = new Label(container, SWT.WRAP); acceptation.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); acceptation.setText("BY INDICATING YOUR ACCEPTANCE BY CLICKING Accept license? BELOW, " + "OR INSTALLING OR USING THE SOFTWARE, YOU ARE AGREEING TO BE BOUND " + "BY THE TERMS OF THIS AGREEMENT."); Button acceptLicense = new Button(container, SWT.CHECK); acceptLicense.setText("Accept license"); acceptLicense.addSelectionListener(new SelectionListener() { public void widgetSelected(SelectionEvent e) { setPageComplete(((Button) e.widget).getSelection()); } public void widgetDefaultSelected(SelectionEvent e) { } }); setControl(container); setPageComplete(false); }
From source file:de.ovgu.cide.language.jdt.editor.inlineprojection.InlineProjectionAnnotationHover.java
License:Open Source License
public IInformationControlCreator getHoverControlCreator() { if (fInformationControlCreator != null) return fInformationControlCreator; return new IInformationControlCreator() { public IInformationControl createInformationControl(Shell parent) { return new SourceViewerInformationControl(parent, true, SWT.NONE, JFaceResources.TEXT_FONT); }/*from ww w . j a va 2 s . c o m*/ }; }
From source file:de.sebastianbenz.task.ui.highlighting.HighlightingConfiguration.java
License:Open Source License
@Override public TextStyle defaultTextStyle() { TextStyle result = super.defaultTextStyle().copy(); FontData fontData = new FontData(); fontData.setName(JFaceResources.TEXT_FONT); fontData.setHeight(DEFAULT_FONT_SIZE); result.setFontData(fontData);/*from w w w .jav a 2 s . c o m*/ return result; }
From source file:de.walware.docmlet.tex.internal.ui.preferences.LtxEditorTemplatesPreferencePage.java
License:Open Source License
@Override protected SourceViewer createViewer(final Composite parent) { final SourceViewer viewer = new SourceViewer(parent, null, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL); viewer.setEditable(false);// www. java2 s.c o m viewer.getTextWidget().setFont(JFaceResources.getFont(JFaceResources.TEXT_FONT)); final ViewerSourceEditorAdapter adapter = new ViewerSourceEditorAdapter(viewer, null); fViewerConfigurator.setTarget(adapter); // updater new SettingsUpdater(fViewerConfigurator, viewer.getControl()); new TextViewerJFaceUpdater(viewer, fViewerConfigurator.getSourceViewerConfiguration().getPreferences()); new TextViewerEditorColorUpdater(viewer, fViewerConfigurator.getSourceViewerConfiguration().getPreferences()); final IDocument document = new Document(); fViewerConfigurator.getDocumentSetupParticipant().setup(document); viewer.setDocument(document); return viewer; }
From source file:de.walware.ecommons.ui.components.WidgetToolsButton.java
License:Open Source License
private static void updateFont() { final FontRegistry fontRegistry = JFaceResources.getFontRegistry(); final Font dialogFont = fontRegistry.get(JFaceResources.DIALOG_FONT); final int size = 1 + Math.max(dialogFont.getFontData()[0].getHeight() * 3 / 5, 6); final FontDescriptor descriptor = fontRegistry.getDescriptor(JFaceResources.TEXT_FONT).setHeight(size); final Font toolFont = descriptor.createFont(Display.getCurrent()); fontRegistry.put(FONT_SYMBOLIC_NAME, toolFont.getFontData()); }
From source file:de.walware.statet.base.internal.ui.preferences.CodeGenerationTemplatesConfigurationBlock.java
License:Open Source License
private SourceViewer createViewer(final Composite parent) { final Label label = new Label(parent, SWT.LEFT); label.setText(Messages.CodeTemplates_Preview_label); label.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false)); final SourceViewer viewer = new SourceViewer(parent, null, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL); viewer.setEditable(false);/* w w w . j av a 2 s . co m*/ viewer.getTextWidget().setFont(JFaceResources.getFont(JFaceResources.TEXT_FONT)); new TextViewerEditorColorUpdater(viewer, EditorsUI.getPreferenceStore()); final IDocument document = new Document(); viewer.setDocument(document); final GridData data = new GridData(SWT.FILL, SWT.FILL, true, true); data.heightHint = new PixelConverter(viewer.getControl()).convertHeightInCharsToPixels(5); viewer.getControl().setLayoutData(data); fPatternEditor = new ViewerSourceEditorAdapter(viewer, null); new SettingsUpdater(new ISettingsChangedHandler() { @Override public void handleSettingsChanged(final Set<String> groupIds, final Map<String, Object> options) { if (fPatternConfigurator != null) { fPatternConfigurator.handleSettingsChanged(groupIds, options); } } }, viewer.getControl()); return viewer; }
From source file:de.walware.statet.base.ui.sourceeditors.ExtEditorTemplatesPage.java
License:Open Source License
@Override protected SourceViewer createPatternViewer(final Composite parent) { final SourceViewer viewer = new SourceViewer(parent, null, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL); viewer.setEditable(false);//from www.j a va 2 s. com viewer.getTextWidget().setFont(JFaceResources.getFont(JFaceResources.TEXT_FONT)); new TextViewerEditorColorUpdater(viewer, EditorsUI.getPreferenceStore()); final IDocument document = new Document(); viewer.setDocument(document); fPreviewEditor = new ViewerSourceEditorAdapter(viewer, null); new SettingsUpdater(new ISettingsChangedHandler() { @Override public void handleSettingsChanged(final Set<String> groupIds, final Map<String, Object> options) { if (fCurrentPreviewConfigurator != null) { fCurrentPreviewConfigurator.handleSettingsChanged(groupIds, options); } } }, viewer.getControl()); return viewer; }
From source file:de.walware.statet.nico.ui.console.NIConsole.java
License:Open Source License
protected String getSymbolicFontName() { return JFaceResources.TEXT_FONT; }
From source file:eclipse.testframework.ui.util.FailureDialog.java
License:Open Source License
protected Control createDialogArea(Composite parent) { // page group Composite composite = (Composite) super.createDialogArea(parent); composite.setSize(composite.computeSize(SWT.DEFAULT, SWT.DEFAULT)); Label label = new Label(composite, SWT.WRAP); label.setText("&Enter a note regarding the failure:"); _text = new Text(composite, SWT.MULTI | SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL); _text.setFont(JFaceResources.getFontRegistry().get(JFaceResources.TEXT_FONT)); GridData data = new GridData(GridData.FILL_BOTH); data.widthHint = SIZING_TEXT_WIDTH;/* w ww. j a v a 2 s.c o m*/ data.heightHint = SIZING_TEXT_HEIGHT; _text.setLayoutData(data); return composite; }