org.bidib.wizard.dmx.client.config.DmxClientConfig Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bidibwizard-dmx-client Show documentation
Show all versions of bidibwizard-dmx-client Show documentation
jBiDiB BiDiB Wizard DMX client POM
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;
}
}