Package fr.soleil.salsa.entity.event

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


    @Override
    public ITrajectory createTrajectory(IActuator actuator) {
        ITrajectory trajectory = null;
        if (this instanceof IRange1D) {
            trajectory = new Trajectory1DModel();
        }
        else if (this instanceof IRange2DX) {
            trajectory = new Trajectory2DXModel();
        }
        else if (this instanceof IRange2DY) {
View Full Code Here


            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

            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

    @Override
    public ITrajectory createTrajectory(IActuator actuator) {
        ITrajectory trajectory = null;
        if (this instanceof IRange1D) {
            trajectory = new Trajectory1DModel();
        }
        else if (this instanceof IRange2DX) {
            trajectory = new Trajectory2DXModel();
        }
        else if (this instanceof IRange2DY) {
View Full Code Here

            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);
View Full Code Here

    public void actuatorAddedEvent(List<IActuator> newList) {
        this.actuatorModelsList.add((ActuatorModel) newList.get(newList.size() - 1));
        ((ActuatorModel) newList.get(newList.size() - 1)).addListener(listenerActuator);
        this.notifyAddActuator(newList.get(newList.size() - 1).getName(), true);
        for (int i = 0; i < this.rangeModelsList.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);
            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(
View Full Code Here

    @Override
    public ITrajectory createTrajectory(IActuator actuator) {
        ITrajectory trajectory = null;
        if (this instanceof IRange1D) {
            trajectory = new Trajectory1DModel();
        }
        else if (this instanceof IRange2DX) {
            trajectory = new Trajectory2DXModel();
        }
        else if (this instanceof IRange2DY) {
View Full Code Here

            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

            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

    public void setRange(IRange1D range) {
        this.range = range;
    }

    protected ITrajectory initModel() {
        return new Trajectory1DModel(this);
    }
View Full Code Here

TOP

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

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.