Examples of IDimension


Examples of fr.soleil.salsa.entity.IDimension

                if (config instanceof IConfig2D && this.yActuator) {
                    // For 2D config there is the YDimension to add
                    IConfig2D config2D = (IConfig2D) this.config;
                    this.setViewVisible(true);
                    deviceList = config2D.getDimensionY().getActuatorsList();
                    IDimension dimensionY = config2D.getDimensionY();
                    if (dimensionY != null) {
                        ((IEventSource<EntityPropertyChangedEvent<? extends IDimension>>) dimensionListenerY
                                .getDimension()).removeListener(dimensionListenerY);
                    }
                }
                else {
                    this.setViewVisible(true);
                    IDimension dimension = config.getDimensionX();
                    if (dimension != null) {
                        ((IEventSource<EntityPropertyChangedEvent<? extends IDimension>>) dimensionListener
                                .getDimension()).removeListener(dimensionListener);
                    }
                }

            }
            this.config = aconfig;
            deviceListenersList.clear();
            if (config != null) {
                ((IEventSource<EntityPropertyChangedEvent<IConfig<?>>>) this.config)
                        .addListener(configListener);

                // 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) config;
                    this.setViewVisible(true);
                    deviceList = config2D.getDimensionY().getActuatorsList();
                    IDimension dimensionY = config2D.getDimensionY();
                    if (dimensionY != null) {
                        dimensionListenerY = new DimensionListener(dimensionY);
                        ((IEventSource<EntityPropertyChangedEvent<? extends IDimension>>) dimensionY)
                                .addListener(dimensionListenerY);
                    }
                }
                else {
                    this.setViewVisible(true);
                    IDimension dimension = config.getDimensionX();
                    if (dimension != null) {
                        deviceList = dimension.getActuatorsList();
                        dimensionListener = new DimensionListener(dimension);
                        ((IEventSource<EntityPropertyChangedEvent<? extends IDimension>>) dimension)
                                .addListener(dimensionListener);
                    }
                }
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

            ((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

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

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

            ((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

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) {
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 (config.getDevice(deviceName, actuatorList) == null) {
                                        config.addActuator(actuatorName, false);
View Full Code Here

Examples of fr.soleil.salsa.entity.IDimension

    }

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

Examples of org.eclipse.graphiti.datatypes.IDimension

                    text.setValue(businessValue);
                 
                    //We can user the layoutservice to get the new size
                    //but it seems to be broken wrt new lines so we need
                    //to multiply up by number of lines.
                    IDimension dim = GraphitiUi.getUiLayoutService(
                        ).calculateTextSize(
                            businessValue, text.getFont());
                   
                    text.setHeight(2 + (dim.getHeight() *
                        businessValue.split("\n").length));
                    cs.getGraphicsAlgorithm().setHeight(text.getHeight());
                    if (cs.eContainer() instanceof ContainerShape) {
                      ((ContainerShape) cs.eContainer()
                          ).getGraphicsAlgorithm().setHeight(
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.