Package fr.soleil.data.service

Examples of fr.soleil.data.service.IDataSourceProducer


    }

    private void setScalarWidgetModel(IKey attributeKey) {
        setWidgetModel(readNumberField, stringBox, attributeKey);
        setWidgetModel(hiddenTextField, stringBox, attributeKey);
        IDataSourceProducer producer = getProducer();
        if (producer != null) {
            boolean isSettable = producer.isSourceSettable(attributeKey);
            wheelswitch.setVisible(isSettable);
            if (isSettable) {
                attributeKey = generateWriteAttributeKey(attributeName);
                setWidgetModel(wheelswitch, numberScalarBox, attributeKey);
            }
View Full Code Here


    private void setChartWidgetModel(IKey attributeKey) {
        setWidgetModel(chartViewer, chartBox, attributeKey);
        // System.out.println("Id read =" + attributeKey.getInformationKey());
        chartViewer.setDataViewColor(attributeKey.getInformationKey(), Color.RED);
        IDataSourceProducer producer = getProducer();
        if (producer != null) {
            boolean isSettable = producer.isSourceSettable(attributeKey);
            wheelswitch.setVisible(false);
            if (isSettable) {
                IKey writeAttributeKey = generateWriteAttributeKey(attributeName);
                // System.out.println("Id read =" + writeAttributeKey.getInformationKey());
                setWidgetModel(chartViewer, chartBox, writeAttributeKey);
View Full Code Here

            }
        }
    }

    private void setStringSpectrumModel(IKey attributeKey) {
        IDataSourceProducer producer = getProducer();
        if (producer != null && producer.isSourceCreatable(attributeKey)) {
            stringBox.connectWidget(textArea, attributeKey);
        }
    }
View Full Code Here

                        if (!UserMotorBean.this.isSimpleMotorBeanGUI) {
                            propertyValue = UserMotorBean.this.deviceBundle
                                    .getString("UserMotorBean.command.defineposition");
                            // - Define Position Command
                            tangoKey = UserMotorBean.this.generateCommandKey(propertyValue);
                            final IDataSourceProducer producer = UserMotorBean.this.getProducer();
                            if (producer != null) {
                                final boolean isCreatable = producer.isSourceCreatable(tangoKey);
                                // System.out.println("isCreatable=" +
                                // isCreatable);
                                if (isCreatable) {
                                    UserMotorBean.this.setWidgetModel(
                                            UserMotorBean.this.getDefinePositionViewer(),
                                            UserMotorBean.this.stringBox, tangoKey);
                                    UserMotorBean.this.getDefinePositionViewer().setText("<-|->");
                                }
                                UserMotorBean.this.getDefinePositionViewer()
                                        .setVisible(isCreatable);
                            }
                        }

                        // SetModel for StateViewer
                        tangoKey = UserMotorBean.this.generateAttributeKey("State");
                        UserMotorBean.this.setStateModel();

                        // For some motor Backward and Forward Command does not exist XPSAxis
                        IDataSourceProducer producer = getProducer();
                        if (producer != null) {
                            propertyValue = deviceBundle
                                    .getString("UserMotorBean.command.backward");
                            getBackwardButton().setVisible(false);
                            if (TangoCommandHelper.isCommandExist(model, propertyValue)) {
                                tangoKey = generateCommandKey(propertyValue);
                                try {
                                    // Backward Command
                                    backwardCmd = producer.createDataSource(tangoKey);
                                }
                                catch (final Exception e) {
                                    // TODO: handle exception
                                }
                                getBackwardButton().setVisible(true);
                            }

                            propertyValue = deviceBundle.getString("UserMotorBean.command.forward");
                            getForwardButton().setVisible(false);
                            if (TangoCommandHelper.isCommandExist(model, propertyValue)) {
                                tangoKey = generateCommandKey(propertyValue);
                                try {
                                    // Forward Command
                                    forwardCmd = producer.createDataSource(tangoKey);
                                }
                                catch (final Exception e) {
                                    // TODO: handle exception
                                }
                                getForwardButton().setVisible(true);
View Full Code Here

        this.jButtonIncActionPerformed(evt);
    }

    @SuppressWarnings("unchecked")
    private AbstractDataSource<Number> getNumberSource(final IKey key) {
        final IDataSourceProducer producer = this.getProducer();
        AbstractDataSource<Number> dataSource = null;
        AbstractDataSource<?> src = null;
        try {
            src = producer.createDataSource(key);
            if ((src != null) && Number.class.equals(src.getDataType().getConcernedClass())) {
                dataSource = (AbstractDataSource<Number>) src;
            }
        }
        catch (final Exception e) {
View Full Code Here

                    if (!isSimpleMotorBeanGUI) {
                        propertyValue = deviceBundle
                                .getString("UserMotorBean.command.defineposition");
                        // - Define Position Command
                        tangoKey = generateCommandKey(propertyValue);
                        IDataSourceProducer producer = getProducer();
                        if (producer != null) {
                            boolean isCreatable = producer.isSourceCreatable(tangoKey);
                            // System.out.println("isCreatable=" + isCreatable);
                            if (isCreatable) {
                                setWidgetModel(getDefinePositionViewer(), stringBox, tangoKey);
                                getDefinePositionViewer().setText("<-|->");
                            }
                            getDefinePositionViewer().setVisible(isCreatable);
                        }
                    }

                    // SetModel for StateViewer
                    tangoKey = generateAttributeKey("State");
                    setStateModel();

                    propertyValue = deviceBundle.getString("UserMotorBean.command.backward");
                    tangoKey = generateCommandKey(propertyValue);

                    IDataSourceProducer producer = getProducer();
                    if (producer != null) {
                        // Backward Command
                        backwardCmd = producer.createDataSource(tangoKey);
                    }

                    propertyValue = deviceBundle.getString("UserMotorBean.command.forward");
                    tangoKey = generateCommandKey(propertyValue);
                    producer = getProducer();
                    if (producer != null) {
                        // Forward Command
                        forwardCmd = producer.createDataSource(tangoKey);
                    }
                }
            }
        };
        getDefinePositionViewer().setText("<-|->");
View Full Code Here

        jButtonIncActionPerformed(evt);
    }

    @SuppressWarnings("unchecked")
    private AbstractDataSource<Number> getNumberSource(IKey key) {
        IDataSourceProducer producer = getProducer();
        AbstractDataSource<Number> dataSource = null;
        AbstractDataSource<?> src = null;
        src = producer.createDataSource(key);
        if ((src != null) && Number.class.equals(src.getDataType().getConcernedClass())) {
            dataSource = (AbstractDataSource<Number>) src;
        }

        return dataSource;
View Full Code Here

        if (!this.isSimpleMotorBeanGUI) {
            propertyValue = this.deviceBundle.getString("UserMotorBean.command.defineposition");
            // - Define Position Command
            tangoKey = generateCommandKey(propertyValue);
            IDataSourceProducer producer = getProducer();
            if (producer != null) {
                boolean isCreatable = producer.isSourceCreatable(tangoKey);
                // System.out.println("isCreatable=" + isCreatable);
                if (isCreatable) {
                    setWidgetModel(getDefinePositionViewer(), stringBox, tangoKey);
                    getDefinePositionViewer().setText("<-|->");
                }
                getDefinePositionViewer().setVisible(isCreatable);
            }
        }

        // SetModel for StateViewer
        tangoKey = generateAttributeKey("State");
        setStateModel();

        propertyValue = this.deviceBundle.getString("UserMotorBean.command.backward");
        tangoKey = generateCommandKey(propertyValue);

        IDataSourceProducer producer = getProducer();
        if (producer != null) {
            // Backward Command
            try {
                backwardCmd = producer.createDataSource(tangoKey);
            }
            catch (UnhandledDataTypeException e) {
                System.out.println("Couldn't create backward command");
            }
        }

        propertyValue = this.deviceBundle.getString("UserMotorBean.command.forward");
        tangoKey = generateCommandKey(propertyValue);
        producer = getProducer();
        if (producer != null) {
            // Forward Command
            try {
                forwardCmd = producer.createDataSource(tangoKey);
            }
            catch (UnhandledDataTypeException e) {
                System.out.println("Couldn't create forward command");
            }
        }
View Full Code Here

        jButtonIncActionPerformed(evt);
    }

    @SuppressWarnings("unchecked")
    private AbstractDataSource<Number> getNumberSource(IKey key) {
        IDataSourceProducer producer = getProducer();
        AbstractDataSource<Number> dataSource = null;
        AbstractDataSource<?> src = null;
        try {
            src = producer.createDataSource(key);
        }
        catch (UnhandledDataTypeException e1) {
            e1.printStackTrace();
        }
        if ((src != null) && Number.class.equals(src.getDataType().getConcernedClass())) {
View Full Code Here

            }
        }
    }

    private void setStringSpectrumModel(IKey attributeKey) {
        IDataSourceProducer producer = getProducer();
        if ((producer != null) && producer.isSourceCreatable(attributeKey)) {
            stringBox.connectWidget(textArea, attributeKey);
        }
    }
View Full Code Here

TOP

Related Classes of fr.soleil.data.service.IDataSourceProducer

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.