Package fr.soleil.salsa.entity.event

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


    private static final long serialVersionUID = 4917870690158714296L;

    @Override
    protected IRange initModel() {
        return new Range2DXModel(this);
    }
View Full Code Here


     * Adds a range and associated trajectories for the model and the view.
     */
    @Override
    public void notifyNewRangeAction() {
        if (this.config != null) {
            Range2DXModel rangeToAdd = new Range2DXModel();
            rangeToAdd.setDimension(((IConfig2D) config).getDimensionX());
            rangeToAdd.setIntegrationTime(1.0);
            rangeToAdd.setStepsNumber(1);
            this.rangeModelsList.add(rangeToAdd);
            ((IConfig2D) config).getDimensionX().getRangesList().add(rangeToAdd);
            IRange2DX range = ((IConfig2D) config).getDimensionX().getRangesList()
                    .get(((IConfig2D) config).getDimensionX().getRangesList().size() - 1);
            ((Range2DXModel) range).addListener(listenerRange2DX);

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

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

                ((Trajectory2DXModel) range.getTrajectoriesList().get(i))
                        .addListener(listenerTrajectory2DX);
View Full Code Here

     * Adds a range and associated trajectories for the model and the view.
     */
    @Override
    public void notifyNewRangeAction() {
        if (this.config != null) {
            Range2DXModel rangeToAdd = new Range2DXModel();
            rangeToAdd.setDimension(((IConfig2D) config).getDimensionX());
            rangeToAdd.setIntegrationTime(1.0);
            rangeToAdd.setStepsNumber(1);
            this.rangeModelsList.add(rangeToAdd);
            ((IConfig2D) config).getDimensionX().getRangesList().add(rangeToAdd);
            IRange2DX range = ((IConfig2D) config).getDimensionX().getRangesList().get(
                    ((IConfig2D) config).getDimensionX().getRangesList().size() - 1);
            ((Range2DXModel) range).addListener(listenerRange2DX);

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

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

                ((Trajectory2DXModel) range.getTrajectoriesList().get(i))
                        .addListener(listenerTrajectory2DX);
View Full Code Here

        this.actuatorModelsList.clear();
        List<IRange2DX> rangeList = ((IConfig2D) config).getDimensionX().getRangesList();
        List<IActuator> actuatorsList = ((IConfig2D) config).getDimensionX().getActuatorsList();

        for (int i = 0; i < rangeList.size(); i++) {
            Range2DXModel rangeToAdd = (Range2DXModel) 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) {
            Range2DXModel rangeToAdd = new Range2DXModel();
            rangeToAdd.setDimension(((IConfig2D) config).getDimensionX());
            rangeToAdd.setIntegrationTime(1.0);
            rangeToAdd.setStepsNumber(1);
            this.rangeModelsList.add(rangeToAdd);
            ((IConfig2D) config).getDimensionX().getRangesList().add(rangeToAdd);
            IRange2DX range = ((IConfig2D) config).getDimensionX().getRangesList()
                    .get(((IConfig2D) config).getDimensionX().getRangesList().size() - 1);
            ((Range2DXModel) range).addListener(listenerRange2DX);

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

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

                ((Trajectory2DXModel) range.getTrajectoriesList().get(i))
                        .addListener(listenerTrajectory2DX);
View Full Code Here

     * Adds a range and associated trajectories for the model and the view.
     */
    @Override
    public void notifyNewRangeAction() {
        if (this.config != null) {
            Range2DXModel rangeToAdd = new Range2DXModel();
            rangeToAdd.setDimension(((IConfig2D) config).getDimensionX());
            rangeToAdd.setIntegrationTime(1.0);
            rangeToAdd.setStepsNumber(1);
            this.rangeModelsList.add(rangeToAdd);
            ((IConfig2D) config).getDimensionX().getRangesList().add(rangeToAdd);
            IRange2DX range = ((IConfig2D) config).getDimensionX().getRangesList()
                    .get(((IConfig2D) config).getDimensionX().getRangesList().size() - 1);
            ((Range2DXModel) range).addListener(listenerRange2DX);

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

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

                ((Trajectory2DXModel) range.getTrajectoriesList().get(i)).addListener(listenerTrajectory2DX);

View Full Code Here

     * Adds a range and associated trajectories for the model and the view.
     */
    @Override
    public void notifyNewRangeAction() {
        if (this.config != null) {
            Range2DXModel rangeToAdd = new Range2DXModel();
            rangeToAdd.setDimension(((IConfig2D) config).getDimensionX());
            rangeToAdd.setIntegrationTime(1.0);
            rangeToAdd.setStepsNumber(1);
            this.rangeModelsList.add(rangeToAdd);
            ((IConfig2D) config).getDimensionX().getRangesList().add(rangeToAdd);
            IRange2DX range = ((IConfig2D) config).getDimensionX().getRangesList().get(
                    ((IConfig2D) config).getDimensionX().getRangesList().size() - 1);
            ((Range2DXModel) range).addListener(listenerRange2DX);

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

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

                ((Trajectory2DXModel) range.getTrajectoriesList().get(i))
                        .addListener(listenerTrajectory2DX);
View Full Code Here

        this.actuatorModelsList.clear();
        List<IRange2DX> rangeList = ((IConfig2D) config).getDimensionX().getRangesList();
        List<IActuator> actuatorsList = ((IConfig2D) config).getDimensionX().getActuatorsList();

        for (int i = 0; i < rangeList.size(); i++) {
            Range2DXModel rangeToAdd = (Range2DXModel) 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) {
            Range2DXModel rangeToAdd = new Range2DXModel();
            rangeToAdd.setDimension(((IConfig2D) config).getDimensionX());
            rangeToAdd.setIntegrationTime(1.0);
            rangeToAdd.setStepsNumber(1);
            this.rangeModelsList.add(rangeToAdd);
            ((IConfig2D) config).getDimensionX().getRangesList().add(rangeToAdd);
            IRange2DX range = ((IConfig2D) config).getDimensionX().getRangesList()
                    .get(((IConfig2D) config).getDimensionX().getRangesList().size() - 1);
            ((Range2DXModel) range).addListener(listenerRange2DX);

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

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

                ((Trajectory2DXModel) range.getTrajectoriesList().get(i))
                        .addListener(listenerTrajectory2DX);
View Full Code Here

     * Adds a range and associated trajectories for the model and the view.
     */
    @Override
    public void notifyNewRangeAction() {
        if (this.config != null) {
            Range2DXModel rangeToAdd = new Range2DXModel();
            rangeToAdd.setDimension(((IConfig2D) config).getDimensionX());
            rangeToAdd.setIntegrationTime(1.0);
            rangeToAdd.setStepsNumber(1);
            this.rangeModelsList.add(rangeToAdd);
            ((IConfig2D) config).getDimensionX().getRangesList().add(rangeToAdd);
            IRange2DX range = ((IConfig2D) config).getDimensionX().getRangesList()
                    .get(((IConfig2D) config).getDimensionX().getRangesList().size() - 1);
            ((Range2DXModel) range).addListener(listenerRange2DX);

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

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

                ((Trajectory2DXModel) range.getTrajectoriesList().get(i))
                        .addListener(listenerTrajectory2DX);
View Full Code Here

TOP

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

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.