Package fr.soleil.data.service

Examples of fr.soleil.data.service.IDataSourceProducer


            }
        }
    }

    private void setStringSpectrumModel(IKey attributeKey) {
        IDataSourceProducer producer = getProducer();
        if (producer != null && producer.isSourceCreatable(attributeKey)) {
            stringBox.connectWidget(textArea, attributeKey);
        }
    }
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();
                    try {
                        if (producer != null) {
                            // Backward Command
                            backwardCmd = producer.createDataSource(tangoKey);
                        }
                    }
                    catch (Exception e) {
                        // TODO: handle exception
                    }

                    propertyValue = deviceBundle.getString("UserMotorBean.command.forward");
                    tangoKey = generateCommandKey(propertyValue);
                    producer = getProducer();
                    if (producer != null) {
                        try {
                            // Forward Command
                            forwardCmd = producer.createDataSource(tangoKey);
                        }
                        catch (Exception e) {
                            // TODO: handle exception
                        }
                    }
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);
            if ((src != null) && Number.class.equals(src.getDataType().getConcernedClass())) {
                dataSource = (AbstractDataSource<Number>) src;
            }
        }
        catch (Exception e) {
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

            }
        }
    }

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

    }

    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

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

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

                // For some motor Backward and Forward Command does not
                // exist XPSAxis
                final IDataSourceProducer producer = getProducer();
                if (producer != null) {
                    property = deviceBundle.getString("UserMotorBean.command.backward");
                    if (TangoCommandHelper.isCommandExist(getModel(), property)) {
                        key = generateCommandKey(property);
                        try {
                            // Backward Command
                            backwardCmd = producer.createDataSource(key);
                        } catch (final Exception e) {
                            Logger.getLogger(Mediator.LOGGER_ACCESS).log(
                                    Level.WARNING,
                                    UserMotorBean.this.getClass().getSimpleName()
                                            + " failed to connect to backward command", e);
                        }
                        getBackwardButton().setVisible(true);
                    } else {
                        getBackwardButton().setVisible(false);
                    }

                    property = deviceBundle.getString("UserMotorBean.command.forward");
                    if (TangoCommandHelper.isCommandExist(getModel(), property)) {
                        key = generateCommandKey(property);
                        try {
                            // Forward Command
                            forwardCmd = producer.createDataSource(key);
                        } catch (final Exception e) {
                            Logger.getLogger(Mediator.LOGGER_ACCESS).log(
                                    Level.WARNING,
                                    UserMotorBean.this.getClass().getSimpleName()
                                            + " failed to connect to forward command", e);
View Full Code Here

        this.jButtonIncActionPerformed(evt);
    }

    @SuppressWarnings("unchecked")
    private AbstractDataSource<Number> getNumberSource(final IKey key) {
        final IDataSourceProducer producer = getProducer();
        AbstractDataSource<Number> dataSource = null;
        AbstractDataSource<?> src = null;
        try {
            src = producer.createDataSource(key);
            if ((src != null) && (src.getDataType() != null)
                    && Number.class.equals(src.getDataType().getConcernedClass())) {
                dataSource = (AbstractDataSource<Number>) src;
            }
        } catch (final Exception e) {
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.