Package fr.soleil.salsa.entity.scank

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


        if (trajectory != null) {
            String id = trajectory.getName();
            actuator.setAttribute("id", id);

            if (trajectory instanceof ITrajectoryK) {
                ITrajectoryK trajectoryK = (ITrajectoryK) trajectory;
                actuator.setAttribute("e0", String.valueOf(trajectoryK.getE0()));
                actuator.setAttribute("e1", String.valueOf(trajectoryK.getE1()));
                actuator.setAttribute("e2", String.valueOf(trajectoryK.getE2()));
                actuator.setAttribute("edeltaedge", String.valueOf(trajectoryK.getEDeltaEdge()));
                actuator.setAttribute("edeltapreEdge",
                        String.valueOf(trajectoryK.getEDeltaPreEdge()));
                actuator.setAttribute("emin", String.valueOf(trajectoryK.getEMin()));
                actuator.setAttribute("kdelta", String.valueOf(trajectoryK.getKDelta()));
                actuator.setAttribute("kmax", String.valueOf(trajectoryK.getKMax()));
                actuator.setAttribute("kmin", String.valueOf(trajectoryK.getKMin()));
                actuator.setAttribute("m", String.valueOf(trajectoryK.getM()));
                actuator.setAttribute("n", String.valueOf(trajectoryK.getN()));
            }
            else {
                actuator.setAttribute("from", String.valueOf(trajectory.getBeginPosition()));
                actuator.setAttribute("to", String.valueOf(trajectory.getEndPosition()));
                actuator.setAttribute("delta", String.valueOf(trajectory.getDelta()));
View Full Code Here


     * @param trajectory the trajectory that was modified.
     * @return the updated config.
     */
    public static void computeE0Change(ITrajectoryK trajectory) {

        ITrajectoryK trajectoryImpl = AutoCopier.toImpl(trajectory, ITrajectoryK.class);
        ITrajectoryK result = (ITrajectoryK) ConfigKApi.computeE0Change(trajectoryImpl);

        swapTrajectory(trajectory, result);

    }
View Full Code Here

     *
     * @param trajectory the trajectory that was modified.
     * @return the updated config.
     */
    public static void computeE2Change(ITrajectoryK trajectory) {
        ITrajectoryK trajectoryImpl = AutoCopier.toImpl(trajectory, ITrajectoryK.class);
        ITrajectoryK result = (ITrajectoryK) ConfigKApi.computeE2Change(trajectoryImpl);
        swapTrajectory(trajectory, result);
    }
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 && view != null) {
            ITrajectoryK trajectory = ((IConfigK) config).getDimensionX().getTrajectory();

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

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

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

            // Pre Edge Parameters
            this.view.setKMin(trajectory.getKMin() + "");
            this.view.setKMaxField(trajectory.getKMax() + "");
            this.view.setKDeltaField(trajectory.getKDelta() + "");
            this.view.setTimePostEdgeField(trajectory.getTimePostEdge() + "");
            this.view.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 && view != null) {
            ITrajectoryK trajectory = ((IConfigK) config).getDimensionX().getTrajectory();

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

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

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

            // Post Edge Parameters
            trajectory.setKMin(view.getKMin());
            trajectory.setKMax(view.getKMax());
            trajectory.setKDelta(view.getKDelta());
            trajectory.setTimePostEdge(view.getTimePostEdge());
            trajectory.setN(view.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(config);
            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

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

        ITrajectoryK trajectory = ((IConfigK) config).getDimensionX().getTrajectory();
        if (trajectory != null) {
            trajectory.setEDeltaPreEdge(value);
            write();
            refresh();
        }

    }
View Full Code Here

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

        ITrajectoryK trajectory = ((IConfigK) config).getDimensionX().getTrajectory();
        if (trajectory != null) {
            trajectory.setTimePreEdge(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.