Package fr.soleil.salsa.entity.scan2D

Examples of fr.soleil.salsa.entity.scan2D.IRange2DX


    }

    public static void swapTrajectory(ITrajectory2DX t1, ITrajectory2DX t2) {
        swapBasicTrajectory(t1, t2);
        // swapActuator(t1, t2);
        IRange2DX t1Range = t1.getRange();
        t1.setRange(t2.getRange());
        t2.setRange(t1Range);
    }
View Full Code Here


                    config = new Config2DImpl();
                    config.setScanAddOn(new ScanAddOnImp());
                    config.getScanAddOn().setDisplay(new DisplayImpl());
                    ((IConfig2D) config).setDimensionX(new Dimension2DXImpl());
                    // Creates one X range for a new 2D config.
                    IRange2DX xRangeToAdd = new Range2DXImpl();
                    xRangeToAdd.setDimension(((IConfig2D) config).getDimensionX());
                    xRangeToAdd.setIntegrationTime(1.0);
                    xRangeToAdd.setStepsNumber(1);
                    ((IConfig2D) config).getDimensionX().getRangesList().add(xRangeToAdd);
                    // Creates one Y range for a new 2D config.
                    ((IConfig2D) config).setDimensionY(new Dimension2DYImpl());
                    Range2DYImpl yRangeToAdd = new Range2DYImpl();
                    yRangeToAdd.setDimension(((IConfig2D) config).getDimensionY());
View Full Code Here

     */
    public void read() {
        if ((this.config != null) && (view != null)) {

            for (int j = 0; j < ((IConfig2D) config).getDimensionX().getRangesList().size(); j++) {
                IRange2DX r = ((IConfig2D) config).getDimensionX().getRangesList().get(j);
                r.setIntegrationTime(Double.valueOf(view.getIntegrationTime(j)));
                r.setStepsNumber(Integer.valueOf(view.getStepNumber(j)));
            }

            for (int j = 0; j < ((IConfig2D) config).getDimensionX().getRangesList().size(); j++) {
                for (int i = 0; i < ((IConfig2D) config).getDimensionX().getActuatorsList().size(); i++) {

View Full Code Here

            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);

            }
            if (view != null) {
                view.addRange();
View Full Code Here

     */
    public void refresh() {
        if (this.rangeModelsList != null && this.actuatorModelsList != null) {

            for (int j = 0; j < ((IConfig2D) config).getDimensionX().getRangesList().size(); j++) {
                IRange2DX r = ((IConfig2D) config).getDimensionX().getRangesList().get(j);
                view.setIntegrationTime(j, r.getIntegrationTime() + "");
                view.setStepNumber(j, r.getStepsNumber() + "");
            }

            for (int i = 0; i < ((IConfig2D) config).getDimensionX().getRangesList().size(); i++)
                for (int j = 0; j < ((IConfig2D) config).getDimensionX().getRangesList().get(i)
                        .getTrajectoriesList().size(); j++) {
View Full Code Here

     */
    public void read() {
        if (this.config != null) {

            for (int j = 0; j < ((IConfig2D) config).getDimensionX().getRangesList().size(); j++) {
                IRange2DX r = ((IConfig2D) config).getDimensionX().getRangesList().get(j);
                r.setIntegrationTime(Double.valueOf(view.getIntegrationTime(j)));
                r.setStepsNumber(Integer.valueOf(view.getStepNumber(j)));
            }

            for (int j = 0; j < ((IConfig2D) config).getDimensionX().getRangesList().size(); j++) {
                for (int i = 0; i < ((IConfig2D) config).getDimensionX().getActuatorsList().size(); i++) {

View Full Code Here

        ITrajectory2DX trajectoryImpl = getPartialTrajectory(trajectory);

        ITrajectory2DX trajectoryResult = (ITrajectory2DX) Config2DApi
                .computeIntegrationTimeChange(trajectoryImpl);

        IRange2DX rangeResult = trajectoryResult.getRange();
        swapRange(range, rangeResult);

        write();
        refresh();
    }
View Full Code Here

        ITrajectory2DX trajectoryImpl = getPartialTrajectory(trajectory);

        ITrajectory2DX trajectoryResult = (ITrajectory2DX) Config2DApi.computeStepsNumberChange(
                trajectoryImpl, false, 0.0);

        IRange2DX rangeResult = trajectoryResult.getRange();
        swapRange(range, rangeResult);

        write();
        refresh();
View Full Code Here

        trajectoryImpl.setDelta(delta);

        ITrajectory2DX result = (ITrajectory2DX) Config2DApi.computeDeltaChange(trajectoryImpl,
                false, 0.0);

        IRange2DX resultRange = result.getRange();
        IRange2DX range = trajectory.getRange();
        range.setNumberOfSteps(resultRange.getNumberOfSteps());
        range.setStepsNumber(resultRange.getStepsNumber());
        range.setIntegrationTime(resultRange.getIntegrationTime());
        swapRange(range, resultRange);

        write();
        refresh();
View Full Code Here

            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);

            }
            this.view.addRange();
            startListening(config);
View Full Code Here

TOP

Related Classes of fr.soleil.salsa.entity.scan2D.IRange2DX

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.