Package fr.soleil.salsa.entity.event

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


        this.numberOfPoints = numberOfPoints;
    }

    @Override
    protected IConfig<IDimensionHCS> initModel() {
        ConfigHCSModel configHCSModel = new ConfigHCSModel(this);
        IDimensionHCS dimension = (IDimensionHCS) getDimensionX();
        if (dimension != null) {
            IDimensionHCS dimensionModel = (IDimensionHCS) dimension.toModel();
            List<IActuator> actuatorList = dimension.getActuatorsList();
            List<IActuator> actuatorListModel = convertActuatorListToModel(actuatorList);
            dimensionModel.setActuatorsList(actuatorListModel);

            List<IRangeHCS> rangeList = dimension.getRangesXList();
            List<IRangeHCS> rangeModelList = new ArrayList<IRangeHCS>();
            for (IRangeHCS range : rangeList) {
                rangeModelList.add((IRangeHCS) range.toModel());
            }
            dimension.setRangesXList(rangeModelList);

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


                    }

                    break;

                case SCAN_HCS:
                    ConfigHCSModel configHCSModel = (ConfigHCSModel) config;
                    configHCSModel.addListener(listenerConfigHCS);
                    for (ISensor sensor : config.getSensorsList()) {
                        ((SensorModel) sensor).addListener(listenerSensor);
                    }
                    DimensionHCSModel dimensionHCSModel = (DimensionHCSModel) configHCSModel
                            .getDimensionX();
                    dimensionHCSModel.addListener(listenerDimensionHCS);
                    for (IActuator actuator : dimensionHCSModel.getActuatorsList()) {
                        ((ActuatorModel) actuator).addListener(listenerActuator);
                    }
View Full Code Here

                        }
                    }
                    break;

                case SCAN_HCS:
                    ConfigHCSModel configHCSModel = (ConfigHCSModel) config;
                    configHCSModel.removeListener(listenerConfigHCS);
                    for (ISensor sensor : config.getSensorsList()) {
                        ((SensorModel) sensor).removeListener(listenerSensor);
                    }
                    DimensionHCSModel dimensionHCSModel = (DimensionHCSModel) configHCSModel
                            .getDimensionX();
                    dimensionHCSModel.removeListener(listenerDimensionHCS);
                    for (IActuator actuator : dimensionHCSModel.getActuatorsList()) {
                        ((ActuatorModel) actuator).removeListener(listenerActuator);
                    }
View Full Code Here

     * @param config
     */
    public void startListening(IConfig<?> config) {
        if (config != null) {
            stopListening();
            ConfigHCSModel configHCSModel = (ConfigHCSModel) config;
            configHCSModel.addListener(listenerConfigHCS);

            DimensionHCSModel dimensionHCSModel = (DimensionHCSModel) configHCSModel
                    .getDimensionX();
            dimensionHCSModel.addListener(listenerDimensionHCS);

            for (IActuator actuator : dimensionHCSModel.getActuatorsList()) {
                ((ActuatorModel) actuator).addListener(listenerActuator);
View Full Code Here

     *
     * @param config
     */
    public void stopListening() {
        if (config != null) {
            ConfigHCSModel configHCSModel = (ConfigHCSModel) config;
            configHCSModel.removeListener(listenerConfigHCS);

            DimensionHCSModel dimensionHCSModel = (DimensionHCSModel) configHCSModel
                    .getDimensionX();
            dimensionHCSModel.removeListener(listenerDimensionHCS);

            for (IActuator actuator : dimensionHCSModel.getActuatorsList()) {
                ((ActuatorModel) actuator).removeListener(listenerActuator);
View Full Code Here

        return rangeHCS;
    }

    @Override
    protected IConfig<IDimensionHCS> initModel() {
        ConfigHCSModel configHCSModel = new ConfigHCSModel(this);
        IDimensionHCS dimension = (IDimensionHCS) getDimensionX();
        if (dimension != null) {
            IDimensionHCS dimensionModel = (IDimensionHCS) dimension.toModel();
            List<IActuator> actuatorList = dimension.getActuatorsList();
            List<IActuator> actuatorListModel = convertActuatorListToModel(actuatorList);
            dimensionModel.setActuatorsList(actuatorListModel);

            List<IRangeHCS> rangeList = dimension.getRangesXList();
            List<IRangeHCS> rangeModelList = new ArrayList<IRangeHCS>();
            for (IRangeHCS range : rangeList) {
                rangeModelList.add((IRangeHCS) range.toModel());
            }
            dimension.setRangesXList(rangeModelList);

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

        this.numberOfPoints = numberOfPoints;
    }

    @Override
    protected IConfig<IDimensionHCS> initModel() {
        ConfigHCSModel configHCSModel = new ConfigHCSModel(this);
        IDimensionHCS dimension = (IDimensionHCS) getDimensionX();
        if (dimension != null) {
            IDimensionHCS dimensionModel = (IDimensionHCS) dimension.toModel();
            List<IActuator> actuatorList = dimension.getActuatorsList();
            List<IActuator> actuatorListModel = convertActuatorListToModel(actuatorList);
            dimensionModel.setActuatorsList(actuatorListModel);

            List<IRangeHCS> rangeList = dimension.getRangesXList();
            List<IRangeHCS> rangeModelList = new ArrayList<IRangeHCS>();
            for (IRangeHCS range : rangeList) {
                rangeModelList.add((IRangeHCS) range.toModel());
            }
            dimension.setRangesXList(rangeModelList);

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

        this.numberOfPoints = numberOfPoints;
    }

    @Override
    protected IConfig<IDimensionHCS> initModel() {
        ConfigHCSModel configHCSModel = new ConfigHCSModel(this);
        IDimensionHCS dimension = (IDimensionHCS) getDimensionX();
        if (dimension != null) {
            IDimensionHCS dimensionModel = (IDimensionHCS) dimension.toModel();
            List<IActuator> actuatorList = dimension.getActuatorsList();
            List<IActuator> actuatorListModel = convertActuatorListToModel(actuatorList);
            dimensionModel.setActuatorsList(actuatorListModel);

            List<IRangeHCS> rangeList = dimension.getRangesXList();
            List<IRangeHCS> rangeModelList = new ArrayList<IRangeHCS>();
            for (IRangeHCS range : rangeList) {
                rangeModelList.add((IRangeHCS) range.toModel());
            }
            dimension.setRangesXList(rangeModelList);

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

        return rangeHCS;
    }

    @Override
    protected IConfig<IDimensionHCS> initModel() {
        ConfigHCSModel configHCSModel = new ConfigHCSModel(this);
        IDimensionHCS dimension = (IDimensionHCS) getDimensionX();
        if (dimension != null && dimension instanceof IObjectImpl<?>) {
            IDimensionHCS dimensionModel = (IDimensionHCS) ((IObjectImpl<?>) dimension).toModel();
            List<IActuator> actuatorList = dimension.getActuatorsList();
            List<IActuator> actuatorListModel = convertActuatorListToModel(actuatorList);
            dimensionModel.setActuatorsList(actuatorListModel);
            configHCSModel.setDimensionX(dimensionModel);
        }
        return configHCSModel;
    }
View Full Code Here

                    }

                    break;

                case SCAN_HCS:
                    ConfigHCSModel configHCSModel = (ConfigHCSModel) config;
                    configHCSModel.addListener(listenerConfigHCS);
                    for (ISensor sensor : config.getSensorsList()) {
                        ((SensorModel) sensor).addListener(listenerSensor);
                    }
                    DimensionHCSModel dimensionHCSModel = (DimensionHCSModel) configHCSModel
                            .getDimensionX();
                    dimensionHCSModel.addListener(listenerDimensionHCS);
                    for (IActuator actuator : dimensionHCSModel.getActuatorsList()) {
                        ((ActuatorModel) actuator).addListener(listenerActuator);
                    }
View Full Code Here

TOP

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

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.