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

org.bidib.wizard.integration.client.config.IntegrationClientConfig Maven / Gradle / Ivy

package org.bidib.wizard.integration.client.config;

import org.bidib.wizard.common.model.settings.IntegrationSettingsInterface;
import org.bidib.wizard.integration.client.preferences.view.panel.IntegrationSettingsPanel;
import org.bidib.wizard.integration.client.statusbar.IntegrationStatusBarItem;
import org.bidib.wizard.integration.core.z21lan.Z21ReceiverStatusModel;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Lazy;

@Configuration
public class IntegrationClientConfig {

    private static final Logger LOGGER = LoggerFactory.getLogger(IntegrationClientConfig.class);

    @Bean
    @Lazy
    IntegrationSettingsPanel integrationSettingsPanel(final IntegrationSettingsInterface integrationSettings) {
        LOGGER.info("Create new instance of IntegrationSettingsPanel.");

        return new IntegrationSettingsPanel(integrationSettings);
    }

    @Autowired
    private Z21ReceiverStatusModel statusModel;

    @Bean
    @Lazy
    IntegrationStatusBarItem integrationStatusBarItem() {
        LOGGER.info("Create new instance of IntegrationStatusBarItem.");

        final IntegrationStatusBarItem item = new IntegrationStatusBarItem(statusModel);
        item.initialize();

        return item;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy