Package fr.soleil.comete.swing

Examples of fr.soleil.comete.swing.ImageViewer


    private void initImageViewer() {
        data = new JPanel();
        data.setLayout(new BorderLayout());
        data.setBorder(BorderFactory.createTitledBorder("Data"));

        dataImage = new ImageViewer();
        dataImage.setDualProfilingEnabled(false);
        dataImage.setToolBarVisible(true);
        data.add(dataImage, BorderLayout.CENTER);
    }
View Full Code Here


    private void initImageViewer() {
        data = new JPanel();
        data.setLayout(new BorderLayout());
        data.setBorder(BorderFactory.createTitledBorder("Data"));

        dataImage = new ImageViewer();
        dataImage.setDualProfilingEnabled(false);
        dataImage.setToolBarVisible(true);
        data.add(dataImage, BorderLayout.CENTER);
    }
View Full Code Here

    }

    private void buildImageViewerMap() {
        clearGUI();
        if (zSensorsDataList != null) {
            ImageViewer imageViewer = null;
            for (String element : zSensorsDataList) {
                imageViewer = new ImageViewer();
                WidgetUtils.setMonochrom(imageViewer, monochrome);
                imageViewer.addMouseListener(this);
                imageViewer.setApplicationId(element);
                imageViewer.setAlwaysFitMaxSize(alwaysFittedSize);
                imageViewer.setCleanOnDataSetting(false);
                imageViewerMap.put(element, imageViewer);
                tabbedPane.add(element, imageViewer);
                imageViewer.addImageViewerListener(this);
            }
        }

    }
View Full Code Here

    }

    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;
            // 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) {
        if (key != null) {
            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);
                        imageBox.connectWidget(xValueConvertor, key);
                        imageViewer.setXAxisConvertor(xValueConvertor);
                    }
                    else {
                        imageBox.disconnectWidgetFromAll(yValueConvertor);
                        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

    }

    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

                        int y = Double.valueOf(point[1]).intValue();
                        actuatorsInput.setActuatorIndex(x, y);
                        Object source = event.getSource();
                        if (source != null && source instanceof ImageViewer
                                && resultListener != null && resultListener.isSelectionActivated()) {
                            ImageViewer imageViewer = (ImageViewer) source;
                            if (startRoi == null) {
                                // Remove endRoi
                                endRoi = new CometeRoi("To", RoiShape.NONE, 0, 0, 0, 0, 0,
                                        CometeColor.WHITE);
                                imageViewer.addRoi(endRoi);
                                startRoi = new CometeRoi("From", RoiShape.CROSS, 0, x, y, 2, 2,
                                        CometeColor.CYAN);
                                imageViewer.addRoi(startRoi, true);
                                endRoi = null;
                                if (resultListener != null) {
                                    resultListener.startPointSelectedChanged(x, y);
                                }
                            }
                            else if (endRoi == null && startRoi != null) {
                                endRoi = new CometeRoi("To", RoiShape.CROSS, 0, x, y, 2, 2,
                                        CometeColor.GREEN);
                                imageViewer.addRoi(endRoi, true);
                                startRoi = null;
                                if (resultListener != null) {
                                    resultListener.endPointSelectedChanged(x, y);
                                }
                            }
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.