List of usage examples for org.eclipse.jface.resource JFaceResources DEFAULT_FONT
String DEFAULT_FONT
To view the source code for org.eclipse.jface.resource JFaceResources DEFAULT_FONT.
Click Source Link
"org.eclipse.jface.defaultfont"
). From source file:org.eclipse.emf.validation.debug.ui.view.AbstractNodeLabelProvider.java
License:Open Source License
public Font getFont(Object element) { if (element instanceof ResultConstrainingNode) { return null; } else if (element instanceof ResultValidatableNode) { return JFaceResources.getFontRegistry().getItalic(JFaceResources.DEFAULT_FONT); } else if (element instanceof ConstrainingNode) { return JFaceResources.getFontRegistry().getItalic(JFaceResources.DEFAULT_FONT); } else {/*from ww w.jav a 2 s . c o m*/ return null; } }
From source file:org.eclipse.graphiti.ui.internal.util.draw2d.Tooltip.java
License:Open Source License
private Font getBoldFont() { return JFaceResources.getFontRegistry().getBold(JFaceResources.DEFAULT_FONT); }
From source file:org.eclipse.incquery.tooling.localsearch.ui.debugger.provider.MatchesTableLabelProvider.java
License:Open Source License
public MatchesTableLabelProvider(int i, boolean parameter, TableViewer viewer) { this.columnIndex = i; this.viewer = viewer; if (parameter) { FontRegistry fregistry = JFaceResources.getFontRegistry(); boldFont = fregistry.getBold(JFaceResources.DEFAULT_FONT); }//from w w w. jav a 2 s .co m }
From source file:org.eclipse.jdt.ui.examples.JavaElementLightweightDecorator.java
License:Open Source License
public JavaElementLightweightDecorator() { final FontRegistry fontRegistry = PlatformUI.getWorkbench().getThemeManager().getCurrentTheme() .getFontRegistry();//from w w w . j a v a2 s .c o m Display.getDefault().syncExec(new Runnable() { public void run() { fColor = new Color(Display.getDefault(), 100, 100, 100); fBold = fontRegistry.getBold(JFaceResources.DEFAULT_FONT); } }); fListener = new FileBufferListener(); FileBuffers.getTextFileBufferManager().addFileBufferListener(fListener); fChangedResources = new HashSet(); }
From source file:org.eclipse.jst.jsf.common.ui.internal.utils.StyleCombo.java
License:Open Source License
/** * Sets the receiver's list to be the given array of items. * /*www . ja va2 s. c o m*/ * @param items * the array of items * * @exception IllegalArgumentException * <ul> * <li>ERROR_NULL_ARGUMENT - if the items array is null</li> * <li>ERROR_INVALID_ARGUMENT - if an item in the items * array is null</li> * </ul> * @exception org.eclipse.swt.SWTException * <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been * disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the * thread that created the receiver</li> * </ul> */ public void setItems(String[] items) { checkWidget(); if (items == null) { SWT.error(SWT.ERROR_NULL_ARGUMENT); } for (int i = 0; i < items.length; i++) { TableItem item = new TableItem(table, SWT.NONE); if (items[i].equals(defaultValue)) { item.setFont(JFaceResources.getFontRegistry().getBold(JFaceResources.DEFAULT_FONT)); } item.setText(0, items[i]); } }
From source file:org.eclipse.jst.jsf.common.ui.internal.utils.StyleCombo.java
License:Open Source License
/** * @param defaultValue//www . j a v a2s . c o m */ public void setDefaultValue(String defaultValue) { this.defaultValue = defaultValue; int index = Arrays.asList(getTableItems()).indexOf(defaultValue); if (index != -1) { table.getItem(index).setFont(JFaceResources.getFontRegistry().getBold(JFaceResources.DEFAULT_FONT)); } }
From source file:org.eclipse.jst.jsf.facesconfig.ui.preference.BaseFigureDecorator.java
License:Open Source License
public Font getFont() { Font localFont = getLocalFont(); if (localFont == null) { localFont = JFaceResources.getFontRegistry().get(JFaceResources.DEFAULT_FONT); // TODO: it's not clear that setFont is correct to call // here since this does a revalidate if the font changes // whereas the deprecated assignment to font that it replaces // does not setFont(localFont);//from www . j a v a2 s . c o m } return localFont; }
From source file:org.eclipse.jst.jsf.facesconfig.ui.preference.GEMPreferences.java
License:Open Source License
/** * Sets the default values of the preferences. *///from w ww . j a v a 2 s . co m public static void initializeDefaults() { IPreferenceStore store = EditorPlugin.getDefault().getPreferenceStore(); Font f = JFaceResources.getFontRegistry().get(JFaceResources.DEFAULT_FONT); store.setDefault(SHOW_INTRO_EDITOR, true); store.setDefault(USE_SYSTEM_COLORS, true); PreferenceConverter.setDefault(store, CANVAS_COLOR, new RGB(255, 255, 255)); PreferenceConverter.setDefault(store, FIGURE_LABEL_FONT, f.getFontData()); store.setDefault(LINE_WIDTH, 1); store.setDefault(LINE_ROUTING, getLineRoutingLabels()[0][1]); store.setDefault(SHOW_LINE_LABELS, true); PreferenceConverter.setDefault(store, LINE_COLOR, new RGB(0, 0, 0)); PreferenceConverter.setDefault(store, LINE_LABEL_COLOR, new RGB(255, 255, 255)); PreferenceConverter.setDefault(store, LINE_LABEL_FONT, f.getFontData()); store.setDefault(SNAP_TO_GEOMETRY, true); store.setDefault(SNAP_TO_GRID, true); store.setDefault(GRID_WIDTH, 12); store.setDefault(GRID_HEIGHT, 12); PreferenceConverter.setDefault(store, GRID_COLOR, new RGB(230, 230, 230)); store.setDefault(LABEL_PLACEMENT, LABEL_PLACEMENT_BOTTOM); }
From source file:org.eclipse.jst.jsf.facesconfig.ui.preference.IconFigure.java
License:Open Source License
public Font getFont() { if (defaultFont == null) { defaultFont = JFaceResources.getFontRegistry().get(JFaceResources.DEFAULT_FONT); }//from w w w . jav a 2s. c o m if (getLocalFont() == null) { // TODO: replaced a deprecated assignment to font // with this, but the behaviour is a little different setFont(defaultFont); } return getLocalFont(); }
From source file:org.eclipse.jst.jsf.facesconfig.ui.preference.TabbedTitleBarBorder.java
License:Open Source License
/** * @return Returns the font.//from w w w .ja va2 s.co m */ public Font getFont() { if (font == null) { font = parent.getFont(); if (font == null) font = JFaceResources.getFontRegistry().get(JFaceResources.DEFAULT_FONT); } return font; }