Package fr.soleil.salsa.entity.scan1d

Examples of fr.soleil.salsa.entity.scan1d.IDimension1D


     */
    public void actuatorAddedEvent(List<IActuator> newList) {
        ActuatorModel actuatorModel = (ActuatorModel) newList.get(newList.size() - 1);
        this.actuatorModelsList.add(actuatorModel);
        actuatorModel.addListener(listenerActuator);
        IDimension1D dimension = ((IConfig1D) config).getDimensionX();
        List<IRange1D> range1DList = dimension.getRangesXList();
        if (this.rangeModelsList.size() == 0) {
            this.notifyNewRangeAction();
        }
        for (int i = 0; i < this.rangeModelsList.size(); i++) {
            Range1DModel range = rangeModelsList.get(i);
            IRange1D range1D = range1DList.get(i);
            Trajectory1DModel trajectory1DModelToAdd = new Trajectory1DModel();
            trajectory1DModelToAdd.setBeginPosition(0.0);
            trajectory1DModelToAdd.setEndPosition(0.0);
            trajectory1DModelToAdd.setDelta(0.0);
            trajectory1DModelToAdd.setRelative(false);
            trajectory1DModelToAdd.setSpeed(0.0);
            trajectory1DModelToAdd.setRange(rangeModelsList.get(i));
            range.getTrajectoriesList().add(trajectory1DModelToAdd);
            range1D.getTrajectoriesList().add(trajectory1DModelToAdd);
            dimension.getTrajectoriesList().add(trajectory1DModelToAdd);
            trajectory1DModelToAdd.addListener(listenerTrajectory1D);
            trajectory1DModelToAdd.setActuator(actuatorModel);
        }
        this.notifyAddActuator(actuatorModel.getName(), true);
    }
View Full Code Here


            this.rangeModelsList.clear();
            this.actuatorModelsList.clear();
            if (view != null) {
                view.clearTrajectoriesView();
            }
            IDimension1D dimension1D = ((IConfig1D) config).getDimensionX();
            if (dimension1D != null) {
                List<IRange1D> rangeList = dimension1D.getRangesXList();
                List<IActuator> actuatorsList = dimension1D.getActuatorsList();
                if (rangeList != null) {
                    for (int i = 0; i < rangeList.size(); i++) {
                        this.rangeModelsList.add((Range1DModel) rangeList.get(i));
                    }
                }
View Full Code Here

    @Override
    public void notifyNewRangeAction() {
        if (this.config != null) {
            Range1DModel rangeToAdd = new Range1DModel();
            rangeToAdd.setDimension(((IConfig1D) config).getDimensionX());
            IDimension1D dimension = ((IConfig1D) config).getDimensionX();
            rangeToAdd.setIntegrationTime(1.0);
            rangeToAdd.setStepsNumber(1);
            this.rangeModelsList.add(rangeToAdd);
            ((IConfig1D) config).getDimensionX().getRangesXList().add(rangeToAdd);
            IRange1D range = ((IConfig1D) config).getDimensionX().getRangesXList().get(
                    ((IConfig1D) config).getDimensionX().getRangesXList().size() - 1);
            ((Range1DModel) range).addListener(listenerRange1D);

            for (int i = 0; i < this.actuatorModelsList.size(); i++) {
                Trajectory1DModel trajectory1DModelToAdd = new Trajectory1DModel();
                trajectory1DModelToAdd.setBeginPosition(0.0);
                trajectory1DModelToAdd.setEndPosition(0.0);
                trajectory1DModelToAdd.setDelta(0.0);
                trajectory1DModelToAdd.setRelative(false);
                trajectory1DModelToAdd.setSpeed(0.0);

                rangeToAdd.getTrajectoriesList().add(trajectory1DModelToAdd);
                trajectory1DModelToAdd.setRange(rangeToAdd);
                trajectory1DModelToAdd.setActuator(actuatorModelsList.get(i));

                dimension.getTrajectoriesList().add(trajectory1DModelToAdd);
                ITrajectory1D t = dimension.getTrajectoriesList().get(
                        dimension.getTrajectoriesList().size() - 1);
                ((Trajectory1DModel) t).addListener(listenerTrajectory1D);

            }
            this.view.addRange();
            startListening(config);
View Full Code Here

            trajectory1DModelToAdd.setDelta(0.0);
            trajectory1DModelToAdd.setRelative(false);
            trajectory1DModelToAdd.setSpeed(0.0);
            trajectory1DModelToAdd.setRange(rangeModelsList.get(i));
            this.rangeModelsList.get(i).getTrajectoriesList().add(trajectory1DModelToAdd);
            IDimension1D dimension = ((IConfig1D) config).getDimensionX();

            dimension.getTrajectoriesList().add(trajectory1DModelToAdd);
            ITrajectory1D t = dimension.getTrajectoriesList().get(
                    dimension.getTrajectoriesList().size() - 1);
            ((Trajectory1DModel) t).addListener(listenerTrajectory1D);
            ITrajectory tr = ((IConfig1D) config).getDimensionX().getRangesXList().get(i)
                    .getTrajectoriesList().get(
                            ((IConfig1D) config).getDimensionX().getRangesXList().get(i)
                                    .getTrajectoriesList().size() - 1);
View Full Code Here

                        Element actuators = document.createElement("actuators");
                        ArrayList<ITrajectory> trajectories = new ArrayList<ITrajectory>();
                        // System.out.println("config=" + config.getClass().getName());
                        if (config instanceof IConfig1D) {
                            IConfig1D config1d = (IConfig1D) config;
                            IDimension1D dimensionX = config1d.getDimensionX();
                            List<IActuator> listActuator = dimensionX.getActuatorsList();
                            // System.out.println("Actuator Size=" + listActuator.size());
                            List<IRange1D> range1d = dimensionX.getRangesXList();
                            // System.out.println("range1d=" + range1d.size());
                            for (int rangeIndex = 0; rangeIndex < range1d.size(); rangeIndex++) {
                                IRange1D range1D = range1d.get(rangeIndex);
                                List<ITrajectory> listTrajectory = range1D.getTrajectoriesList();
                                int trajectorySize = listTrajectory.size();
View Full Code Here

     * Adds a range and associated trajectories for the model and the view.
     */
    @Override
    public void notifyNewRangeAction() {
        if (this.config != null) {
            IDimension1D dimension = ((IConfig1D) config).getDimensionX();
            Range1DModel rangeToAdd = new Range1DModel();
            rangeToAdd.setDimension(dimension);
            rangeToAdd.setIntegrationTime(1.0);
            rangeToAdd.setStepsNumber(1);
            this.rangeModelsList.add(rangeToAdd);
            List<IRange1D> range1DList = dimension.getRangesXList();

            for (int i = 0; i < this.actuatorModelsList.size(); i++) {
                Trajectory1DModel trajectory1DModelToAdd = new Trajectory1DModel();
                trajectory1DModelToAdd.setBeginPosition(0.0);
                trajectory1DModelToAdd.setEndPosition(0.0);
                trajectory1DModelToAdd.setDelta(0.0);
                trajectory1DModelToAdd.setRelative(false);
                trajectory1DModelToAdd.setSpeed(0.0);

                rangeToAdd.getTrajectoriesList().add(trajectory1DModelToAdd);
                trajectory1DModelToAdd.setRange(rangeToAdd);
                trajectory1DModelToAdd.setActuator(actuatorModelsList.get(i));
                dimension.getTrajectoriesList().add(trajectory1DModelToAdd);
                trajectory1DModelToAdd.addListener(listenerTrajectory1D);
            }

            if (view != null) {
                view.addRange();
View Full Code Here

     */
    public void actuatorAddedEvent(List<IActuator> newList) {
        ActuatorModel actuatorModel = (ActuatorModel) newList.get(newList.size() - 1);
        this.actuatorModelsList.add(actuatorModel);
        actuatorModel.addListener(listenerActuator);
        IDimension1D dimension = ((IConfig1D) config).getDimensionX();
        List<IRange1D> range1DList = dimension.getRangesXList();
        if (this.rangeModelsList.size() == 0) {
            this.notifyNewRangeAction();
        }
        for (int i = 0; i < this.rangeModelsList.size(); i++) {
            Range1DModel range = rangeModelsList.get(i);
            IRange1D range1D = range1DList.get(i);
            Trajectory1DModel trajectory1DModelToAdd = new Trajectory1DModel();
            trajectory1DModelToAdd.setBeginPosition(0.0);
            trajectory1DModelToAdd.setEndPosition(0.0);
            trajectory1DModelToAdd.setDelta(0.0);
            trajectory1DModelToAdd.setRelative(false);
            trajectory1DModelToAdd.setSpeed(0.0);
            trajectory1DModelToAdd.setRange(rangeModelsList.get(i));
            range.getTrajectoriesList().add(trajectory1DModelToAdd);
            range1D.getTrajectoriesList().add(trajectory1DModelToAdd);
            dimension.getTrajectoriesList().add(trajectory1DModelToAdd);
            trajectory1DModelToAdd.addListener(listenerTrajectory1D);
            trajectory1DModelToAdd.setActuator(actuatorModel);
        }
        this.notifyAddActuator(actuatorModel.getName(), true);
    }
View Full Code Here

            this.rangeModelsList.clear();
            this.actuatorModelsList.clear();
            if (view != null) {
                view.clearTrajectoriesView();
            }
            IDimension1D dimension1D = ((IConfig1D) config).getDimensionX();
            if (dimension1D != null) {
                List<IRange1D> rangeList = dimension1D.getRangesXList();
                List<IActuator> actuatorsList = dimension1D.getActuatorsList();
                if (rangeList != null) {
                    for (int i = 0; i < rangeList.size(); i++) {
                        this.rangeModelsList.add((Range1DModel) rangeList.get(i));
                    }
                }
View Full Code Here

                Element actuators = document.createElement("actuators");
                switch (config.getType()) {

                    case SCAN_1D:
                        IConfig1D config1d = (IConfig1D) config;
                        IDimension1D dimensionX = config1d.getDimensionX();
                        List<IActuator> listActuator = dimensionX.getActuatorsList();
                        ArrayList<ITrajectory> trajectories = new ArrayList<ITrajectory>();
                        List<IRange1D> range1d = dimensionX.getRangesXList();

                        for (int i = 0; i < range1d.size(); i++) {
                            List<ITrajectory> listTrajectory = range1d.get(i).getTrajectoriesList();
                            for (int j = 0; j < listTrajectory.size(); j++) {
                                TrajectoryImpl trajectory = new TrajectoryImpl();
View Full Code Here

                Element actuators = document.createElement("actuators");
                switch (config.getType()) {

                    case SCAN_1D:
                        IConfig1D config1d = (IConfig1D) config;
                        IDimension1D dimensionX = config1d.getDimensionX();
                        List<IActuator> listActuator = dimensionX.getActuatorsList();
                        ArrayList<ITrajectory> trajectories = new ArrayList<ITrajectory>();
                        List<IRange1D> range1d = dimensionX.getRangesXList();

                        for (int i = 0; i < range1d.size(); i++) {
                            List<ITrajectory> listTrajectory = range1d.get(i).getTrajectoriesList();
                            for (int j = 0; j < listTrajectory.size(); j++) {
                                TrajectoryImpl trajectory = new TrajectoryImpl();
View Full Code Here

TOP

Related Classes of fr.soleil.salsa.entity.scan1d.IDimension1D

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.