Package fr.soleil.salsa.entity.scanenergy

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


                    break;

                case SCAN_ENERGY:

                    IConfigEnergy configEnergy = (IConfigEnergy) config;
                    IDimensionEnergy dimensionEnergy = configEnergy.getDimensionEnergy();
                    List<IActuator> listActuatorEnergy = dimensionEnergy.getActuatorsList();

                    ArrayList<ITrajectory> trajectoriesEnergy = new ArrayList<ITrajectory>();

                    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++) {
                            ITrajectory trajectoryEnergy = new TrajectoryImpl();
View Full Code Here


        return this.baseBean.getDimensionX();
    }

    @Override
    public void setDimensionX(IDimensionEnergy dimensionEnergy) {
        IDimensionEnergy oldValue = this.baseBean.getDimensionX();
        this.baseBean.setDimensionX(dimensionEnergy);
        this.firePropertyChange("dimensionEnergy", oldValue, dimensionEnergy);

    }
View Full Code Here

        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();
        }
View Full Code Here

        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);
        }
View Full Code Here

                    break;

                case SCAN_ENERGY:

                    IConfigEnergy configEnergy = (IConfigEnergy) config;
                    IDimensionEnergy dimensionEnergy = configEnergy.getDimensionX();
                    List<IActuator> listActuatorEnergy = dimensionEnergy.getActuatorsList();

                    ArrayList<ITrajectory> trajectoriesEnergy = new ArrayList<ITrajectory>();

                    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++) {
                            ITrajectory trajectoryEnergy = new TrajectoryImpl();
View Full Code Here

            config = null;
        }
        else {
            // The current config
            config = (IConfigEnergy) iconfig;
            IDimensionEnergy dimensionEnergy = config.getDimensionX();

            // The first range
            if (config.getDimensionX().getRangesEnergyList() == null) {
                List<IRangeEnergy> rangesList = new ArrayList<IRangeEnergy>();
                ListModel<IRangeEnergy, DimensionModel> rangesModelList = new ListModel<IRangeEnergy, DimensionModel>(
                        rangesList, ((DimensionModel) config.getDimensionX()), "rangeEnergy");
                dimensionEnergy.setRangesEnergyList(rangesModelList);
            }

            syncTrajectoriesWithActuators();

            ((DimensionEnergyModel) dimensionEnergy).addListener(actuatorsListListener);

            for (IRangeEnergy rangeEnergy : dimensionEnergy.getRangesEnergyList()) {
                castAndAddMultiListener(rangeEnergy);
                for (ITrajectory trajectoryEnergy : rangeEnergy.getTrajectoriesList()) {
                    castAndAddMultiListener(trajectoryEnergy);
                }
            }
View Full Code Here

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

        if (config != null && view != 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

    @Override
    protected IConfig<IDimensionEnergy> initModel() {
        ConfigEnergyModel configEnergyDModel = new ConfigEnergyModel(this);

        IDimensionEnergy dimension = (IDimensionEnergy) getDimensionX();
        if (dimension != null) {
            IDimensionEnergy dimensionModel = (IDimensionEnergy) dimension.toModel();
            List<IActuator> actuatorList = dimension.getActuatorsList();
            List<IActuator> actuatorListModel = convertActuatorListToModel(actuatorList);
            dimensionModel.setActuatorsList(actuatorListModel);

            List<IRangeEnergy> rangeList = dimension.getRangesEnergyList();
            List<IRangeEnergy> rangeModelList = new ArrayList<IRangeEnergy>();
            for (IRangeEnergy range : rangeList) {
                rangeModelList.add((IRangeEnergy) range.toModel());
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.