/** * Reads the supplied string and returns its corresponding * FontData. If it cannot be read then the default FontData * will be returned. * * @param fontDataValue the string value for the font data * @return the font data */ public static FontData[] readFontData(String fontDataValue) { return basicGetFontData(fontDataValue); }
/** * Reads the supplied string and returns its corresponding * FontData. If it cannot be read then the default FontData * will be returned. * * @param fontDataValue the string value for the font data * @return the font data */ public static FontData[] readFontData(String fontDataValue) { return basicGetFontData(fontDataValue); }
/** * Reads the supplied string and returns its corresponding * FontData. If it cannot be read then the default FontData * will be returned. * * @param fontDataValue the string value for the font data * @return the font data */ public static FontData[] readFontData(String fontDataValue) { return basicGetFontData(fontDataValue); }
/** * Returns the current value of the font-valued preference with the * given name in the given preference store. * Returns the default-default value (<code>FONTDATA_ARRAY_DEFAULT_DEFAULT</code>) * if there is no preference with the given name, or if the current value * cannot be treated as font data. * * @param store the preference store * @param name the name of the preference * @return the font-valued preference */ public static FontData[] getFontDataArray(IPreferenceStore store, String name) { return basicGetFontData(store.getString(name)); }
/** * Returns the default value array for the font-valued preference * with the given name in the given preference store. * Returns the default-default value (<code>FONTDATA_ARRAY_DEFAULT_DEFAULT</code>) * is no default preference with the given name, or if the default * value cannot be treated as font data. * * @param store the preference store * @param name the name of the preference * @return the default value of the preference */ public static FontData[] getDefaultFontDataArray(IPreferenceStore store, String name) { return basicGetFontData(store.getDefaultString(name)); }
/** * Returns the default value array for the font-valued preference * with the given name in the given preference store. * Returns the default-default value (<code>FONTDATA_ARRAY_DEFAULT_DEFAULT</code>) * is no default preference with the given name, or if the default * value cannot be treated as font data. * * @param store the preference store * @param name the name of the preference * @return the default value of the preference */ public static FontData[] getDefaultFontDataArray(IPreferenceStore store, String name) { return basicGetFontData(store.getDefaultString(name)); }
/** * Returns the default value array for the font-valued preference * with the given name in the given preference store. * Returns the default-default value (<code>FONTDATA_ARRAY_DEFAULT_DEFAULT</code>) * is no default preference with the given name, or if the default * value cannot be treated as font data. * * @param store the preference store * @param name the name of the preference * @return the default value of the preference */ public static FontData[] getDefaultFontDataArray(IPreferenceStore store, String name) { return basicGetFontData(store.getDefaultString(name)); }
/** * Returns the current value of the font-valued preference with the * given name in the given preference store. * Returns the default-default value (<code>FONTDATA_ARRAY_DEFAULT_DEFAULT</code>) * if there is no preference with the given name, or if the current value * cannot be treated as font data. * * @param store the preference store * @param name the name of the preference * @return the font-valued preference */ public static FontData[] getFontDataArray(IPreferenceStore store, String name) { return basicGetFontData(store.getString(name)); }
/** * Returns the current value of the font-valued preference with the * given name in the given preference store. * Returns the default-default value (<code>FONTDATA_ARRAY_DEFAULT_DEFAULT</code>) * if there is no preference with the given name, or if the current value * cannot be treated as font data. * * @param store the preference store * @param name the name of the preference * @return the font-valued preference */ public static FontData[] getFontDataArray(IPreferenceStore store, String name) { return basicGetFontData(store.getString(name)); }
public static void populateDefinition(org.eclipse.e4.ui.css.swt.theme.ITheme cssTheme, ITheme theme, FontRegistry registry, FontDefinition definition, IPreferenceStore store) { String key = createPreferenceKey(cssTheme, theme, definition.getId()); String value = store.getString(key); if (!IPreferenceStore.STRING_DEFAULT_DEFAULT.equals(value)) { definition.appendState(ThemeElementDefinition.State.OVERRIDDEN); definition.appendState(ThemeElementDefinition.State.MODIFIED_BY_USER); registry.put(definition.getId(), PreferenceConverter.basicGetFontData(value)); } }
public static Font fontFromFontData(FontData[] fontDataArray) { if (fontDataArray != null && fontDataArray.length > 0) { String fontData = PreferenceConverter.getStoredRepresentation(fontDataArray); if (!JFaceResources.getFontRegistry().hasValueFor(fontData)) { FontData[] fData = PreferenceConverter.basicGetFontData(fontData); JFaceResources.getFontRegistry().put(fontData, fData); } Font font = JFaceResources.getFontRegistry().get(fontData); return font; } return null; }
if (getFontRegistry().hasValueFor(key)) { FontData[] data = event.getNewValue() instanceof String ? PreferenceConverter.basicGetFontData((String) event.getNewValue()) : (FontData[]) event.getNewValue();