Module org.jhotdraw8.fxcontrols
Class DefaultFontCollectionsFactory
java.lang.Object
org.jhotdraw8.fxcontrols.fontchooser.DefaultFontCollectionsFactory
- All Implemented Interfaces:
FontCollectionsFactory
- Direct Known Subclasses:
MacOSFontCollectionsFactory
DefaultFontCollectionsFactory.
- Author:
- Werner Randelshofer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic @NonNull ArrayList<FontFamily> collectFamiliesNamed(@NonNull List<FontFamily> allFamilies, String... names) create()Creates a FontChooserModel.protected @NonNull javafx.collections.ObservableList<FontCollection> generateCollections(@NonNull List<FontFamily> families) Groups a list of font families into collections.protected @NonNull List<FontFamily> Loads all Fonts that are available to JavaFX.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jhotdraw8.fxcontrols.fontchooser.FontCollectionsFactory
createAsync
-
Constructor Details
-
DefaultFontCollectionsFactory
public DefaultFontCollectionsFactory()
-
-
Method Details
-
create
Creates a FontChooserModel.This is an IO intensive operation and should therefore not be called on the JavaFX Application Thread.
- Specified by:
createin interfaceFontCollectionsFactory- Returns:
- a FontChooserModel.
-
loadFonts
Loads all Fonts that are available to JavaFX.- Returns:
- the list of fonts
-
generateCollections
protected @NonNull javafx.collections.ObservableList<FontCollection> generateCollections(@NonNull List<FontFamily> families) Groups a list of font families into collections.This implementation uses a hardcoded set of collections.
- Parameters:
families- a list of font families- Returns:
- a collection of font families
-
collectFamiliesNamed
public static @NonNull ArrayList<FontFamily> collectFamiliesNamed(@NonNull List<FontFamily> allFamilies, String... names)
-