List of usage examples for org.eclipse.jface.resource JFaceResources getFontRegistry
public static FontRegistry getFontRegistry()
From source file:de.walware.statet.nico.ui.console.NIConsole.java
License:Open Source License
@Override protected void dispose() { super.dispose(); final DebugPlugin debugPlugin = DebugPlugin.getDefault(); if (debugPlugin != null) { debugPlugin.removeDebugEventListener(fDebugListener); }/* w w w . j a v a 2 s .c o m*/ fDebugListener = null; final SettingsChangeNotifier changeNotifier = PreferencesUtil.getSettingsChangeNotifier(); if (changeNotifier != null) { changeNotifier.removeChangeListener(fSettingsListener); } final FontRegistry fontRegistry = JFaceResources.getFontRegistry(); if (fontRegistry != null) { fontRegistry.removeListener(fSettingsListener); } disconnect(); }
From source file:de.walware.statet.r.internal.ui.datafilterview.ColumnLabelProvider.java
License:Open Source License
protected Font getInfoFont() { if (fInfoFont == null) { fInfoFont = JFaceResources.getFontRegistry().getItalic(JFaceResources.DIALOG_FONT); } return fInfoFont; }
From source file:de.walware.statet.r.internal.ui.datafilterview.IntervalClient.java
License:Open Source License
@Override protected void addWidgets() { fScaleControl = new WaScale(this, SWT.HORIZONTAL); fScaleControl.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 5, 1)); fLowerBoundControl = new Text(this, SWT.BORDER); fLowerBoundControl.setLayoutData(/* w ww.jav a 2s .c o m*/ LayoutUtil.hintWidth(new GridData(SWT.FILL, SWT.CENTER, true, false), fLowerBoundControl, 10)); fLowerBoundControl.setToolTipText(Messages.Interval_LowerBound_tooltip); LayoutUtil.addGDDummy(this, true); fNAControl = new Button(this, SWT.CHECK); fNAControl.setText("NA"); //$NON-NLS-1$ fNAControl.setFont(JFaceResources.getFontRegistry().getItalic(JFaceResources.DIALOG_FONT)); fNAControl.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false)); LayoutUtil.addGDDummy(this, true); fUpperBoundControl = new Text(this, SWT.BORDER); fUpperBoundControl.setLayoutData( LayoutUtil.hintWidth(new GridData(SWT.FILL, SWT.CENTER, true, false), fLowerBoundControl, 10)); fUpperBoundControl.setToolTipText(Messages.Interval_UpperBound_tooltip); }
From source file:de.walware.statet.r.internal.ui.intable.PresentationConfig.java
License:Open Source License
public PresentationConfig(final Display display) { final FontRegistry jFaceFontRegistry = JFaceResources.getFontRegistry(); final ColorRegistry jFaceColorRegistry = JFaceResources.getColorRegistry(); fHeaderGridColor = display.getSystemColor(SWT.COLOR_DARK_GRAY); fHeaderBackgroundColor = display.getSystemColor(SWT.COLOR_WIDGET_BACKGROUND); fHeaderForegroundColor = display.getSystemColor(SWT.COLOR_WIDGET_FOREGROUND); fBodyGridColor = display.getSystemColor(SWT.COLOR_GRAY); fBodyBackgroundColor = display.getSystemColor(SWT.COLOR_LIST_BACKGROUND); fBodyEvenRowBackgroundColor = fBodyBackgroundColor; fBodyOddRowBackgroundColor = new Color(display, ColorUtil.blend(display.getSystemColor(SWT.COLOR_WIDGET_LIGHT_SHADOW).getRGB(), fBodyEvenRowBackgroundColor.getRGB(), 20)); fBodyForegroundColor = display.getSystemColor(SWT.COLOR_LIST_FOREGROUND); fHeaderSelectionBackgroundColor = new Color(display, ColorUtil.blend( display.getSystemColor(SWT.COLOR_LIST_SELECTION).getRGB(), fHeaderBackgroundColor.getRGB(), 25)); fHeaderSelectionForegroundColor = fHeaderForegroundColor; fHeaderPlaceholderColor = new Color(display, ColorUtil.blend(fBodyGridColor.getRGB(), fHeaderBackgroundColor.getRGB(), 25)); fHeaderFullSelectionBackgroundColor = new Color(display, ColorUtil.blend(display.getSystemColor(SWT.COLOR_LIST_SELECTION).getRGB(), display.getSystemColor(SWT.COLOR_WIDGET_NORMAL_SHADOW).getRGB(), 25)); fHeaderFullSelectionForegroundColor = display.getSystemColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW); fBodySelectionBackgroundColor = display.getSystemColor(SWT.COLOR_LIST_SELECTION); fBodySelectionForegroundColor = display.getSystemColor(SWT.COLOR_LIST_SELECTION_TEXT); fBodyFreezeSeparatorColor = jFaceColorRegistry.get(JFacePreferences.DECORATIONS_COLOR); fHeaderLayerPainter = new GridLineCellLayerPainter(fHeaderGridColor); fHeaderLabelLayerPainter = new CornerGridLineCellLayerPainter(fHeaderGridColor); fBodyAnchorBorderStyle = new BorderStyle(2, fBodyForegroundColor, LineStyle.SOLID, -1); fBaseFont = jFaceFontRegistry.get(JFaceResources.DIALOG_FONT); fInfoFont = jFaceFontRegistry.getItalic(JFaceResources.DIALOG_FONT); {/*w w w . j a v a2 s . c om*/ final GC gc = new GC(display); gc.setFont(fBaseFont); final FontMetrics fontMetrics = gc.getFontMetrics(); final int textHeight = fontMetrics.getHeight(); final int charWidth = (gc.textExtent("1234567890.-120").x + 5) / 15; gc.dispose(); final int textSpace = 3; fBaseSizeConfig = new LayoutSizeConfig(textSpace, textHeight, charWidth); } fBaseCellPainter = new LineBorderDecorator(new RTextPainter(fBaseSizeConfig.getDefaultSpace())); fHeaderCellPainter = new RTextPainter(fBaseSizeConfig.getDefaultSpace()); fHeaderSortedCellPainter = new SortableHeaderTextPainter( new RTextPainter(fBaseSizeConfig.getDefaultSpace()), true, true); fHeaderCornerCellPainter = new DiagCellPainter(fHeaderGridColor); }
From source file:de.walware.statet.r.internal.ui.rhelp.RHelpInfoHoverCreator.java
License:Open Source License
RHelpInfoControl(final Shell shell, final int mode) { super(shell, ""); //$NON-NLS-1$ assert ((mode & MODE_FOCUS) == 0); fMode = mode;/*from w w w . jav a2 s . com*/ JFaceResources.getFontRegistry().addListener(this); create(); }
From source file:de.walware.statet.r.internal.ui.rhelp.RHelpInfoHoverCreator.java
License:Open Source License
@Override public void dispose() { JFaceResources.getFontRegistry().removeListener(this); fHandlerCollection.dispose(); super.dispose(); }
From source file:de.walware.statet.r.internal.ui.rhelp.RHelpUIServlet.java
License:Open Source License
@Override public void init(final ServletConfig config) throws ServletException { super.init(config); fRCodeScanner = new RHelpRCodeScanner(RUIPlugin.getDefault().getEditorPreferenceStore()); EditorsUI.getPreferenceStore().addPropertyChangeListener(this); JFaceResources.getFontRegistry().addListener(this); JFaceResources.getColorRegistry().addListener(this); PreferencesUtil.getSettingsChangeNotifier().addChangeListener(this); updateStyles();/*from www. ja v a 2 s . c om*/ }
From source file:de.walware.statet.r.internal.ui.rhelp.RHelpUIServlet.java
License:Open Source License
@Override public void destroy() { super.destroy(); final IPreferenceStore preferenceStore = EditorsUI.getPreferenceStore(); if (preferenceStore != null) { preferenceStore.removePropertyChangeListener(this); }// w w w . j a v a 2s. co m JFaceResources.getFontRegistry().removeListener(this); JFaceResources.getColorRegistry().removeListener(this); PreferencesUtil.getSettingsChangeNotifier().removeChangeListener(this); }
From source file:de.walware.statet.r.ui.rtool.RElementInfoHoverCreator.java
License:Open Source License
public RElementInfoControl(final Shell shell) { super(shell, ""); fMode = MODE_SIMPLE;/*from w ww. j a v a2s . c o m*/ JFaceResources.getFontRegistry().addListener(this); create(); }
From source file:de.walware.statet.r.ui.rtool.RElementInfoHoverCreator.java
License:Open Source License
@Override public void dispose() { JFaceResources.getFontRegistry().removeListener(this); super.dispose(); }