Package org.omegat.util.gui
Class ViewFactoryHelper
java.lang.Object
org.omegat.util.gui.ViewFactoryHelper
- All Implemented Interfaces:
ViewFactory
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGenerates a default mapping between element names and their corresponding view creation functions.
-
Constructor Details
-
ViewFactoryHelper
-
-
Method Details
-
create
- Specified by:
createin interfaceViewFactory
-
getDefaultMappings
public static Map<String,Function<Element, getDefaultMappingsView>> (Function<Element, View> contentCreator, Function<Element, View> paragraphCreator) Generates a default mapping between element names and their corresponding view creation functions.These mappings are used to render the document elements with appropriate view types.
- Parameters:
contentCreator- a function that creates a view for content elementsparagraphCreator- a function that creates a view for paragraph elements- Returns:
- a map associating element names with their corresponding view creation functions
-