Package fr.soleil.data.service

Examples of fr.soleil.data.service.IKey


        }
        chartViewer.setDataViewsSortedOnX(false);
    }

    private void connectAttribute(String deviceName, String attribute, int axis) {
        IKey dataKey = null;
        TangoKey yTangoKey = new TangoKey();
        TangoKeyTool.registerAttribute(yTangoKey, deviceName, attribute);
        if (xTangoKey != null) {
            // Connect Widget to the source in dual
            String attributeName = TangoKeyTool.getAttributeName(xTangoKey);
View Full Code Here


        ImageViewer imageViewer = new ImageViewer();

        imageViewer.setTitledBorder("Input (first item in output table)");

        IKey imageKey = tangoKeyGenerator.getImageNumberMatrixKey();

        Label label = new Label();

        label.setTitledBorder("Second item in output table");
View Full Code Here

        TangoKeyTool.registerAttribute(yTangoKey, deviceName, attribute);
        if (xTangoKey != null) {
            // Connect Widget to the source in dual
            String attributeName = TangoKeyTool.getAttributeName(xTangoKey);
            boolean column = (attributeName.indexOf("actuator_2") > -1);
            IKey dualKey = ChartViewerBox.createDualKey(xTangoKey, yTangoKey);
            chartBox.setSplitMatrixThroughColumns(dualKey, column);
            chartBox.connectWidget(chartViewer, dualKey);
            // chartBox.setSplitMatrixThroughColumns(dualKey, column);
            // chartBox.connectWidgetDual(chartViewer, xTangoKey, yTangoKey);
        }
View Full Code Here

            }
        }
    }

    private void connectAttribute(String deviceName, String attribute, int axis, TangoKey xTangoKey) {
        IKey dataKey = null;
        TangoKey yTangoKey = new TangoKey();
        TangoKeyTool.registerAttribute(yTangoKey, deviceName, attribute);
        if (xTangoKey != null) {
            // Connect Widget to the source in dual
            String attributeName = TangoKeyTool.getAttributeName(xTangoKey);
            boolean column = (attributeName.indexOf("actuator_2") > -1);
            dataKey = ChartViewerBox.createDualKey(xTangoKey, yTangoKey);
            chartBox.setSplitMatrixThroughColumns(dataKey, column);
            // System.out.println("connectWidget dual x=" + xTangoKey.getInformationKey());
            // System.out.println("connectWidget dual y=" + yTangoKey.getInformationKey());
            // System.out.println("connectWidget dual=" + dataKey.getInformationKey());
        }
        else {
            // Connect Widget to the source
            // System.out.println("connectWidget=" + yTangoKey.getInformationKey());
            dataKey = yTangoKey;
        }
        // Set on the desired axis information Key is equal to the dataView id
        setRefreshingPeriod(yTangoKey);
        String dataViewId = yTangoKey.getInformationKey();
        // System.out.println("Attribute Key = " + tangoKey.getInformationKey());
        setDataViewConfiguration(dataViewId, axis, deviceName, attribute, -1);
        // Bug 0024053 set configuration axis before add data
        if (dataKey != null && !connectedDataList.contains(dataKey.getInformationKey())) {
            // System.out.println("connectWidget=" + dataKey.getInformationKey());
            connectedDataList.add(dataKey.getInformationKey());
            chartBox.connectWidget(chartViewer, dataKey);
        }
    }
View Full Code Here

            }
        }
    }

    private void connectAttribute(String deviceName, String attribute, int axis, TangoKey xTangoKey) {
        IKey dataKey = null;
        TangoKey yTangoKey = new TangoKey();
        TangoKeyTool.registerAttribute(yTangoKey, deviceName, attribute);
        if (xTangoKey != null) {
            // Connect Widget to the source in dual
            String attributeName = TangoKeyTool.getAttributeName(xTangoKey);
            boolean column = (attributeName.indexOf("actuator_2") > -1);
            dataKey = ChartViewerBox.createDualKey(xTangoKey, yTangoKey);
            chartBox.setSplitMatrixThroughColumns(dataKey, column);
            // System.out.println("connectWidget dual x=" +
            // xTangoKey.getInformationKey());
            // System.out.println("connectWidget dual y=" +
            // yTangoKey.getInformationKey());
            // System.out.println("connectWidget dual=" +
            // dataKey.getInformationKey());
        } else {
            // Connect Widget to the source
            // System.out.println("connectWidget=" +
            // yTangoKey.getInformationKey());
            dataKey = yTangoKey;
        }
        // Set on the desired axis information Key is equal to the dataView id
        setRefreshingPeriod(yTangoKey);
        String dataViewId = yTangoKey.getInformationKey();
        // System.out.println("Attribute Key = " +
        // tangoKey.getInformationKey());
        setDataViewConfiguration(dataViewId, axis, deviceName, attribute, -1);
        // Bug 0024053 set configuration axis before add data
        if (dataKey != null && !connectedDataList.contains(dataKey.getInformationKey())) {
            // System.out.println("connectWidget=" +
            // dataKey.getInformationKey());
            connectedDataList.add(dataKey.getInformationKey());
            chartBox.connectWidget(chartViewer, dataKey);
        }
    }
View Full Code Here

    }

    @Override
    protected void refreshGUI() {
        if (model != null && !model.isEmpty()) {
            IKey currentConfig = generateAttributeKey("currentConfig");
            stringBox.connectWidget(currentConfigViewer, currentConfig);

            DeviceProxy proxy = TangoDeviceHelper.getDeviceProxy(getModel());
            if (proxy != null) {
                try {
View Full Code Here

        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);
                chartViewer.setDataViewColor(writeAttributeKey.getInformationKey(), Color.BLUE);
            }
        }
    }
View Full Code Here

            int format = TangoAttributeHelper.getAttributeFormat(model, attributeName);

            if (format == TangoConstHelper.STRING_FORMAT) {
                stringBox.connectWidget(readNumberField, attributeKey);
                if (isSettable) {
                    IKey attributeWriteKey = generateWriteAttributeKey(attributeName);
                    stringBox.connectWidget(textField, attributeWriteKey);
                }
            }
            else if (format == TangoConstHelper.BOOLEAN_FORMAT) {
                booleanScalarBox.connectWidget(checkBox, attributeKey);
                if (isSettable) {
                    IKey attributeWriteKey = generateWriteAttributeKey(attributeName);
                    booleanScalarBox.connectWidget(booleanComboBox, attributeWriteKey);
                }
            }
            else if (format == TangoConstHelper.NUMERICAL_FORMAT) {
                stringBox.connectWidget(readNumberField, attributeKey);
                if (isSettable) {
                    IKey attributeWriteKey = generateWriteAttributeKey(attributeName);
                    numberScalarBox.connectWidget(wheelswitch, attributeWriteKey);
                }
            }
        }
    }
View Full Code Here

    private void setChartWidgetModel(IKey attributeKey) {
        setWidgetModel(chartViewer, chartBox, attributeKey);
        chartViewer.setDataViewColor(attributeKey.getInformationKey(), Color.RED);
        boolean isSettable = !TangoAttributeHelper.isAttributeReadOnly(model, attributeName);
        if (isSettable) {
            IKey writeAttributeKey = generateWriteAttributeKey(attributeName);
            // System.out.println("Id read =" + writeAttributeKey.getInformationKey());
            setWidgetModel(chartViewer, chartBox, writeAttributeKey);
            chartViewer.setDataViewColor(writeAttributeKey.getInformationKey(), Color.BLUE);
        }
    }
View Full Code Here

            int format = TangoAttributeHelper.getAttributeFormat(model, attributeName);

            if (format == TangoConstHelper.STRING_FORMAT) {
                stringBox.connectWidget(readNumberField, attributeKey);
                if (isSettable) {
                    IKey attributeWriteKey = generateWriteAttributeKey(attributeName);
                    stringBox.connectWidget(textField, attributeWriteKey);
                }
            } else if (format == TangoConstHelper.BOOLEAN_FORMAT) {
                booleanScalarBox.connectWidget(checkBox, attributeKey);
                if (isSettable) {
                    IKey attributeWriteKey = generateWriteAttributeKey(attributeName);
                    booleanScalarBox.connectWidget(booleanComboBox, attributeWriteKey);
                }
            } else if (format == TangoConstHelper.NUMERICAL_FORMAT) {
                stringBox.connectWidget(readNumberField, attributeKey);
                if (isSettable) {
                    IKey attributeWriteKey = generateWriteAttributeKey(attributeName);
                    numberScalarBox.connectWidget(wheelswitch, attributeWriteKey);
                }
            }
        }
    }
View Full Code Here

TOP

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

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.