Package fr.soleil.comete.swing

Examples of fr.soleil.comete.swing.ImageViewer


    }

    private void buildPlayerMap() {
        clearGUI();
        ImageViewer imageViewer = new ImageViewer();
        imageViewer.setApplicationId(IMAGE_PLAYER_ID);
        imageViewer.setAlwaysFitMaxSize(alwaysFittedSize);
        imageViewer.setCleanOnDataSetting(false);
        imageViewer.addMouseListener(this);
        imageViewerMap.put(IMAGE_PLAYER_ID, imageViewer);
        tabbedPane.add(IMAGE_PLAYER_ID, imageViewer);
        imageViewer.addImageViewerListener(this);
    }
View Full Code Here


    public void initAttributeList() {
        if (isConfigurationValide()) {
            Set<String> imageViewerKeys = imageViewerMap.keySet();
            Iterator<String> imageViewerIterator = imageViewerKeys.iterator();
            TangoKey imageKey = null;
            ImageViewer imageViewer = null;
            String key = null;
            String label = null;
            ImageProperties property = null;
            // build TangoKey and register Key
            while (imageViewerIterator.hasNext()) {
                key = imageViewerIterator.next();
                imageViewer = imageViewerMap.get(key);
                imageKey = new TangoKey();
                TangoKeyTool.registerAttribute(imageKey, scanServerDeviceName, key);
                label = CurrentScanDataModel.getAttributeLabel(scanServerDeviceName, key);
                imageViewer.setImageName(label);
                imageBox.connectWidget(imageViewer, imageKey);
                setRefreshingPeriod(imageKey);
                setxAttributeName(xAttributeName);
                setyAttributeName(xAttributeName);
                if (imageProp != null && label != null) {
                    property = imageProp.get(label.toLowerCase());
                    if (property != null) {
                        imageViewer.setImageProperties(property);
                    }
                }
            }
            refreshComboBox();
        }
View Full Code Here

    public void initAttributeList() {
        if (isConfigurationValide()) {
            Set<String> imageViewerKeys = imageViewerMap.keySet();
            Iterator<String> imageViewerIterator = imageViewerKeys.iterator();
            TangoKey imageKey = null;
            ImageViewer imageViewer = null;
            String key = null;
            // build TangoKey and register Key
            while (imageViewerIterator.hasNext()) {
                key = imageViewerIterator.next();
                imageViewer = imageViewerMap.get(key);
View Full Code Here

    }

    private void setAxisKey(IKey key, boolean xAxis) {
        Collection<ImageViewer> imageViewerCollection = imageViewerMap.values();
        Iterator<ImageViewer> imageViewerIterator = imageViewerCollection.iterator();
        ImageViewer imageViewer = null;
        while (imageViewerIterator.hasNext()) {
            imageViewer = imageViewerIterator.next();
            if (imageViewer != null) {
                if (xAxis) {
                    imageBox.disconnectWidgetFromAll(xValueConvertor);
                    if (key != null) {
                        imageBox.connectWidget(xValueConvertor, key);
                    }
                    imageViewer.setXAxisConvertor(xValueConvertor);

                }
                else {
                    imageBox.disconnectWidgetFromAll(yValueConvertor);
                    if (key != null) {
                        imageBox.connectWidget(yValueConvertor, key);
                    }
                    imageViewer.setYAxisConvertor(yValueConvertor);
                }
            }
        }
    }
View Full Code Here

    }

    private void setAxisKey(IKey key, boolean xAxis) {
        Collection<ImageViewer> imageViewerCollection = imageViewerMap.values();
        Iterator<ImageViewer> imageViewerIterator = imageViewerCollection.iterator();
        ImageViewer imageViewer = null;
        while (imageViewerIterator.hasNext()) {
            imageViewer = imageViewerIterator.next();
            if (imageViewer != null) {
                if (xAxis) {
                    imageBox.disconnectWidgetFromAll(xValueConvertor);
                    if (key != null) {
                        imageBox.connectWidget(xValueConvertor, key);
                    }
                    imageViewer.setXAxisConvertor(xValueConvertor);

                } else {
                    imageBox.disconnectWidgetFromAll(yValueConvertor);
                    if (key != null) {
                        imageBox.connectWidget(yValueConvertor, key);
                    }
                    imageViewer.setYAxisConvertor(yValueConvertor);
                }
            }
        }
    }
View Full Code Here

            return;
        }

        Collection<ImageViewer> imageViewerCollection = imageViewerMap.values();
        Iterator<ImageViewer> imageViewerIterator = imageViewerCollection.iterator();
        ImageViewer imageViewer = null;
        while (imageViewerIterator.hasNext()) {
            imageViewer = imageViewerIterator.next();
            if (imageViewer != null) {
                imageViewer.addImageViewerListener(listener);
            }
        }
    }
View Full Code Here

            return;
        }

        Collection<ImageViewer> imageViewerCollection = imageViewerMap.values();
        Iterator<ImageViewer> imageViewerIterator = imageViewerCollection.iterator();
        ImageViewer imageViewer = null;
        while (imageViewerIterator.hasNext()) {
            imageViewer = imageViewerIterator.next();
            if (imageViewer != null) {
                imageViewer.addImageViewerListener(listener);
            }
        }
    }
View Full Code Here

    }

    public void removeImageViewerListener(IImageViewerListener listener, boolean withDisconnect) {
        Collection<ImageViewer> imageViewerCollection = imageViewerMap.values();
        Iterator<ImageViewer> imageViewerIterator = imageViewerCollection.iterator();
        ImageViewer imageViewer = null;
        while (imageViewerIterator.hasNext()) {
            imageViewer = imageViewerIterator.next();
            imageViewer.removeImageViewerListener(listener);
            imageViewer.removeMouseListener(this);
            if (withDisconnect) {
                imageBox.disconnectWidgetFromAll(imageViewer);
            }
        }
    }
View Full Code Here

    }

    public void removeImageViewerListener(IImageViewerListener listener, boolean withDisconnect) {
        Collection<ImageViewer> imageViewerCollection = imageViewerMap.values();
        Iterator<ImageViewer> imageViewerIterator = imageViewerCollection.iterator();
        ImageViewer imageViewer = null;
        while (imageViewerIterator.hasNext()) {
            imageViewer = imageViewerIterator.next();
            imageViewer.removeImageViewerListener(listener);
            imageViewer.removeMouseListener(this);
            if (withDisconnect) {
                imageBox.disconnectWidgetFromAll(imageViewer);
            }
        }
    }
View Full Code Here

    }

    public Rectangle getViewerBounds() {
        Rectangle result = null;
        if (playerMode) {
            ImageViewer viewer = imageViewerMap.get(IMAGE_PLAYER_ID);
            result = new Rectangle(viewer.getLocationOnScreen(), viewer.getSize());
        }
        return result;
    }
View Full Code Here

TOP

Related Classes of fr.soleil.comete.swing.ImageViewer

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.