Package fr.soleil.salsa.entity.event

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


        setType(ScanType.SCAN_1D);
    }

    @Override
    protected IConfig<IDimension1D> initModel() {
        Config1DModel config1DModel = new Config1DModel(this);
        IDimension1D dimension1D = (IDimension1D) getDimensionX();
        if (dimension1D != null) {
            IDimension1D dimensionModel = (IDimension1D) dimension1D.toModel();
            List<IActuator> actuatorList = dimension1D.getActuatorsList();
            List<IActuator> actuatorListModel = convertActuatorListToModel(actuatorList);
            dimensionModel.setActuatorsList(actuatorListModel);

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

            config1DModel.setDimensionX(dimensionModel);

        }

        return config1DModel;
    }
View Full Code Here


     */
    public void startListening(IConfig<?> config) {
        if (config != null) {
            stopListening();

            Config1DModel configModel = (Config1DModel) config;
            configModel.addListener(listenerConfig1D);

            Dimension1DModel dimension1DModel = (Dimension1DModel) configModel.getDimensionX();
            dimension1DModel.addListener(listenerDimension1D);
            for (IActuator actuator : dimension1DModel.getActuatorsList()) {
                ((ActuatorModel) actuator).addListener(listenerActuator);
            }
            for (IRange1D range1D : dimension1DModel.getRangesXList()) {
View Full Code Here

    /**
     * Stop listening to a config and its elements.
     */
    public void stopListening() {
        if (config != null) {
            Config1DModel configModel = (Config1DModel) config;
            configModel.removeListener(listenerConfig1D);
            Dimension1DModel dimension1DModel = (Dimension1DModel) configModel.getDimensionX();
            dimension1DModel.removeListener(listenerDimension1D);
            for (IActuator actuator : dimension1DModel.getActuatorsList()) {
                ((ActuatorModel) actuator).removeListener(listenerActuator);
            }
            for (IRange1D range1D : dimension1DModel.getRangesXList()) {
View Full Code Here

     */
    public void startListening(IConfig<?> config) {
        if (config != null) {
            stopListening();

            Config1DModel configModel = (Config1DModel) config;
            configModel.addListener(listenerConfig1D);

            Dimension1DModel dimension1DModel = (Dimension1DModel) configModel.getDimensionX();
            dimension1DModel.addListener(listenerDimension1D);
            for (IActuator actuator : dimension1DModel.getActuatorsList()) {
                ((ActuatorModel) actuator).addListener(listenerActuator);
            }
            for (IRange1D range1D : dimension1DModel.getRangesXList()) {
View Full Code Here

    /**
     * Stop listening to a config and its elements.
     */
    public void stopListening() {
        if (config != null) {
            Config1DModel configModel = (Config1DModel) config;
            configModel.removeListener(listenerConfig1D);
            Dimension1DModel dimension1DModel = (Dimension1DModel) configModel.getDimensionX();
            dimension1DModel.removeListener(listenerDimension1D);
            for (IActuator actuator : dimension1DModel.getActuatorsList()) {
                ((ActuatorModel) actuator).removeListener(listenerActuator);
            }
            for (IRange1D range1D : dimension1DModel.getRangesXList()) {
View Full Code Here

     */
    public void startListening(IConfig<?> config) {
        if (config != null) {
            stopListening();

            Config1DModel configModel = (Config1DModel) config;
            configModel.addListener(listenerConfig1D);

            Dimension1DModel dimension1DModel = (Dimension1DModel) configModel.getDimensionX();
            dimension1DModel.addListener(listenerDimension1D);
            for (IActuator actuator : dimension1DModel.getActuatorsList()) {
                ((ActuatorModel) actuator).addListener(listenerActuator);
            }
            for (IRange1D range1D : dimension1DModel.getRangesXList()) {
View Full Code Here

    /**
     * Stop listening to a config and its elements.
     */
    public void stopListening() {
        if (config != null) {
            Config1DModel configModel = (Config1DModel) config;
            configModel.removeListener(listenerConfig1D);
            Dimension1DModel dimension1DModel = (Dimension1DModel) configModel.getDimensionX();
            dimension1DModel.removeListener(listenerDimension1D);
            for (IActuator actuator : dimension1DModel.getActuatorsList()) {
                ((ActuatorModel) actuator).removeListener(listenerActuator);
            }
            for (IRange1D range1D : dimension1DModel.getRangesXList()) {
View Full Code Here

            enableListening(config.getScanAddOn(), true);

            switch (config.getType()) {
                case SCAN_1D:
                    Config1DModel configModel = (Config1DModel) config;
                    configModel.addListener(listenerConfig1D);
                    for (ISensor sensor : config.getSensorsList()) {
                        ((SensorModel) sensor).addListener(listenerSensor);
                    }
                    Dimension1DModel dimension1DModel = (Dimension1DModel) configModel
                            .getDimensionX();
                    dimension1DModel.addListener(listenerDimension1D);
                    for (IActuator actuator : dimension1DModel.getActuatorsList()) {
                        ((ActuatorModel) actuator).addListener(listenerActuator);
                    }
View Full Code Here

            enableListening(config.getScanAddOn(), false);

            switch (config.getType()) {
                case SCAN_1D:
                    Config1DModel configModel = (Config1DModel) config;
                    configModel.removeListener(listenerConfig1D);
                    for (ISensor sensor : config.getSensorsList()) {
                        ((SensorModel) sensor).removeListener(listenerSensor);
                    }
                    Dimension1DModel dimension1DModel = (Dimension1DModel) configModel
                            .getDimensionX();
                    dimension1DModel.removeListener(listenerDimension1D);
                    for (IActuator actuator : dimension1DModel.getActuatorsList()) {
                        ((ActuatorModel) actuator).removeListener(listenerActuator);
                    }
View Full Code Here

     */
    public void startListening(IConfig<?> config) {
        if (config != null) {
            stopListening();

            Config1DModel configModel = (Config1DModel) config;
            configModel.addListener(listenerConfig1D);

            Dimension1DModel dimension1DModel = (Dimension1DModel) configModel.getDimensionX();
            dimension1DModel.addListener(listenerDimension1D);
            for (IActuator actuator : dimension1DModel.getActuatorsList()) {
                ((ActuatorModel) actuator).addListener(listenerActuator);
            }
            for (IRange1D range1D : dimension1DModel.getRangesXList()) {
View Full Code Here

TOP

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

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.