Package fr.soleil.salsa.entity.event

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


        super(null, config, errorController);
    }

    @Override
    protected IDevice generateDevice() {
        return new SensorModel();
    }
View Full Code Here


        setDimension(dimension);

    }

    public void addSensor(String sensorName) {
        ISensor device = new SensorModel();
        device.setName(sensorName);
        device.setEnabled(true);
        sensorsList.add(device);
    }
View Full Code Here

    @Override
    public void notifyNewAction(String value) {

        if (config != null) {
            updateListSensors();
            ISensor sensor = new SensorModel();
            sensor.setName(DEFAULT_SENSOR_NAME);
            if (value != null) {
                sensor.setName(value);
            }
            sensor.setEnabled(true);

            boolean addSucces = this.view.addRow(sensor);
            if (addSucces)
                this.listSensor.add(sensor);
View Full Code Here

        }
        else if (this.listSensor.size() == 0) {
            for (int i = 0; i < this.view.getModel().getRowCount(); i++) {
                String sensorName = (String) this.view.getModel().getValueAt(i, 1);
                Boolean isEnabled = (Boolean) this.view.getModel().getValueAt(i, 0);
                ISensor sensor = new SensorModel();
                sensor.setName(sensorName);
                sensor.setEnabled(isEnabled);
                this.listSensor.add(sensor);
            }
        }
    }
View Full Code Here

            List<ISensor> sensors = config.getSensorsList();
            view.clearSensors();
            for (int i = 0; i < sensors.size(); i++) {

                ISensor s = sensors.get(i);
                SensorModel eSensort = (SensorModel) s;
                eSensort.addListener(sensorListener);
                view.addSensor(s.getName(), s.getName());
                if (i == postScanBehaviour.getSensor()) {
                    view.setSensorSelected(i);
                }
            }
View Full Code Here

            IDevice tmpDevice = super.getDevice(deviceName, deviceList);
            newDevice = tmpDevice;
            if (tmpDevice == null) {
                // System.out.println("add device=" + config.getFullPath() + " " + deviceName);
                if (device instanceof ISensor) {
                    ISensor sensor = new SensorModel();
                    sensor.setName(deviceName);
                    sensor.setEnabled(true);
                    ((List<ISensor>) deviceList).add(sensor);
                    newDevice = sensor;
                }
                if (device instanceof IActuator) {
                    IActuator actuator = new ActuatorModel();
View Full Code Here

    }

    @Override
    public void addSensor(String sensorName) {
        if (getDevice(sensorName, sensorsList) == null) {
            ISensor device = new SensorModel();
            device.setName(sensorName);
            device.setEnabled(true);
            sensorsList.add(device);
        }
    }
View Full Code Here

    }

    @Override
    public void addSensor(String sensorName) {
        if (getDevice(sensorName, sensorsList) == null) {
            ISensor device = new SensorModel();
            device.setName(sensorName);
            device.setEnabled(true);
            sensorsList.add(device);
        }
    }
View Full Code Here

        super(view, config, errorController);
    }

    @Override
    protected ISensor generateDevice() {
        return new SensorModel();
    }
View Full Code Here

                List<ISensor> sensors = config.getSensorsList();
                view.clearSensors();
                for (int i = 0; i < sensors.size(); i++) {

                    ISensor s = sensors.get(i);
                    SensorModel eSensort = (SensorModel) s;
                    eSensort.addListener(sensorListener);
                    view.addSensor(s.getName(), s.getName());
                    if (i == postScanBehaviour.getSensor()) {
                        view.setSensorSelected(i);
                    }
                }
View Full Code Here

TOP

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

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.