Package fr.soleil.salsa.entity.scan2D

Examples of fr.soleil.salsa.entity.scan2D.IConfig2D


                            }
                        }

                    }
                    else if (config instanceof IConfig2D) {
                        IConfig2D config2d = (IConfig2D) config;
                        IDimension2DX dimension2DX = config2d.getDimensionX();
                        List<IActuator> listActuator2DX = dimension2DX.getActuatorsList();
                        List<IRange2DX> range2DX = dimension2DX.getRangesList();

                        for (int i = 0; i < range2DX.size(); i++) {
                            List<ITrajectory> listTrajectory = range2DX.get(i)
                                    .getTrajectoriesList();
                            for (int j = 0; j < listTrajectory.size(); j++) {
                                IActuator actuator = listActuator2DX.get(j);
                                if (actuator != null && actuator.isEnabled()) {
                                    ITrajectory trajectory = copyToTrajectoryImpl(actuator,
                                            listTrajectory.get(j));
                                    if (trajectory != null) {
                                        trajectories.add(trajectory);
                                    }
                                }
                            }
                        }

                        IDimension2DY dimension2DY = config2d.getDimensionY();
                        List<IActuator> listActuator2DY = dimension2DY.getActuatorsList();
                        List<IRange2DY> range2DY = dimension2DY.getRangesList();

                        for (int i = 0; i < range2DY.size(); i++) {
                            List<ITrajectory> listTrajectory = range2DY.get(i)
View Full Code Here


                                                actuatorTrajectoryMap);
                                    }
                                    break;

                                case SCAN_2D:
                                    IConfig2D config2d = (IConfig2D) config;
                                    IDimension2DX dimension2DX = config2d.getDimensionX();
                                    actuatorList = dimension2DX.getActuatorsList();
                                    List<IRange2DX> range2DXList = dimension2DX.getRangesList();

                                    for (int rangeid = 0; rangeid < range2DXList.size(); rangeid++) {
                                        modifyTrajectory(range2DXList.get(rangeid), actuatorList,
                                                actuatorTrajectoryMap);
                                    }

                                    IDimension2DY dimension2DY = config2d.getDimensionY();
                                    actuatorList = dimension2DY.getActuatorsList();
                                    List<IRange2DY> range2DYList = dimension2DY.getRangesList();

                                    for (int rangeid = 0; rangeid < range2DYList.size(); rangeid++) {
                                        modifyTrajectory(range2DYList.get(rangeid), actuatorList,
View Full Code Here

                            }

                            break;

                        case SCAN_2D:
                            IConfig2D config2d = (IConfig2D) config;
                            IDimension2DX dimension2DX = config2d.getDimensionX();
                            List<IActuator> listActuator2DX = dimension2DX.getActuatorsList();
                            List<IRange2DX> range2DX = dimension2DX.getRangesList();

                            for (int i = 0; i < range2DX.size(); i++) {
                                List<ITrajectory> listTrajectory = range2DX.get(i)
                                        .getTrajectoriesList();
                                for (int j = 0; j < listTrajectory.size(); j++) {
                                    IActuator actuator = listActuator2DX.get(j);
                                    if (actuator != null && actuator.isEnabled()) {
                                        ITrajectory trajectory = copyToTrajectoryImpl(actuator,
                                                listTrajectory.get(j));
                                        if (trajectory != null) {
                                            trajectories.add(trajectory);
                                        }
                                    }
                                }
                            }

                            IDimension2DY dimension2DY = config2d.getDimensionY();
                            List<IActuator> listActuator2DY = dimension2DY.getActuatorsList();
                            List<IRange2DY> range2DY = dimension2DY.getRangesList();

                            for (int i = 0; i < range2DY.size(); i++) {
                                List<ITrajectory> listTrajectory = range2DY.get(i)
View Full Code Here

                            }

                            break;

                        case SCAN_2D:
                            IConfig2D config2d = (IConfig2D) config;
                            IDimension2DX dimension2DX = config2d.getDimensionX();
                            List<IActuator> listActuator2DX = dimension2DX.getActuatorsList();
                            List<IRange2DX> range2DX = dimension2DX.getRangesList();

                            for (int i = 0; i < range2DX.size(); i++) {
                                List<ITrajectory> listTrajectory = range2DX.get(i)
                                        .getTrajectoriesList();
                                for (int j = 0; j < listTrajectory.size(); j++) {
                                    IActuator actuator = listActuator2DX.get(j);
                                    if (actuator != null && actuator.isEnabled()) {
                                        ITrajectory trajectory = copyToTrajectoryImpl(actuator,
                                                listTrajectory.get(j));
                                        if (trajectory != null) {
                                            trajectories.add(trajectory);
                                        }
                                    }
                                }
                            }

                            IDimension2DY dimension2DY = config2d.getDimensionY();
                            List<IActuator> listActuator2DY = dimension2DY.getActuatorsList();
                            List<IRange2DY> range2DY = dimension2DY.getRangesList();

                            for (int i = 0; i < range2DY.size(); i++) {
                                List<ITrajectory> listTrajectory = range2DY.get(i)
View Full Code Here

            if ((config.getDimensionX() != null)
                    && (config.getDimensionX().getActuatorsList() != null)) {
                deviceList.addAll(config.getDimensionX().getActuatorsList());
            }
            if (config instanceof IConfig2D) {
                IConfig2D config2D = (IConfig2D) config;
                if ((config2D.getDimensionY() != null)
                        && (config2D.getDimensionX().getActuatorsList() != null)) {
                    deviceList.addAll(config2D.getDimensionY().getActuatorsList());
                }
            }
            List<String> displayableList = extractAvailableDeviceNames(true, deviceList);
            deviceList.clear();
            int size = Math.min(axisList.size(), displayableList.size());
View Full Code Here

            if ((config.getDimensionX() != null)
                    && (config.getDimensionX().getActuatorsList() != null)) {
                deviceList.addAll(config.getDimensionX().getActuatorsList());
            }
            if (config instanceof IConfig2D) {
                IConfig2D config2D = (IConfig2D) config;
                if ((config2D.getDimensionY() != null)
                        && (config2D.getDimensionX().getActuatorsList() != null)) {
                    deviceList.addAll(config2D.getDimensionY().getActuatorsList());
                }
            }
            List<String> displayableList = extractAvailableDeviceNames(true, deviceList);
            deviceList.clear();
            int size = Math.min(axisList.size(), displayableList.size());
View Full Code Here

                                .getDimension()).removeListener(dimensionListener);
                    }

                }
                else if (this.config instanceof IConfig2D) {
                    IConfig2D config2D = (IConfig2D) this.config;
                    IDimension dimension;
                    if (this.yActuator) {
                        dimension = config2D.getDimensionY();
                    }
                    else {
                        dimension = config2D.getDimensionX();
                    }
                    if (dimension != null) {
                        ((IEventSource<EntityPropertyChangedEvent<? extends IDimension>>) dimensionListener
                                .getDimension()).removeListener(dimensionListener);
                    }
                }
                else if (this.config instanceof IConfigEnergy) {
                    IConfigEnergy configEnergy = (IConfigEnergy) this.config;
                    IDimension dimension = configEnergy.getDimensionX();
                    if (dimension != null) {
                        ((IEventSource<EntityPropertyChangedEvent<? extends IDimension>>) dimensionListener
                                .getDimension()).removeListener(dimensionListener);
                    }
                }
            }
            this.config = config;
            actuatorListenersList.clear();
            if (config != null) {
                ((IEventSource<EntityPropertyChangedEvent<IConfig<?>>>) this.config)
                        .addListener(configListener);

                if (config instanceof IConfig1D) {
                    IConfig1D config1D = (IConfig1D) config;
                    this.setViewVisible(true);
                    listActuator = config1D.getDimensionX().getActuatorsList();

                    IDimension dimension = config1D.getDimensionX();
                    if (dimension != null) {
                        dimensionListener = new DimensionListener(dimension);
                        ((IEventSource<EntityPropertyChangedEvent<? extends IDimension>>) dimension)
                                .addListener(dimensionListener);
                    }
                }
                else if (config instanceof IConfig2D) {
                    IConfig2D config2D = (IConfig2D) config;
                    if (this.yActuator) { // Case of Y Actuator.
                        this.setViewVisible(true);
                        listActuator = config2D.getDimensionY().getActuatorsList();
                        IDimension dimension = config2D.getDimensionY();
                        if (dimension != null) {
                            dimensionListener = new DimensionListener(dimension);
                            ((IEventSource<EntityPropertyChangedEvent<? extends IDimension>>) dimension)
                                    .addListener(dimensionListener);
                        }
                    }
                    else { // Case of X Actuator.
                        this.setViewVisible(true);
                        listActuator = config2D.getDimensionX().getActuatorsList();
                        IDimension dimension = config2D.getDimensionX();
                        if (dimension != null) {
                            dimensionListener = new DimensionListener(dimension);
                            ((IEventSource<EntityPropertyChangedEvent<? extends IDimension>>) dimension)
                                    .addListener(dimensionListener);
                        }
View Full Code Here

            if ((config.getDimensionX() != null)
                    && (config.getDimensionX().getActuatorsList() != null)) {
                deviceList.addAll(config.getDimensionX().getActuatorsList());
            }
            if (config instanceof IConfig2D) {
                IConfig2D config2D = (IConfig2D) config;
                if ((config2D.getDimensionY() != null)
                        && (config2D.getDimensionX().getActuatorsList() != null)) {
                    deviceList.addAll(config2D.getDimensionY().getActuatorsList());
                }
            }
            List<String> displayableList = extractAvailableDeviceNames(true, deviceList);
            deviceList.clear();
            int size = Math.min(axisList.size(), displayableList.size());
View Full Code Here

                                .getDimension()).removeListener(dimensionListener);
                    }

                }
                else if (this.config instanceof IConfig2D) {
                    IConfig2D config2D = (IConfig2D) this.config;
                    IDimension dimension;
                    if (this.yActuator) {
                        dimension = config2D.getDimensionY();
                    }
                    else {
                        dimension = config2D.getDimensionX();
                    }
                    if (dimension != null) {
                        ((IEventSource<EntityPropertyChangedEvent<? extends IDimension>>) dimensionListener
                                .getDimension()).removeListener(dimensionListener);
                    }
                }
                else if (this.config instanceof IConfigEnergy) {
                    IConfigEnergy configEnergy = (IConfigEnergy) this.config;
                    IDimension dimension = configEnergy.getDimensionX();
                    if (dimension != null) {
                        ((IEventSource<EntityPropertyChangedEvent<? extends IDimension>>) dimensionListener
                                .getDimension()).removeListener(dimensionListener);
                    }
                }
            }
            this.config = config;
            actuatorListenersList.clear();
            if (config != null) {
                ((IEventSource<EntityPropertyChangedEvent<IConfig<?>>>) this.config)
                        .addListener(configListener);

                if (config instanceof IConfig1D) {
                    IConfig1D config1D = (IConfig1D) config;
                    this.setViewVisible(true);
                    listActuator = config1D.getDimensionX().getActuatorsList();

                    IDimension dimension = config1D.getDimensionX();
                    if (dimension != null) {
                        dimensionListener = new DimensionListener(dimension);
                        ((IEventSource<EntityPropertyChangedEvent<? extends IDimension>>) dimension)
                                .addListener(dimensionListener);
                    }
                }
                else if (config instanceof IConfig2D) {
                    IConfig2D config2D = (IConfig2D) config;
                    if (this.yActuator) { // Case of Y Actuator.
                        this.setViewVisible(true);
                        listActuator = config2D.getDimensionY().getActuatorsList();
                        IDimension dimension = config2D.getDimensionY();
                        if (dimension != null) {
                            dimensionListener = new DimensionListener(dimension);
                            ((IEventSource<EntityPropertyChangedEvent<? extends IDimension>>) dimension)
                                    .addListener(dimensionListener);
                        }
                    }
                    else { // Case of X Actuator.
                        this.setViewVisible(true);
                        listActuator = config2D.getDimensionX().getActuatorsList();
                        IDimension dimension = config2D.getDimensionX();
                        if (dimension != null) {
                            dimensionListener = new DimensionListener(dimension);
                            ((IEventSource<EntityPropertyChangedEvent<? extends IDimension>>) dimension)
                                    .addListener(dimensionListener);
                        }
View Full Code Here

                                    }
                                }
                            }

                        } else if (config instanceof IConfig2D) {
                            IConfig2D config2d = (IConfig2D) config;
                            IDimension2DX dimension2DX = config2d.getDimensionX();
                            List<IActuator> listActuator2DX = dimension2DX.getActuatorsList();
                            List<IRange2DX> range2DX = dimension2DX.getRangesList();

                            for (int i = 0; i < range2DX.size(); i++) {
                                List<ITrajectory> listTrajectory = range2DX.get(i).getTrajectoriesList();
                                for (int j = 0; j < listTrajectory.size(); j++) {
                                    IActuator actuator = listActuator2DX.get(j);
                                    if ((actuator != null) && actuator.isEnabled()) {
                                        ITrajectory trajectory = copyToTrajectoryImpl(actuator, listTrajectory.get(j));
                                        if (trajectory != null) {
                                            trajectories.add(trajectory);
                                        }
                                    }
                                }
                            }

                            IDimension2DY dimension2DY = config2d.getDimensionY();
                            List<IActuator> listActuator2DY = dimension2DY.getActuatorsList();
                            List<IRange2DY> range2DY = dimension2DY.getRangesList();

                            for (int i = 0; i < range2DY.size(); i++) {
                                List<ITrajectory> listTrajectory = range2DY.get(i).getTrajectoriesList();
View Full Code Here

TOP

Related Classes of fr.soleil.salsa.entity.scan2D.IConfig2D

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.