Package fr.soleil.salsa.client.entity.event

Examples of fr.soleil.salsa.client.entity.event.RangeHCSModel


     * Adds a range and associated trajectories for the model and the view.
     */
    @Override
    public void notifyNewRangeAction() {
        if (this.config != null) {
            RangeHCSModel rangeToAdd = new RangeHCSModel();
            rangeToAdd.setDimension(((IConfigHCS) config).getDimensionX());
            this.rangeModelsList.add(rangeToAdd);
            ((IConfigHCS) config).getDimensionX().getRangesXList().add(rangeToAdd);
            IRangeHCS range = ((IConfigHCS) config).getDimensionX().getRangesXList().get(
                    ((IConfigHCS) config).getDimensionX().getRangesXList().size() - 1);
            ((RangeHCSModel) range).addListener(listenerRangeHCS);

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

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

                ((TrajectoryHCSModel) range.getTrajectoriesList().get(i))
                        .addListener(listenerTrajectoryHCS);
View Full Code Here


        this.actuatorModelsList.clear();
        List<IRangeHCS> rangeList = ((IConfigHCS) config).getDimensionX().getRangesXList();
        List<IActuator> actuatorsList = ((IConfigHCS) config).getDimensionX().getActuatorsList();

        for (int i = 0; i < rangeList.size(); i++) {
            RangeHCSModel rangeToAdd = (RangeHCSModel) rangeList.get(i);
            this.rangeModelsList.add(rangeToAdd);
        }

        for (int i = 0; i < actuatorsList.size(); i++) {
            this.actuatorModelsList.add((ActuatorModel) actuatorsList.get(i));
View Full Code Here

     * Adds a range and associated trajectories for the model and the view.
     */
    @Override
    public void notifyNewRangeAction() {
        if (this.config != null) {
            RangeHCSModel rangeToAdd = new RangeHCSModel();
            rangeToAdd.setDimension(((IConfigHCS) config).getDimensionX());
            this.rangeModelsList.add(rangeToAdd);
            ((IConfigHCS) config).getDimensionX().getRangesXList().add(rangeToAdd);
            IRangeHCS range = ((IConfigHCS) config).getDimensionX().getRangesXList().get(
                    ((IConfigHCS) config).getDimensionX().getRangesXList().size() - 1);
            ((RangeHCSModel) range).addListener(listenerRangeHCS);

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

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

                ((TrajectoryHCSModel) range.getTrajectoriesList().get(i))
                        .addListener(listenerTrajectoryHCS);
View Full Code Here

        this.actuatorModelsList.clear();
        List<IRangeHCS> rangeList = ((IConfigHCS) config).getDimensionX().getRangesXList();
        List<IActuator> actuatorsList = ((IConfigHCS) config).getDimensionX().getActuatorsList();

        for (int i = 0; i < rangeList.size(); i++) {
            RangeHCSModel rangeToAdd = (RangeHCSModel) rangeList.get(i);
            this.rangeModelsList.add(rangeToAdd);
        }

        for (int i = 0; i < actuatorsList.size(); i++) {
            this.actuatorModelsList.add((ActuatorModel) actuatorsList.get(i));
View Full Code Here

TOP

Related Classes of fr.soleil.salsa.client.entity.event.RangeHCSModel

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.