Package fr.soleil.salsa.entity.scanenergy

Examples of fr.soleil.salsa.entity.scanenergy.IDimensionEnergy


     * The trajectory is created or deleted according to the existence or not of the actuator.
     */
    private void syncTrajectoriesWithActuators() {

        if (config != null) {
            IDimensionEnergy dimensionEnergy = config.getDimensionX();
            List<IActuator> actuatorsList = dimensionEnergy.getActuatorsList();
            if (actuatorsList.size() == 0) {
                dimensionEnergy.getRangesEnergyList().clear();
                view.enableButtons(false);
            }
            else {
                view.enableButtons(true);
            }
View Full Code Here


     * The new range button has been clicked.
     */
    @Override
    public void notifyNewRange() {
        if (config != null) {
            IDimensionEnergy dimensionEnergy = config.getDimensionX();
            List<IActuator> actuatorsList = dimensionEnergy.getActuatorsList();
            if (actuatorsList.size() != 0) {
                IActuator actuator = actuatorsList.get(0);
                IRangeEnergy rangeEnergy = createRange(dimensionEnergy);
                ITrajectoryEnergy trajectoryEnergy = createTrajectory(rangeEnergy, actuator);
                List<ITrajectory> trajectoriesList = rangeEnergy.getTrajectoriesList();
                if (trajectoriesList == null) {
                    trajectoriesList = new ArrayList<ITrajectory>();
                    rangeEnergy.setTrajectoriesList(trajectoriesList);
                }
                rangeEnergy.getTrajectoriesList().add(trajectoryEnergy);
                dimensionEnergy.getRangesEnergyList().add(rangeEnergy);
            }
        }
        refresh();
    }
View Full Code Here

     * The delete range button has been clicked.
     */
    @Override
    public void notifyDeleteRange(int row) {
        if (row != -1) {
            IDimensionEnergy dimensionEnergy = config.getDimensionX();
            List<IActuator> actuatorsList = dimensionEnergy.getActuatorsList();
            if (actuatorsList.size() != 0) {
                dimensionEnergy.getRangesEnergyList().remove(row);
            }
        }
        refresh();
    }
View Full Code Here

                                }
                            }

                        } else if (config instanceof IConfigEnergy) {
                            IConfigEnergy configEnergy = (IConfigEnergy) config;
                            IDimensionEnergy dimensionEnergy = configEnergy.getDimensionX();
                            List<IActuator> listActuatorEnergy = dimensionEnergy.getActuatorsList();

                            List<IRangeEnergy> rangeEnergy = dimensionEnergy.getRangesEnergyList();
                            for (int i = 0; i < rangeEnergy.size(); i++) {
                                List<ITrajectory> listTrajectories = rangeEnergy.get(i).getTrajectoriesList();
                                for (int j = 0; j < listTrajectories.size(); j++) {
                                    IActuator actuator = listActuatorEnergy.get(j);
                                    if ((actuator != null) && actuator.isEnabled()) {
View Full Code Here

            tmpRangeList = dimension2DX.getRangesList();
        } else if (this instanceof IDimension2DY) {
            IDimension2DY dimension2DY = ((IDimension2DY) this);
            tmpRangeList = dimension2DY.getRangesList();
        } else if (this instanceof IDimensionEnergy) {
            IDimensionEnergy dimensionEnergy = ((IDimensionEnergy) this);
            tmpRangeList = dimensionEnergy.getRangesEnergyList();
        } else if (this instanceof IDimensionHCS) {
            IDimensionHCS dimensionHCS = ((IDimensionHCS) this);
            tmpRangeList = dimensionHCS.getRangesXList();
        } else if (this instanceof IDimensionK) {
            IDimensionK dimensionK = ((IDimensionK) this);
View Full Code Here

            dimension2DX.setRangesList((List<IRange2DX>) arangeList);
        } else if (this instanceof IDimension2DY) {
            IDimension2DY dimension2DY = ((IDimension2DY) this);
            dimension2DY.setRangesList((List<IRange2DY>) arangeList);
        } else if (this instanceof IDimensionEnergy) {
            IDimensionEnergy dimensionEnergy = ((IDimensionEnergy) this);
            dimensionEnergy.setRangesEnergyList((List<IRangeEnergy>) arangeList);
        } else if (this instanceof IDimensionHCS) {
            IDimensionHCS dimensionHCS = ((IDimensionHCS) this);
            dimensionHCS.setRangesXList((List<IRangeHCS>) arangeList);
        } else if (this instanceof IDimensionK) {
            IDimensionK dimensionK = ((IDimensionK) this);
View Full Code Here

        if (dimension2DY == null) {
            dimension2DY = new Dimension2DYImpl();
            config2D.setDimensionY(dimension2DY);
        }

        IDimensionEnergy dimensionEnergy = configEnergy.getDimensionX();
        if (dimensionEnergy == null) {
            dimensionEnergy = new DimensionEnergyImpl();
            configEnergy.setDimensionX(dimensionEnergy);
        }
View Full Code Here

                            }

                        }
                        else if (config instanceof IConfigEnergy) {
                            IConfigEnergy configEnergy = (IConfigEnergy) config;
                            IDimensionEnergy dimensionEnergy = configEnergy.getDimensionX();
                            List<IActuator> listActuatorEnergy = dimensionEnergy.getActuatorsList();

                            List<IRangeEnergy> rangeEnergy = dimensionEnergy.getRangesEnergyList();
                            for (int i = 0; i < rangeEnergy.size(); i++) {
                                List<ITrajectory> listTrajectories = rangeEnergy.get(i)
                                        .getTrajectoriesList();
                                for (int j = 0; j < listTrajectories.size(); j++) {
                                    IActuator actuator = listActuatorEnergy.get(j);
View Full Code Here

TOP

Related Classes of fr.soleil.salsa.entity.scanenergy.IDimensionEnergy

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.