Package fr.soleil.salsa.entity

Examples of fr.soleil.salsa.entity.IDimension


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


            ((IEventSource<EntityPropertyChangedEvent<IPostScanBehaviour>>) postScanBehaviour)
                    .removeListener(postScanBehaviourListener);
        }
        if (this.config != null && this.config instanceof IConfig1D
                && this.config instanceof IEventSource) {
            IDimension d = ((IConfig1D) this.config).getDimensionX();
            if (d != null && d instanceof IEventSource) {
                ((IEventSource<EntityPropertyChangedEvent<IDimension>>) d)
                        .removeListener(dimensionListener);
            }
        }
        this.config = config;
        if (config != null) {

            if (config.getScanAddOn() == null) {
                config.setScanAddOn(new ScanAddOnModel());
            }
            scanAddOns = config.getScanAddOn();

            if (scanAddOns.getPostScanBehaviour() == null) {
                scanAddOns.setPostScanBehaviour(new PostScanBehaviourModel());
            }
            postScanBehaviour = scanAddOns.getPostScanBehaviour();

            refresh();

            ((IEventSource<EntityPropertyChangedEvent<IPostScanBehaviour>>) postScanBehaviour)
                    .addListener(postScanBehaviourListener);

            ((IEventSource<EntityPropertyChangedEvent<IConfig<?>>>) this.config)
                    .addListener(configListener);
            IDimension d = null;
            if (config instanceof IConfig1D) {
                d = ((IConfig1D) config).getDimensionX();
            }
            if (d != null) {
                ((IEventSource<EntityPropertyChangedEvent<IDimension>>) d)
View Full Code Here

        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

        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

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

        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

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

            ((IEventSource<EntityPropertyChangedEvent<IPostScanBehaviour>>) postScanBehaviour)
                    .removeListener(postScanBehaviourListener);
        }
        if (this.config != null && this.config instanceof IConfig1D
                && this.config instanceof IEventSource) {
            IDimension d = ((IConfig1D) this.config).getDimensionX();
            if (d != null && d instanceof IEventSource) {
                ((IEventSource<EntityPropertyChangedEvent<IDimension>>) d)
                        .removeListener(dimensionListener);
            }
        }
        this.config = config;
        if (config != null) {

            if (config.getScanAddOn() == null) {
                config.setScanAddOn(new ScanAddOnModel());
            }
            scanAddOns = config.getScanAddOn();

            if (scanAddOns.getPostScanBehaviour() == null) {
                scanAddOns.setPostScanBehaviour(new PostScanBehaviourModel());
            }
            postScanBehaviour = scanAddOns.getPostScanBehaviour();

            refresh();

            ((IEventSource<EntityPropertyChangedEvent<IPostScanBehaviour>>) postScanBehaviour)
                    .addListener(postScanBehaviourListener);

            ((IEventSource<EntityPropertyChangedEvent<IConfig<?>>>) this.config)
                    .addListener(configListener);
            IDimension d = null;
            if (config instanceof IConfig1D) {
                d = ((IConfig1D) config).getDimensionX();
            }
            if (d != null) {
                ((IEventSource<EntityPropertyChangedEvent<IDimension>>) d)
View Full Code Here

        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

                            .getDevice()).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.getDimensionX();
                    if (dimension != null) {
                        ((IEventSource<EntityPropertyChangedEvent<? extends IDimension>>) dimensionListener
                                .getDimension()).removeListener(dimensionListener);
                    }
                }
            }
            this.config = config;
            deviceListenersList.clear();
            if (config != null) {
                ((IEventSource<EntityPropertyChangedEvent<IConfig<?>>>) this.config)
                        .addListener(configListener);

                if (config instanceof IConfig1D) {
                    IConfig1D config1D = (IConfig1D) config;
                    this.setViewVisible(true);
                    deviceList = 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);
                        deviceList = 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);
                        deviceList = 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);
                    deviceList = configEnergy.getDimensionX().getActuatorsList();

                    IDimension dimension = configEnergy.getDimensionX();
                    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);
                    deviceList = 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);
                        deviceList = 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

TOP

Related Classes of fr.soleil.salsa.entity.IDimension

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.