Examples of IDevice


Examples of com.android.ddmlib.IDevice

    protected void finished() {
        logger.trace("finished");
    }

    private ImageEx fetchScreen() {
        final IDevice d = device;
        final boolean landscape = mediator.isLandscape();
        final boolean ccw = p.getBoolean(PREF_ROTATION_CCW, true);
        ImageEx image = null;
        if (d != null) {
            try {
View Full Code Here

Examples of fr.esrf.tangoatk.core.IDevice

   
    @SuppressWarnings("unchecked")
    protected void addDevices(FamilyNode family, java.util.List devices) {
    MemberNode device = null;
    DefaultMutableTreeNode attributes = null;
    IDevice d;
  
   
    for (int i = 0; i < devices.size(); i++) {
        AttributeList scalarList = new AttributeList();
        AttributeList al = new AttributeList();
  
    d = (IDevice)devices.get(i);
    //System.out.println("devicename = " + d.getName());
    List<?> childrenlist = family.getChildren();
    for(int j = 0 ;  j < childrenlist.size() ; j++)
    {
        MemberNode devicelocal = null;
        //System.out.println("childrenlist[" + j + "] = " + childrenlist.get(j).getClass());
        devicelocal = (MemberNode)childrenlist.get(j);
        if(devicelocal.getName().toLowerCase().equals(d.getName()))
            device = devicelocal;
    }
    //device = family.getChild((d.getName()));
    //System.out.println("device :" + device);
    device.setAttributeList(scalarList);
 
    device.setDevice(d);

    try {
        al.add(d.getName() + "/*");
    } catch (ATKException e) {
  error(e);
    }

    if (al.size() > 0) {
View Full Code Here

Examples of fr.esrf.tangoatk.core.IDevice

     }
     if(m_deviceListener != null)
     {
       try
       {
        IDevice tmpDevice = ((IDevice) arg0.getSource());
         String tmpState = arg0.getState();
        if (tmpDevice == null || tmpState == null) {
           return;
         }

         m_deviceListener.stateChange(StateUtilities.getStateForName(tmpState).value());
         m_deviceListener.stateChange(tmpState);
         m_deviceListener.statusChange(tmpDevice.getStatus());
         m_deviceListener.colorChange(ATKConstant.getColor4State(tmpState));
       }
       catch (Exception e)
       {
         m_deviceListener.stateChange(DevState._UNKNOWN);
View Full Code Here

Examples of fr.soleil.salsa.entity.IDevice

        super.notifyDeviceEnabled(deviceName, selected);
    }

    @Override
    public void notifyDeviceRenamed(int deviceIndex, String newDeviceName) {
        IDevice oldActuator = getDeviceName(deviceIndex);
        if ((oldActuator != null) && !ObjectUtils.sameObject(oldActuator.getName(), newDeviceName)) {
            String oldActuatorName = oldActuator.getName();
            if (config != null) {
                config.renameActuator(oldActuatorName, newDeviceName);
            }
            if (listener != null) {
                listener.deviceRenamed(oldActuatorName, newDeviceName);
View Full Code Here

Examples of fr.soleil.salsa.entity.IDevice

        super.notifyDeviceEnabled(deviceName, selected);
    }

    @Override
    public void notifyDeviceRenamed(int deviceIndex, String newDeviceName) {
        IDevice oldSensor = getDeviceName(deviceIndex);
        if ((oldSensor != null) && !ObjectUtils.sameObject(oldSensor.getName(), newDeviceName)) {
            String oldSensorName = oldSensor.getName();
            if (listener != null) {
                listener.deviceRenamed(oldSensorName, newDeviceName);
            }
            if (config != null) {
                config.renameSensor(oldSensorName, newDeviceName);
View Full Code Here

Examples of fr.soleil.salsa.entity.IDevice

    }

    @Override
    public void notifyDeviceEnabled(String deviceName, boolean selected) {
        if (config != null) {
            IDevice device = config.getDevice(deviceName, this.deviceList);
            if (device != null) {
                device.setEnabled(selected);
            }
        }

        if (listener != null) {
            listener.deviceEnabled(deviceName, selected);
View Full Code Here

Examples of fr.soleil.salsa.entity.IDevice

            listener.deviceEnabled(deviceName, selected);
        }
    }

    protected IDevice getDeviceName(int deviceIndex) {
        IDevice device = null;
        if (deviceList != null) {
            Object[] deviceArray = deviceList.toArray();
            Object object = null;
            if ((deviceIndex > -1) && (deviceIndex < deviceArray.length)) {
                object = deviceArray[deviceIndex];
View Full Code Here

Examples of fr.soleil.salsa.entity.IDevice

    /**
     * switch DevicePosition
     */
    @Override
    public void switchDevicePosition(int position1, int position2) {
        IDevice device1 = getDeviceName(position1);
        IDevice device2 = getDeviceName(position2);

        if (device1 != null) {
            deviceSelected = device1;
            if (device2 != null) {

                if (listener != null) {
                    listener.deviceSwap(device1.getName(), device2.getName());
                }

                swapDevice(device1.getName(), device2.getName());
            }
        }
    }
View Full Code Here

Examples of fr.soleil.salsa.entity.IDevice

        if ((value != null) && !value.isEmpty()) {
            name = value;
        }

        if (config != null) {
            IDevice existedDevice = config.getDevice(name, deviceList);
            if ((existedDevice != null) && !name.isEmpty()) {
                name = name + "_copy";
            }
        }
        return name;
View Full Code Here

Examples of fr.soleil.salsa.entity.IDevice

    }

    private String newDevice(String value) {
        String name = getNewDeviceName(value);

        IDevice device = generateDevice();
        device.setName(name);
        device.setEnabled(true);

        boolean addSucces = this.view.addRow(device);
        if (addSucces) {
            addDevice(device);
        } else if (!view.isNullModel()) {
            deviceErrorMessage(true, device.getName());
        }

        return name;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.