Package fr.soleil.salsa.entity.scan2D

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


     * Set the range.
     *
     * @param range
     */
    public void setRange(IRange2DX range) {
        IRange2DX oldValue = baseBean.getRange();
        baseBean.setRange(range);
        firePropertyChange("range", oldValue, range);
    }
View Full Code Here


     * @return the updated config. It may be another instance entirely.
     */
    // This function returns the configuration it received as parameter.
    // Note that this is specific to LocalConfigMathService and that other implementations of IConfigMathService may behave differently.
    public ITrajectory computeIntegrationTimeChange(ITrajectory newTrajectory) {
        IRange2DX range = ((ITrajectory2DX) newTrajectory).getRange();
        double integrationTime = range.getIntegrationTime();
        for(ITrajectory trajectory : range.getTrajectoriesList()) {
            if(trajectory.getDelta() != null) {
                trajectory.setSpeed(trajectory.getDelta() / integrationTime);
            }
        }
       
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

                    tmp2d.setScanAddOn(new ScanAddOnImp());
                    tmp2d.getScanAddOn().setDisplay(new DisplayImpl());
                    ((IConfig2D) tmp2d).setDimensionX(new Dimension2DXImpl());

                    // Creates one X range for a new 2D config.
                    IRange2DX xRangeToAdd = new Range2DXImpl();
                    xRangeToAdd.setDimension(((IConfig2D) tmp2d).getDimensionX());
                    xRangeToAdd.setIntegrationTime(1.0);
                    xRangeToAdd.setStepsNumber(1);
                    ((IConfig2D) tmp2d).getDimensionX().getRangesList().add(xRangeToAdd);

                    // Creates one Y range for a new 2D config.
                    ((IConfig2D) tmp2d).setDimensionY(new Dimension2DYImpl());
                    Range2DYImpl yRangeToAdd = new Range2DYImpl();
View Full Code Here

     * Set the range.
     *
     * @param range
     */
    public void setRange(IRange2DX range) {
        IRange2DX oldValue = baseBean.getRange();
        baseBean.setRange(range);
        firePropertyChange("range", oldValue, range);
    }
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 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

     */
    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);
                trajectoryListView.setIntegrationTime(j, r.getIntegrationTime() + "");
                trajectoryListView.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(trajectoryListView.getIntegrationTime(j)));
                r.setStepsNumber(Integer.valueOf(trajectoryListView.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

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.