All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.bidib.wizard.dmx.client.config.DmxClientConfig Maven / Gradle / Ivy

There is a newer version: 2.0.29
Show newest version
package org.bidib.wizard.dmx.client.config;

import java.util.function.Supplier;

import javax.swing.JFrame;

import org.bidib.wizard.api.model.NodeInterface;
import org.bidib.wizard.api.model.NodeProvider;
import org.bidib.wizard.dmx.client.controller.DmxModelerController;
import org.springframework.beans.factory.config.ConfigurableBeanFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Lazy;
import org.springframework.context.annotation.Scope;

@Configuration
public class DmxClientConfig {

    @Bean
    DmxModelerControllerFactory dmxModelerControllerFactory() {

        final DmxModelerControllerFactory dmxModelerControllerFactory = new DmxModelerControllerFactory() {

            @Override
            public DmxModelerController createDmxModelerController(
                NodeInterface node, JFrame parent, final Supplier nodeProvider) {
                return dmxModelerController(node, parent, nodeProvider);
            }
        };

        return dmxModelerControllerFactory;
    }

    @Bean
    @Lazy
    @Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
    DmxModelerController dmxModelerController(
        NodeInterface node, JFrame parent, final Supplier nodeProvider) {
        DmxModelerController dmxModelerController = new DmxModelerController(node, parent, nodeProvider);

        return dmxModelerController;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy