public class FontPreferencesImpl extends ModifiableFontPreferences
DEFAULT_FONT_NAME, DEFAULT_FONT_SIZE, DEFAULT_LINE_SPACING, FALLBACK_FONT_FAMILY, JETBRAINS_MONO, LINUX_DEFAULT_FONT_FAMILY, MAC_OS_DEFAULT_FONT_FAMILY, WINDOWS_DEFAULT_FONT_FAMILY
Constructor and Description |
---|
FontPreferencesImpl() |
Modifier and Type | Method and Description |
---|---|
void |
addFontFamily(java.lang.String fontFamily) |
void |
clear() |
void |
clearFonts() |
void |
copyTo(FontPreferences preferences) |
boolean |
equals(java.lang.Object o) |
java.lang.Runnable |
getChangeListener() |
java.util.List<java.lang.String> |
getEffectiveFontFamilies()
This method might return results different from
getRealFontFamilies() when
a font family unavailable at current environment
has been registered at the current font preferences object. |
java.lang.String |
getFontFamily() |
float |
getLineSpacing() |
java.util.List<java.lang.String> |
getRealFontFamilies() |
int |
getSize(java.lang.String fontFamily) |
int |
hashCode() |
boolean |
hasSize(java.lang.String fontName) |
void |
register(java.lang.String fontFamily,
int size) |
void |
resetFontSizes() |
void |
setChangeListener(java.lang.Runnable changeListener) |
void |
setEffectiveFontFamilies(java.util.List<java.lang.String> fontFamilies) |
void |
setFontSize(java.lang.String fontFamily,
int size) |
void |
setLineSpacing(float lineSpacing) |
void |
setRealFontFamilies(java.util.List<java.lang.String> fontFamilies) |
void |
setSize(java.lang.String fontFamily,
int size) |
void |
setTemplateFontSize(int size) |
void |
setUseLigatures(boolean useLigatures) |
java.lang.String |
toString() |
boolean |
useLigatures() |
getDefaultFontName, getFallbackName
public void setChangeListener(java.lang.Runnable changeListener)
public java.lang.Runnable getChangeListener()
public void clear()
clear
in class ModifiableFontPreferences
public void clearFonts()
clearFonts
in class ModifiableFontPreferences
public boolean hasSize(java.lang.String fontName)
hasSize
in class FontPreferences
public float getLineSpacing()
getLineSpacing
in class FontPreferences
public void setLineSpacing(float lineSpacing)
setLineSpacing
in class ModifiableFontPreferences
public int getSize(java.lang.String fontFamily)
getSize
in class FontPreferences
public void setSize(java.lang.String fontFamily, int size)
public java.util.List<java.lang.String> getEffectiveFontFamilies()
getRealFontFamilies()
when
a font family unavailable at current environment
has been registered
at the current font preferences object.
Effective fonts will hold fallback values for such font families then (exposed by the current method), 'real fonts' will
be available via getRealFontFamilies()
.getEffectiveFontFamilies
in class FontPreferences
public java.util.List<java.lang.String> getRealFontFamilies()
getRealFontFamilies
in class FontPreferences
getEffectiveFontFamilies()
public void register(java.lang.String fontFamily, int size)
register
in class ModifiableFontPreferences
public java.lang.String getFontFamily()
getFontFamily
in class FontPreferences
registered font families
(if any);
FontPreferences.DEFAULT_FONT_NAME
otherwisepublic void addFontFamily(java.lang.String fontFamily)
addFontFamily
in class ModifiableFontPreferences
public void copyTo(FontPreferences preferences)
copyTo
in class FontPreferences
public void resetFontSizes()
resetFontSizes
in class ModifiableFontPreferences
public void setFontSize(java.lang.String fontFamily, int size)
setFontSize
in class ModifiableFontPreferences
public void setTemplateFontSize(int size)
setTemplateFontSize
in class ModifiableFontPreferences
public void setEffectiveFontFamilies(java.util.List<java.lang.String> fontFamilies)
setEffectiveFontFamilies
in class ModifiableFontPreferences
public void setRealFontFamilies(java.util.List<java.lang.String> fontFamilies)
setRealFontFamilies
in class ModifiableFontPreferences
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public boolean useLigatures()
useLigatures
in class FontPreferences
public void setUseLigatures(boolean useLigatures)
setUseLigatures
in class ModifiableFontPreferences
public java.lang.String toString()
toString
in class java.lang.Object