Package fr.soleil.salsa.entity

Examples of fr.soleil.salsa.entity.IDevice


        // check deviceList is correct: for each element in deviceList we check it's in
        // salsaConfiguration
        iterator = salsaDevice.listIterator();
        while (iterator.hasNext() && !found) {
            IDevice device = iterator.next();
            if (device.getName().equalsIgnoreCase(userDevice)) {
                found = true;
                device.setEnabled(enable);
            }
        }
    }
View Full Code Here


        // check deviceList is correct: for each element in deviceList we check it's in
        // salsaConfiguration
        iterator = salsaDevice.listIterator();
        while (iterator.hasNext()) {
            IDevice device = iterator.next();
            if (device.getName().equalsIgnoreCase(userDevice)) {
                return device.isEnabled();
            }
        }

        return enabled;
    }
View Full Code Here

      @Override
      public Object getValueAt(int rowIndex, int columnIndex) {
        Object value = null;
        if(deviceList != null && deviceList.size() > rowIndex){
          IDevice device = deviceList.get(rowIndex);
          if(columnIndex ==  0){
            value = device.isEnabled();
          }
          else {
            value = device.getName();
          }
        }
        return value;
      }
     
      public void setValueAt(Object value , int rowIndex, int columnIndex) {
        if(value != null && deviceList != null && deviceList.size() > rowIndex){
          IDevice device = deviceList.get(rowIndex);
          device.setEnabled((Boolean)value);
        }
      }
     
    };
    table.setModel(tableModel);
View Full Code Here

    private void initSavedAxis(List<? extends IDevice> deviceList,
            Iterator<DisplayAxis> iteratorAxis) {
        if (deviceList != null) {
            Iterator<? extends IDevice> iteratorDevice = deviceList.listIterator();
            IDevice device = null;
            DisplayAxis displayAxis = null;
            String attributeName = null;
            while (iteratorDevice.hasNext()) {
                device = iteratorDevice.next();
                if (iteratorAxis.hasNext()) {
                    displayAxis = iteratorAxis.next();
                    if (displayAxis == null) {
                        displayAxis = getDisplayAxis(Axis.NONE);
                    }
                }
                else {
                    displayAxis = getDisplayAxis(Axis.NONE);
                }
                attributeName = device.getName();
                attributeNameList.add(attributeName);
                // System.out.println("attributeName =" + attributeName + "->" + displayAxis);
                initDefaultAxis(attributeName, getAxis(displayAxis));
            }
        }
View Full Code Here

        // check deviceList is correct: for each element in deviceList we check it's in
        // salsaConfiguration
        iterator = salsaDevice.listIterator();
        while (iterator.hasNext() && !found) {
            IDevice device = iterator.next();
            if (device.getName().equalsIgnoreCase(userDevice)) {
                found = true;
                device.setEnabled(enable);
            }
        }
    }
View Full Code Here

        // check deviceList is correct: for each element in deviceList we check it's in
        // salsaConfiguration
        iterator = salsaDevice.listIterator();
        while (iterator.hasNext()) {
            IDevice device = iterator.next();
            if (device.getName().equalsIgnoreCase(userDevice)) {
                return device.isEnabled();
            }
        }

        return enabled;
    }
View Full Code Here

                    default:
                        break;
                }
            }
            deviceList.clear();
            IDevice deviceImp = null;
            for (String deviceName : values) {
                deviceImp = null;
                switch (deviceType) {
                    case ACTUATOR:
                        deviceImp = new ActuatorImpl();
                        ((List<IActuator>) returnDeviceList).add((IActuator) deviceImp);
                        break;
                    case SENSOR:
                        deviceImp = new SensorImpl();
                        ((List<ISensor>) returnDeviceList).add((ISensor) deviceImp);
                        break;
                    case TIMEBASE:
                        deviceImp = new TimebaseImpl();
                        ((List<ITimebase>) returnDeviceList).add((ITimebase) deviceImp);
                        break;
                    default:
                        break;
                }
                if (deviceImp != null) {
                    deviceImp.setName(deviceName);
                    deviceImp.setScanServerAttributeName(scanServer);
                    deviceImp.setEnabled(true);
                }
            }

        }
        return returnDeviceList;
View Full Code Here

                    default:
                        break;
                }
            }
            deviceList.clear();
            IDevice deviceImp = null;
            for (String deviceName : values) {
                deviceImp = null;
                switch (deviceType) {
                    case ACTUATOR:
                        deviceImp = new ActuatorImpl();
                        ((List<IActuator>) returnDeviceList).add((IActuator) deviceImp);
                        break;
                    case SENSOR:
                        deviceImp = new SensorImpl();
                        ((List<ISensor>) returnDeviceList).add((ISensor) deviceImp);
                        break;
                    case TIMEBASE:
                        deviceImp = new TimebaseImpl();
                        ((List<ITimebase>) returnDeviceList).add((ITimebase) deviceImp);
                        break;
                    default:
                        break;
                }
                if (deviceImp != null) {
                    deviceImp.setName(deviceName);
                    deviceImp.setScanServerAttributeName(scanServer);
                    deviceImp.setEnabled(true);
                }
            }

        }
        return returnDeviceList;
View Full Code Here

            @Override
            public Object getValueAt(int rowIndex, int columnIndex) {
                Object value = null;
                if (deviceList != null && deviceList.size() > rowIndex) {
                    IDevice device = deviceList.get(rowIndex);
                    if (columnIndex == 0) {
                        value = device.isEnabled();
                    }
                    else {
                        value = device.getName();
                    }
                }
                return value;
            }

            public void setValueAt(Object value, int rowIndex, int columnIndex) {
                if (value != null && deviceList != null && deviceList.size() > rowIndex) {
                    IDevice device = deviceList.get(rowIndex);
                    device.setEnabled((Boolean) value);
                }
            }

        };
        checkAll.addActionListener(new ActionListener() {
View Full Code Here

        // check deviceList is correct: for each element in deviceList we check
        // it's in
        // salsaConfiguration
        iterator = salsaDevice.listIterator();
        while (iterator.hasNext() && !found) {
            IDevice device = iterator.next();
            if (device.getName().equalsIgnoreCase(userDevice)) {
                found = true;
                device.setEnabled(enable);
            }
        }
    }
View Full Code Here

TOP

Related Classes of fr.soleil.salsa.entity.IDevice

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.