本文整理汇总了Java中groovy.util.Factory类的典型用法代码示例。如果您正苦于以下问题:Java Factory类的具体用法?Java Factory怎么用?Java Factory使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Factory类属于groovy.util包,在下文中一共展示了Factory类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: SwingBuilderCustomizer
import groovy.util.Factory; //导入依赖的package包/类
@SuppressWarnings("unchecked")
public SwingBuilderCustomizer() {
SwingBuilder builder = new SwingBuilder();
Map<String, Factory> factories = new LinkedHashMap<>(builder.getFactories());
factories.put("application", new ApplicationFactory());
setFactories(factories);
setVariables(builder.getVariables());
setMethods(builder.getExplicitMethods());
setProps(builder.getExplicitProperties());
setAttributeDelegates(builder.getAttributeDelegates());
setPreInstantiateDelegates(builder.getPreInstantiateDelegates());
setPostInstantiateDelegates(builder.getPostInstantiateDelegates());
setPostNodeCompletionDelegates(builder.getPostNodeCompletionDelegates());
// setDisposalClosures(builder.getDisposalClosures());
setMethodMissingDelegate(builder.getMethodMissingDelegate());
setPropertyMissingDelegate(builder.getPropertyMissingDelegate());
}
示例2: FatcowIconsSwingBuilderCustomizer
import groovy.util.Factory; //导入依赖的package包/类
public FatcowIconsSwingBuilderCustomizer() {
Map<String, Factory> factories = new LinkedHashMap<>();
factories.put("fatcowIcon", new FatcowIconFactory());
setFactories(factories);
}
开发者ID:griffon-plugins,项目名称:griffon-fatcowicons-plugin,代码行数:6,代码来源:FatcowIconsSwingBuilderCustomizer.java
示例3: FatcowIconsJavaFXBuilderCustomizer
import groovy.util.Factory; //导入依赖的package包/类
public FatcowIconsJavaFXBuilderCustomizer() {
Map<String, Factory> factories = new LinkedHashMap<>();
factories.put("fatcowIcon", new FatcowIconFactory());
setFactories(factories);
}
开发者ID:griffon-plugins,项目名称:griffon-fatcowicons-plugin,代码行数:6,代码来源:FatcowIconsJavaFXBuilderCustomizer.java
示例4: FontAwesomeSwingBuilderCustomizer
import groovy.util.Factory; //导入依赖的package包/类
public FontAwesomeSwingBuilderCustomizer() {
Map<String, Factory> factories = new LinkedHashMap<>();
factories.put("fontAwesomeIcon", new FontAwesomeIconFactory());
setFactories(factories);
}
开发者ID:griffon-plugins,项目名称:griffon-fontawesome-plugin,代码行数:6,代码来源:FontAwesomeSwingBuilderCustomizer.java
示例5: FontAwesomeJavaFXBuilderCustomizer
import groovy.util.Factory; //导入依赖的package包/类
public FontAwesomeJavaFXBuilderCustomizer() {
Map<String, Factory> factories = new LinkedHashMap<>();
factories.put("fontAwesomeIcon", new FontAwesomeIconFactory());
setFactories(factories);
}
开发者ID:griffon-plugins,项目名称:griffon-fontawesome-plugin,代码行数:6,代码来源:FontAwesomeJavaFXBuilderCustomizer.java
示例6: getFactories
import groovy.util.Factory; //导入依赖的package包/类
@Nonnull
public Map<String, Factory> getFactories() {
return unmodifiableMap(factories);
}
示例7: setFactories
import groovy.util.Factory; //导入依赖的package包/类
public void setFactories(@Nonnull Map<String, Factory> factories) {
requireNonNull(factories, "Argument 'factories' cannot be null");
this.factories.clear();
this.factories.putAll(factories);
}
示例8: doRegisterFactories
import groovy.util.Factory; //导入依赖的package包/类
private void doRegisterFactories(@Nonnull BuilderCustomizer customizer) {
for (Map.Entry<String, Factory> entry : customizer.getFactories().entrySet()) {
registerFactory(entry.getKey(), entry.getValue());
}
}
示例9: getFactories
import groovy.util.Factory; //导入依赖的package包/类
@Nonnull
Map<String, Factory> getFactories();
示例10: CoreBuilderCustomizer
import groovy.util.Factory; //导入依赖的package包/类
public CoreBuilderCustomizer() {
Map<String, Factory> factories = new LinkedHashMap<>();
factories.put("root", new RootFactory());
factories.put("metaComponent", new MetaComponentFactory());
setFactories(factories);
}
示例11: JavafxBuilderCustomizer
import groovy.util.Factory; //导入依赖的package包/类
@SuppressWarnings("unchecked")
public JavafxBuilderCustomizer() {
SceneGraphBuilder builder = new SceneGraphBuilder();
Map<String, Factory> factories = new LinkedHashMap<>(builder.getFactories());
factories.put("application", new ApplicationFactory());
factories.remove("fxaction");
factories.put("action", new ActionFactory());
factories.put("menuBar", new MenuFactory(MenuBar.class));
factories.put("contextMenu", new MenuFactory(ContextMenu.class));
factories.put("menuButton", new MenuFactory(MenuButton.class));
factories.put("splitMenuButton", new MenuFactory(SplitMenuButton.class));
factories.put("menu", new MenuItemFactory(Menu.class));
factories.put("menuItem", new MenuItemFactory(MenuItem.class));
factories.put("checkMenuItem", new MenuItemFactory(CheckMenuItem.class));
factories.put("customMenuItem", new MenuItemFactory(CustomMenuItem.class));
factories.put("separatorMenuItem", new MenuItemFactory(SeparatorMenuItem.class));
factories.put("radioMenuItem", new MenuItemFactory(RadioMenuItem.class));
factories.put("button", new LabeledFactory(Button.class));
factories.put("checkBox", new LabeledFactory(CheckBox.class));
factories.put("label", new LabeledFactory(Label.class));
factories.put("choiceBox", new LabeledFactory(ChoiceBox.class));
factories.put("hyperlink", new LabeledFactory(Hyperlink.class));
factories.put("tooltip", new LabeledFactory(Tooltip.class));
factories.put("radioButton", new LabeledFactory(RadioButton.class));
factories.put("toggleButton", new LabeledFactory(ToggleButton.class));
setFactories(factories);
setVariables(builder.getVariables());
setMethods(builder.getExplicitMethods());
setProps(builder.getExplicitProperties());
setAttributeDelegates(builder.getAttributeDelegates());
setPreInstantiateDelegates(builder.getPreInstantiateDelegates());
setPostInstantiateDelegates(builder.getPostInstantiateDelegates());
setPostNodeCompletionDelegates(builder.getPostNodeCompletionDelegates());
// setDisposalClosures(builder.getDisposalClosures());
setMethodMissingDelegate(builder.getMethodMissingDelegate());
setPropertyMissingDelegate(builder.getPropertyMissingDelegate());
}
示例12: registerFactory
import groovy.util.Factory; //导入依赖的package包/类
private void registerFactory(String name, Factory factory) {
factories.put(name, factory);
}