Package fr.soleil.salsa.entity.event

Examples of fr.soleil.salsa.entity.event.ConfigEnergyModel


                        }
                    }
                    break;

                case SCAN_ENERGY:
                    ConfigEnergyModel configEnergyModel = (ConfigEnergyModel) config;
                    configEnergyModel.addListener(listenerConfigEnergy);
                    for (ISensor sensor : config.getSensorsList()) {
                        ((SensorModel) sensor).addListener(listenerSensor);
                    }
                    DimensionEnergyModel dimensionEnergyModel = (DimensionEnergyModel) configEnergyModel
                            .getDimensionX();
                    dimensionEnergyModel.addListener(listenerDimensionEnergy);
                    for (IActuator actuator : dimensionEnergyModel.getActuatorsList()) {
                        ((ActuatorModel) actuator).addListener(listenerActuator);
                    }
View Full Code Here


                        }
                    }
                    break;

                case SCAN_ENERGY:
                    ConfigEnergyModel configEnergyModel = (ConfigEnergyModel) config;
                    configEnergyModel.removeListener(listenerConfigEnergy);
                    for (ISensor sensor : config.getSensorsList()) {
                        ((SensorModel) sensor).removeListener(listenerSensor);
                    }
                    DimensionEnergyModel dimensionEnergyModel = (DimensionEnergyModel) configEnergyModel
                            .getDimensionX();
                    dimensionEnergyModel.removeListener(listenerDimensionEnergy);
                    for (IActuator actuator : dimensionEnergyModel.getActuatorsList()) {
                        ((ActuatorModel) actuator).removeListener(listenerActuator);
                    }
View Full Code Here

                        }
                    }
                    break;

                case SCAN_ENERGY:
                    ConfigEnergyModel configEnergyModel = (ConfigEnergyModel) config;
                    configEnergyModel.addListener(listenerConfigEnergy);
                    for (ISensor sensor : config.getSensorsList()) {
                        ((SensorModel) sensor).addListener(listenerSensor);
                    }
                    DimensionEnergyModel dimensionEnergyModel = (DimensionEnergyModel) configEnergyModel
                            .getDimensionX();
                    dimensionEnergyModel.addListener(listenerDimensionEnergy);
                    for (IActuator actuator : dimensionEnergyModel.getActuatorsList()) {
                        ((ActuatorModel) actuator).addListener(listenerActuator);
                    }
View Full Code Here

                        }
                    }
                    break;

                case SCAN_ENERGY:
                    ConfigEnergyModel configEnergyModel = (ConfigEnergyModel) config;
                    configEnergyModel.removeListener(listenerConfigEnergy);
                    for (ISensor sensor : config.getSensorsList()) {
                        ((SensorModel) sensor).removeListener(listenerSensor);
                    }
                    DimensionEnergyModel dimensionEnergyModel = (DimensionEnergyModel) configEnergyModel
                            .getDimensionX();
                    dimensionEnergyModel.removeListener(listenerDimensionEnergy);
                    for (IActuator actuator : dimensionEnergyModel.getActuatorsList()) {
                        ((ActuatorModel) actuator).removeListener(listenerActuator);
                    }
View Full Code Here

        setType(ScanType.SCAN_ENERGY);
    }

    @Override
    protected IConfig<IDimensionEnergy> initModel() {
        ConfigEnergyModel configEnergyDModel = new ConfigEnergyModel(this);

        IDimensionEnergy dimension = (IDimensionEnergy) getDimensionX();
        if (dimension != null) {
            IDimensionEnergy dimensionModel = (IDimensionEnergy) dimension.toModel();
            List<IActuator> actuatorList = dimension.getActuatorsList();
            List<IActuator> actuatorListModel = convertActuatorListToModel(actuatorList);
            dimensionModel.setActuatorsList(actuatorListModel);

            List<IRangeEnergy> rangeList = dimension.getRangesEnergyList();
            List<IRangeEnergy> rangeModelList = new ArrayList<IRangeEnergy>();
            for (IRangeEnergy range : rangeList) {
                rangeModelList.add((IRangeEnergy) range.toModel());
            }
            dimension.setRangesEnergyList(rangeModelList);

            configEnergyDModel.setDimensionX(dimensionModel);
        }
        return configEnergyDModel;
    }
View Full Code Here

        setType(ScanType.SCAN_ENERGY);
    }

    @Override
    protected IConfig<IDimensionEnergy> initModel() {
        ConfigEnergyModel configEnergyDModel = new ConfigEnergyModel(this);

        IDimensionEnergy dimension = (IDimensionEnergy) getDimensionX();
        if (dimension != null) {
            IDimensionEnergy dimensionModel = (IDimensionEnergy) dimension.toModel();
            List<IActuator> actuatorList = dimension.getActuatorsList();
            List<IActuator> actuatorListModel = convertActuatorListToModel(actuatorList);
            dimensionModel.setActuatorsList(actuatorListModel);

            List<IRangeEnergy> rangeList = dimension.getRangesEnergyList();
            List<IRangeEnergy> rangeModelList = new ArrayList<IRangeEnergy>();
            for (IRangeEnergy range : rangeList) {
                rangeModelList.add((IRangeEnergy) range.toModel());
            }
            dimension.setRangesEnergyList(rangeModelList);

            configEnergyDModel.setDimensionX(dimensionModel);
        }
        return configEnergyDModel;
    }
View Full Code Here

        setType(ScanType.SCAN_ENERGY);
    }

    @Override
    protected IConfig<IDimensionEnergy> initModel() {
        ConfigEnergyModel configEnergyDModel = new ConfigEnergyModel(this);

        IDimensionEnergy dimension = (IDimensionEnergy) getDimensionX();
        if (dimension != null && dimension instanceof IObjectImpl<?>) {
            IDimensionEnergy dimensionModel = (IDimensionEnergy) ((IObjectImpl<?>) dimension)
                    .toModel();
            List<IActuator> actuatorList = dimension.getActuatorsList();
            List<IActuator> actuatorListModel = convertActuatorListToModel(actuatorList);
            dimensionModel.setActuatorsList(actuatorListModel);
            configEnergyDModel.setDimensionX(dimensionModel);
        }
        return configEnergyDModel;
    }
View Full Code Here

                        }
                    }
                    break;

                case SCAN_ENERGY:
                    ConfigEnergyModel configEnergyModel = (ConfigEnergyModel) config;
                    configEnergyModel.addListener(listenerConfigEnergy);
                    for (ISensor sensor : config.getSensorsList()) {
                        ((SensorModel) sensor).addListener(listenerSensor);
                    }
                    DimensionEnergyModel dimensionEnergyModel = (DimensionEnergyModel) configEnergyModel
                            .getDimensionX();
                    dimensionEnergyModel.addListener(listenerDimensionEnergy);
                    for (IActuator actuator : dimensionEnergyModel.getActuatorsList()) {
                        ((ActuatorModel) actuator).addListener(listenerActuator);
                    }
View Full Code Here

                        }
                    }
                    break;

                case SCAN_ENERGY:
                    ConfigEnergyModel configEnergyModel = (ConfigEnergyModel) config;
                    configEnergyModel.removeListener(listenerConfigEnergy);
                    for (ISensor sensor : config.getSensorsList()) {
                        ((SensorModel) sensor).removeListener(listenerSensor);
                    }
                    DimensionEnergyModel dimensionEnergyModel = (DimensionEnergyModel) configEnergyModel
                            .getDimensionX();
                    dimensionEnergyModel.removeListener(listenerDimensionEnergy);
                    for (IActuator actuator : dimensionEnergyModel.getActuatorsList()) {
                        ((ActuatorModel) actuator).removeListener(listenerActuator);
                    }
View Full Code Here

TOP

Related Classes of fr.soleil.salsa.entity.event.ConfigEnergyModel

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.