Package fr.soleil.salsa.entity.event

Examples of fr.soleil.salsa.entity.event.ActuatorModel


                    IConfig1D config1d = (IConfig1D) config;
                    List<IActuator> actuators = config1d.getDimensionX().getActuatorsList();
                    view.clearActuators();
                    for (int i = 0; i < actuators.size(); i++) {
                        IActuator a = (IActuator) actuators.get(i);
                        ActuatorModel eActuator = (ActuatorModel) a;
                        eActuator.addListener(actuatorListener);
                        view.addActuator(a.getName(), a.getName());
                        if (i == postScanBehaviour.getActuator()) {
                            view.setActuatorSelected(i);
                        }
                    }
View Full Code Here


            }
            IDevice device = super.getDevice(actuatorName, actuatorList);
            if (device != null) {
                device.setCommon(true);
            } else {
                device = new ActuatorModel();
                device.setName(actuatorName);
                actuatorList.add((IActuator) device);
                IDimension tmpDimension = null;
                if (!yActuator && !dimensionList.isEmpty()) {
                    tmpDimension = dimensionList.get(0);
View Full Code Here

                    sensor.setEnabled(false);
                    ((List<ISensor>) deviceList).add(sensor);
                    newDevice = sensor;
                }
                if (device instanceof IActuator) {
                    IActuator actuator = new ActuatorModel();
                    actuator.setName(deviceName);
                    actuator.setEnabled(false);
                    ((List<IActuator>) deviceList).add(actuator);
                    newDevice = actuator;
                }
                if (device instanceof ITimebase) {
                    ITimebase timebase = new TimebaseModel();
View Full Code Here

     */
    public static List<Integer> diff(List<ActuatorModel> l1, List<IActuator> l2) {
        List<Integer> result = new ArrayList<Integer>();
        for (int i = 0; i < l1.size(); i++) {

            ActuatorModel a = l1.get(i);

            if (!myContains(l2, a)) {
                result.add(i);
            }
        }
View Full Code Here

     */
    public static List<Integer> diff(List<ActuatorModel> l1, List<IActuator> l2) {
        List<Integer> result = new ArrayList<Integer>();
        for (int i = 0; i < l1.size(); i++) {

            ActuatorModel a = l1.get(i);

            if (!myContains(l2, a)) {
                result.add(i);
            }
        }
View Full Code Here

     */
    public static List<Integer> diff(List<ActuatorModel> l1, List<IActuator> l2) {
        List<Integer> result = new ArrayList<Integer>();
        for (int i = 0; i < l1.size(); i++) {

            ActuatorModel a = l1.get(i);

            if (!myContains(l2, a)) {
                result.add(i);
            }
        }
View Full Code Here

     * Called when an actuator added.
     *
     * @param newList
     */
    public void actuatorAddedEvent(List<IActuator> newList) {
        ActuatorModel actuatorModel = (ActuatorModel) newList.get(newList.size() - 1);
        this.actuatorModelsList.add(actuatorModel);
        actuatorModel.addListener(listenerActuator);
        IDimension1D dimension = ((IConfig1D) config).getDimensionX();
        List<IRange1D> range1DList = dimension.getRangesXList();
        if (this.rangeModelsList.size() == 0) {
            this.notifyNewRangeAction();
        }
        for (int i = 0; i < this.rangeModelsList.size(); i++) {
            Range1DModel range = rangeModelsList.get(i);
            IRange1D range1D = range1DList.get(i);
            Trajectory1DModel trajectory1DModelToAdd = new Trajectory1DModel();
            trajectory1DModelToAdd.setBeginPosition(0.0);
            trajectory1DModelToAdd.setEndPosition(0.0);
            trajectory1DModelToAdd.setDelta(0.0);
            trajectory1DModelToAdd.setRelative(false);
            trajectory1DModelToAdd.setSpeed(0.0);
            trajectory1DModelToAdd.setRange(rangeModelsList.get(i));
            range.getTrajectoriesList().add(trajectory1DModelToAdd);
            range1D.getTrajectoriesList().add(trajectory1DModelToAdd);
            dimension.getTrajectoriesList().add(trajectory1DModelToAdd);
            trajectory1DModelToAdd.addListener(listenerTrajectory1D);
            trajectory1DModelToAdd.setActuator(actuatorModel);
        }
        this.notifyAddActuator(actuatorModel.getName(), true);
    }
View Full Code Here

            // Case when the list of actuator equal 1 and the type of scan is SCAN ENERGY
            // Can not add other row in the list of actuators
            boolean stopAdd = ((config.getType().equals(ScanType.SCAN_ENERGY) || (config.getType()
                    .equals(ScanType.SCAN_K))) && listActuator.size() == 1) ? true : false;
            if (!stopAdd) {
                IActuator actuator = new ActuatorModel();
                actuator.setName(DEFAULT_ACTUATOR_NAME);
                if (value != null) {
                    actuator.setName(value);
                }
                actuator.setEnabled(true);
                boolean addSucces = this.view.addRow(actuator);
                if (addSucces)
                    this.listActuator.add(actuator);
            }
View Full Code Here

        }
        else if (this.listActuator.size() == 0) {
            for (int i = 0; i < this.view.getModel().getRowCount(); i++) {
                String actuatorName = (String) this.view.getModel().getValueAt(i, 1);
                Boolean isEnabled = (Boolean) this.view.getModel().getValueAt(i, 0);
                IActuator actuator = new ActuatorModel();
                actuator.setName(actuatorName);
                actuator.setEnabled(isEnabled);
                this.listActuator.add(actuator);
            }

        }
    }
View Full Code Here

     */
    public static List<Integer> diff(List<ActuatorModel> l1, List<IActuator> l2) {
        List<Integer> result = new ArrayList<Integer>();
        for (int i = 0; i < l1.size(); i++) {

            ActuatorModel a = l1.get(i);

            if (!myContains(l2, a)) {
                result.add(i);
            }
        }
View Full Code Here

TOP

Related Classes of fr.soleil.salsa.entity.event.ActuatorModel

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.