Package fr.soleil.salsa.entity.scank

Examples of fr.soleil.salsa.entity.scank.ITrajectoryK


    @Override
    public void notifyNFieldChange(Double value) {
        if (config == null)
            return;

        ITrajectoryK trajectory = ((IConfigK) config).getDimensionX().getTrajectory();
        if (trajectory != null) {
            trajectory.setN(value);
            write();
            refresh();
        }
    }
View Full Code Here


    @Override
    public void notifyPostEdgeTimeFieldChange(Double value) {
        if (config == null)
            return;

        ITrajectoryK trajectory = ((IConfigK) config).getDimensionX().getTrajectory();
        if (trajectory != null) {
            trajectory.setTimePostEdge(value);
            write();
            refresh();
        }
    }
View Full Code Here

        return this.baseBean.getTrajectory();
    }

    @Override
    public void setTrajectory(ITrajectoryK trajectory) {
        ITrajectoryK oldValue = this.baseBean.getTrajectory();
        this.baseBean.setTrajectory(trajectory);
        this.firePropertyChange("trajectory", oldValue, trajectory);
    }
View Full Code Here

                trajectory = new TrajectoryHCSImpl();
                ((ITrajectoryHCS) trajectory).setDeltaConstant(false);
            }
            else if (config instanceof IConfigK) {
                trajectory = new TrajectoryKImpl();
                ITrajectoryK trajectoryKModel = (ITrajectoryK) trajectory;

                // Pre Edge Parameters
                trajectoryKModel.setEMin((double) 0);
                trajectoryKModel.setEDeltaPreEdge((double) 0);
                trajectoryKModel.setTimePreEdge((double) 0);

                // Edge Parameters
                trajectoryKModel.setE0((double) 0);
                trajectoryKModel.setE1((double) 0);
                trajectoryKModel.setE2((double) 0);
                trajectoryKModel.setEDeltaEdge((double) 0);
                trajectoryKModel.setTimeEdge((double) 0);

                // Connexion Parameter
                trajectoryKModel.setM((double) 0);

                // Post Edge Parameters
                trajectoryKModel.setKMin((double) 0);
                trajectoryKModel.setKMax((double) 0);
                trajectoryKModel.setKDelta((double) 0);
                trajectoryKModel.setTimePostEdge((double) 0);
                trajectoryKModel.setN((double) 0);
            }
        }
        if (trajectory != null) {
            initBasicTrajectory(trajectory);
        }
View Full Code Here

                int enabledActuatorsNumber = 0;

                if (dimension instanceof IDimensionK) {
                    enabledActuatorsNumber = 1;

                    ITrajectoryK trajectoryK = ((IDimensionK) dimension).getRangeX()
                            .getTrajectory();

                    allActuatorsPositionsArray = TrajectoryCalculator
                            .calculateKTrajectoriesPosition(trajectoryK);
                    // System.out.println("K Trajectory="
                    // + Arrays.toString(trajectoriesPositionsArray));
                    // System.out.println("K Trajectory size=" + trajectoriesPositionsArray.length);
                    integrationsTimesArray = TrajectoryCalculator
                            .calculateIntegrationTimesK(trajectoryK);
                    // System.out.println("K integration size=" + integrationsTimesArray.length);
                    // System.out.println("K integration=" +
                    // Arrays.toString(integrationsTimesArray));
                    totalStepsNumber = allActuatorsPositionsArray.length;
                    speedList.add(trajectoryK.getSpeed());
                }
                else {
                    // The positions must be sorted by actuator, so we loop over the actuators.
                    for (int index = 0; index < actuatorsList.size(); index++) {
                        IActuator actuator = actuatorsList.get(index);
View Full Code Here

     */
    public void setConfig(IConfig<?> config) {
        if (this.config != config) {
            if (config != null && config instanceof IConfigK) {
                this.setViewVisible(true);
                ITrajectoryK iTrajectoryK = ((IConfigK) config).getDimensionX().getTrajectory();
                IRangeK iRangeK = ((IConfigK) config).getDimensionX().getRangeX();
                if (iTrajectoryK != null) {
                    this.config = config;
                    this.trajectoryKModel = null;
                    this.trajectoryKModel = (TrajectoryKModel) iTrajectoryK;
View Full Code Here

    /**
     * Writes the trajectory data from the config into the view.
     */
    public void refresh() {
        if (this.trajectoryKModel != null) {
            ITrajectoryK trajectory = ((IConfigK) config).getDimensionX().getTrajectory();

            // Pre Edge Parameters
            this.scanKTrajectoryView.setEMinField(trajectory.getEMin() + "");
            this.scanKTrajectoryView.setEDeltaPreEdgeField(trajectory.getEDeltaPreEdge() + "");
            this.scanKTrajectoryView.setTimePreEdgeField(trajectory.getTimePreEdge() + "");

            // Edge Parameters
            this.scanKTrajectoryView.setE0Field(trajectory.getE0() + "");
            this.scanKTrajectoryView.setE1Field(trajectory.getE1() + "");
            this.scanKTrajectoryView.setE2Field(trajectory.getE2() + "");
            this.scanKTrajectoryView.setEDeltaEdgeField(trajectory.getEDeltaEdge() + "");
            this.scanKTrajectoryView.setTimeEdgeField(trajectory.getTimeEdge() + "");

            // Connexion Parameter
            this.scanKTrajectoryView.setMField(trajectory.getM() + "");

            // Pre Edge Parameters
            this.scanKTrajectoryView.setKMin(trajectory.getKMin() + "");
            this.scanKTrajectoryView.setKMaxField(trajectory.getKMax() + "");
            this.scanKTrajectoryView.setKDeltaField(trajectory.getKDelta() + "");
            this.scanKTrajectoryView.setTimePostEdgeField(trajectory.getTimePostEdge() + "");
            this.scanKTrajectoryView.setNField(trajectory.getN() + "");

        }
    }
View Full Code Here

    /**
     * Reads the trajectory data from the view and writes it in the config.
     */
    public void read() {
        if (this.config != null) {
            ITrajectoryK trajectory = ((IConfigK) config).getDimensionX().getTrajectory();

            // Pre Edge Parameters
            trajectory.setEMin(scanKTrajectoryView.getEMin());
            trajectory.setEDeltaPreEdge(scanKTrajectoryView.getEDeltaPreEdge());
            trajectory.setTimePreEdge(scanKTrajectoryView.getTimePreEdge());

            // Edge Parameters
            trajectory.setE0(scanKTrajectoryView.getE0());
            trajectory.setE1(scanKTrajectoryView.getE1());
            trajectory.setE2(scanKTrajectoryView.getE2());
            trajectory.setEDeltaEdge(scanKTrajectoryView.getEDeltaEdge());
            trajectory.setTimeEdge(scanKTrajectoryView.getTimeEdge());

            // Connexion Parameter
            trajectory.setM(scanKTrajectoryView.getM());

            // Post Edge Parameters
            trajectory.setKMin(scanKTrajectoryView.getKMin());
            trajectory.setKMax(scanKTrajectoryView.getKMax());
            trajectory.setKDelta(scanKTrajectoryView.getKDelta());
            trajectory.setTimePostEdge(scanKTrajectoryView.getTimePostEdge());
            trajectory.setN(scanKTrajectoryView.getN());

        }
    }
View Full Code Here

    /**
     * Writes config into model.
     */
    public void write() {
        if (this.config != null) {
            ITrajectoryK trajectory = ((IConfigK) config).getDimensionX().getTrajectory();
            if (this.trajectoryKModel == null) {
                trajectoryKModel = new TrajectoryKModel();
            }

            // Pre Edge Parameters
            trajectoryKModel.setEMin(trajectory.getEMin());
            trajectoryKModel.setEDeltaPreEdge(trajectory.getEDeltaPreEdge());
            trajectoryKModel.setTimePreEdge(trajectory.getTimePreEdge());

            // Edge Parameters
            trajectoryKModel.setE0(trajectory.getE0());
            trajectoryKModel.setE1(trajectory.getE1());
            trajectoryKModel.setE2(trajectory.getE2());
            trajectoryKModel.setEDeltaEdge(trajectory.getEDeltaEdge());
            trajectoryKModel.setTimeEdge(trajectory.getTimeEdge());

            // Connexion Parameter
            trajectoryKModel.setM(trajectory.getM());

            // Post Edge Parameters
            trajectoryKModel.setKMin(trajectory.getKMin());
            trajectoryKModel.setKMax(trajectory.getKMax());
            trajectoryKModel.setKDelta(trajectory.getKDelta());
            trajectoryKModel.setTimePostEdge(trajectory.getTimePostEdge());
            trajectoryKModel.setN(trajectory.getN());
            ConfigChangeListener.getInstance().startListening(applicationController.getConfig());
            ConfigChangeListener.getInstance().configChanged();
        }
    }
View Full Code Here

    @Override
    public void notifyEminFieldChange(Double value) {
        if (config == null)
            return;

        ITrajectoryK trajectory = ((IConfigK) config).getDimensionX().getTrajectory();
        if (trajectory != null) {
            trajectory.setEMin(value);
            write();
            refresh();
        }
    }
View Full Code Here

TOP

Related Classes of fr.soleil.salsa.entity.scank.ITrajectoryK

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.