Examples of IDimension


Examples of fr.soleil.salsa.entity.IDimension

        IDirectory result = (IDirectory) Map(d, DirectoryModel.class, false);
        return result;
    }

    public static IDimension copyDimensionToModel(IDimension dimension) {
        IDimension result = (IDimension) Map(dimension, dimension.getClass(), true);
        return result;
    }
View Full Code Here

Examples of fr.soleil.salsa.entity.IDimension

                            .getActuator()).removeListener(actuatorListener);
                }
                if (this.config instanceof IConfig1D) {

                    IConfig1D config1D = (IConfig1D) this.config;
                    IDimension dimension = config1D.getDimensionX();
                    if (dimension != null) {
                        ((IEventSource<EntityPropertyChangedEvent<? extends IDimension>>) dimensionListener
                                .getDimension()).removeListener(dimensionListener);
                    }

                }
                else if (this.config instanceof IConfig2D) {
                    IConfig2D config2D = (IConfig2D) this.config;
                    IDimension dimension;
                    if (this.yActuator) {
                        dimension = config2D.getDimensionY();
                    }
                    else {
                        dimension = config2D.getDimensionX();
                    }
                    if (dimension != null) {
                        ((IEventSource<EntityPropertyChangedEvent<? extends IDimension>>) dimensionListener
                                .getDimension()).removeListener(dimensionListener);
                    }
                }
                else if (this.config instanceof IConfigEnergy) {
                    IConfigEnergy configEnergy = (IConfigEnergy) this.config;
                    IDimension dimension = configEnergy.getDimensionEnergy();
                    if (dimension != null) {
                        ((IEventSource<EntityPropertyChangedEvent<? extends IDimension>>) dimensionListener
                                .getDimension()).removeListener(dimensionListener);
                    }
                }
            }
            this.config = config;
            actuatorListenersList.clear();
            if (config != null) {
                ((IEventSource<EntityPropertyChangedEvent<IConfig>>) this.config)
                        .addListener(configListener);

                if (config instanceof IConfig1D) {
                    IConfig1D config1D = (IConfig1D) config;
                    this.setViewVisible(true);
                    listActuator = config1D.getDimensionX().getActuatorsList();

                    IDimension dimension = config1D.getDimensionX();
                    if (dimension != null) {
                        dimensionListener = new DimensionListener(dimension);
                        ((IEventSource<EntityPropertyChangedEvent<? extends IDimension>>) dimension)
                                .addListener(dimensionListener);
                    }
                }
                else if (config instanceof IConfig2D) {
                    IConfig2D config2D = (IConfig2D) config;
                    if (this.yActuator) { // Case of Y Actuator.
                        this.setViewVisible(true);
                        listActuator = config2D.getDimensionY().getActuatorsList();
                        IDimension dimension = config2D.getDimensionY();
                        if (dimension != null) {
                            dimensionListener = new DimensionListener(dimension);
                            ((IEventSource<EntityPropertyChangedEvent<? extends IDimension>>) dimension)
                                    .addListener(dimensionListener);
                        }
                    }
                    else { // Case of X Actuator.
                        this.setViewVisible(true);
                        listActuator = config2D.getDimensionX().getActuatorsList();
                        IDimension dimension = config2D.getDimensionX();
                        if (dimension != null) {
                            dimensionListener = new DimensionListener(dimension);
                            ((IEventSource<EntityPropertyChangedEvent<? extends IDimension>>) dimension)
                                    .addListener(dimensionListener);
                        }

                    }
                }
                else if (config instanceof IConfigEnergy) {
                    IConfigEnergy configEnergy = (IConfigEnergy) config;
                    this.setViewVisible(true);
                    listActuator = configEnergy.getDimensionEnergy().getActuatorsList();

                    IDimension dimension = configEnergy.getDimensionEnergy();
                    if (dimension != null) {
                        dimensionListener = new DimensionListener(dimension);
                        ((IEventSource<EntityPropertyChangedEvent<? extends IDimension>>) dimension)
                                .addListener(dimensionListener);
                    }
                }

                // Actuator used for ScanHCS
                else if (config instanceof IConfigHCS) {
                    IConfigHCS configHCS = (IConfigHCS) config;
                    this.setViewVisible(true);
                    listActuator = configHCS.getDimensionX().getActuatorsList();

                    IDimension dimension = configHCS.getDimensionX();
                    if (dimension != null) {
                        dimensionListener = new DimensionListener(dimension);
                        ((IEventSource<EntityPropertyChangedEvent<? extends IDimension>>) dimension)
                                .addListener(dimensionListener);
                    }
                }
                else {
                    if (config instanceof IConfigK) {
                        IConfigK configK = (IConfigK) config;
                        this.setViewVisible(true);
                        listActuator = configK.getDimensionX().getActuatorsList();

                        IDimension dimension = configK.getDimensionX();
                        if (dimension != null) {
                            dimensionListener = new DimensionListener(dimension);
                            ((IEventSource<EntityPropertyChangedEvent<? extends IDimension>>) dimension)
                                    .addListener(dimensionListener);
                        }
View Full Code Here

Examples of fr.soleil.salsa.entity.IDimension

    public static double calculSpeed(final double delta, final double integrationTime) {
        return delta / integrationTime;
    }

    public static IDimension getDimension(IConfig<?> config, boolean yActuator) {
        IDimension dimension = config.getDimensionX();
        if ((config instanceof IConfig2D) && yActuator) {
            dimension = ((IConfig2D) config).getDimensionY();
        }
        return dimension;
    }
View Full Code Here

Examples of fr.soleil.salsa.entity.IDimension

    }

    public static List<? extends IRange> getRangeList(IConfig<?> config, boolean yActuator) {
        List<? extends IRange> rangeList = null;
        IDimension dimension = config.getDimensionX();
        if ((config instanceof IConfig2D) && yActuator) {
            dimension = ((IConfig2D) config).getDimensionY();
        }

        if (dimension instanceof IDimension1D) {
View Full Code Here

Examples of fr.soleil.salsa.entity.IDimension

    /**
     *
     */
    public void setDimension(IDimension dimension) {
        IDimension oldValue = this.baseBean.getDimension();
        this.baseBean.setDimension(dimension);
        this.firePropertyChange("dimension", oldValue, dimension);
    }
View Full Code Here

Examples of fr.soleil.salsa.entity.IDimension

        setViewVisible((config != null) && (config instanceof IConfigEnergy));
    }

    @Override
    protected IDimension initDimension(IConfig<?> aconfig) {
        IDimension newDimension = null;
        if (aconfig != null && aconfig instanceof IConfigEnergy) {
            newDimension = aconfig.getDimensionX();
        }
        return newDimension;
    }
View Full Code Here

Examples of fr.soleil.salsa.entity.IDimension

    }

    @Override
    protected void initDeviceList() {
        if (config != null) {
            IDimension dimension = null;
            // All type of config have an X dimension
            if ((config instanceof IConfig2D) && this.yActuator) {
                // For 2D config there is the YDimension to add
                IConfig2D config2D = (IConfig2D) this.config;
                dimension = config2D.getDimensionY();
            } else {
                dimension = config.getDimensionX();
            }
            if (dimension != null) {
                deviceList = dimension.getActuatorsList();
            }
        }
    }
View Full Code Here

Examples of fr.soleil.salsa.entity.IDimension

        if (fromConfiguration) {
            // get device list from configuration
            deviceList = new ArrayList<String>();
            if (config != null) {
                sensors = config.getSensorsList();
                IDimension dimensionX = config.getDimensionX();
                if (dimensionX != null) {
                    actuatorsX = dimensionX.getActuatorsList();
                }
                if (config instanceof IConfig2D) {
                    IDimension dimensionY = ((IConfig2D) config).getDimensionY();
                    if (dimensionY != null) {
                        actuatorsY = dimensionY.getActuatorsList();
                    }
                }
            }
        }
        else {
View Full Code Here

Examples of fr.soleil.salsa.entity.IDimension

            if (TangoAttributeHelper.isAttributeRunning(deviceName, ACTUATORS_ATTRIBUTE)) {
                DeviceProxy proxy = TangoDeviceHelper.getDeviceProxy(deviceName);
                try {
                    DeviceAttribute deviceAttribute = proxy.read_attribute(ACTUATORS_ATTRIBUTE);
                    String[] attributeList = deviceAttribute.extractStringArray();
                    IDimension dimension = config.getDimensionX();
                    if (dimension != null) {
                        List<IActuator> actuatorList = dimension.getActuatorsList();
                        // Check if the actuators are not already defined
                        // Then add
                        for (String actuatorName : attributeList) {
                            if (!isDeviceBelongToList(actuatorName, actuatorList)) {
                                config.addActuator(actuatorName, false);
View Full Code Here

Examples of fr.soleil.salsa.entity.IDimension

        refresh(true);
    }

    public void refresh(boolean saved) {
        IConfig<?> currentConfig = config;
        IDimension currentDimension = null;
        if (saved) {
            currentConfig = dbconfig;
        }

        if (currentConfig != null && currentConfig instanceof IConfig2D) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.