Package fr.soleil.salsa.entity.event

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


     */
    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

        setType(ScanType.SCAN_1D);
    }

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

        return config1DModel;
    }
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

    /**
     * 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

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.