Package fr.soleil.comete.swing

Examples of fr.soleil.comete.swing.ImageViewer


        }
    }

    private void changeImagePlayerValues(BasicNumberMatrixTarget numberMatrix, String name) {

        ImageViewer viewer = imageViewerMap.get(IMAGE_PLAYER_ID);
        viewer.setAlwaysFitMaxSize(false);
        if (currentPlayerData != numberMatrix) {
            if (currentPlayerData != null) {
                currentPlayerData.removeTargetListener(this);
            }
            currentPlayerData = numberMatrix;
            numberMatrix.addTargetListener(this);
        }
        viewer.setNumberMatrix(numberMatrix.getNumberMatrix());
        viewer.setText(name);
        lastName = name;
    }
View Full Code Here


    @Override
    public void mouseEntered(MouseEvent arg0) {
        // First delete the old cursor
        Object source = arg0.getSource();
        if (source != null && source instanceof ImageViewer) {
            ImageViewer imageViewer = (ImageViewer) source;
            Point mousePosition = arg0.getPoint();
            Point imagePosition = imageViewer.getImagePosition(mousePosition);
            cursorRoi = new CometeRoi(".", RoiShape.CROSS, 1, imagePosition.x, imagePosition.y,
                    imageViewer.getDimY(), imageViewer.getDimX(), CometeColor.YELLOW);
            imageViewer.addRoi(cursorRoi, true);
        }
    }
View Full Code Here

        // REMOVE ROI
        cursorRoi = null;
        cursorRoi = new CometeRoi(".", RoiShape.NONE, 0, 0, 0, 0, 0, CometeColor.YELLOW);
        Object source = arg0.getSource();
        if (source != null && source instanceof ImageViewer) {
            ImageViewer imageViewer = (ImageViewer) source;
            imageViewer.addRoi(cursorRoi, true);
        }
    }
View Full Code Here

    }

    private void buildImageViewerMap() {
        clearGUI();
        if (zSensorsDataList != null) {
            ImageViewer imageViewer = null;
            for (String element : zSensorsDataList) {
                imageViewer = new ImageViewer();
                imageViewer.setApplicationId(element);
                imageViewerMap.put(element, imageViewer);
                tabbedPane.add(element, 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

            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) {
        Collection<ImageViewer> imageViewerCollection = imageViewerMap.values();
        Iterator<ImageViewer> imageViewerIterator = imageViewerCollection.iterator();
        ImageViewer imageViewer = null;
        while (imageViewerIterator.hasNext()) {
            imageViewer = imageViewerIterator.next();
            imageViewer.removeImageViewerListener(listener);
            imageBox.disconnectWidgetFromAll(imageViewer);
        }
    }
View Full Code Here

    public Map<String, ImageProperties> getImagePropertiesMap() {
        imageProp.clear();
        if (imageViewerMap != null && !imageViewerMap.isEmpty()) {
            Set<String> imageViewerKeys = imageViewerMap.keySet();
            ImageViewer imageViewer = null;
            for (String attributeName : imageViewerKeys) {
                imageViewer = imageViewerMap.get(attributeName);
                imageProp.put(imageViewer.getImageName().toLowerCase(), imageViewer.getImageProperties());
            }
        }
        return imageProp;
    }
View Full Code Here

    private void buildImageViewerMap() {
        clearGUI();
        String[] zSensorsDataList = CurrentScanDataModel.buildAttributeList(scanServerDeviceName, Axis.Z);
        if (zSensorsDataList != null) {
            ImageViewer imageViewer = null;
            for (String element : zSensorsDataList) {
                imageViewer = new ImageViewer();
                imageViewer.setApplicationId(element);
                imageViewer.setAlwaysFitMaxSize(true);
                imageViewer.setCleanOnDataSetting(false);
                imageViewerMap.put(element, imageViewer);
                tabbedPane.add(element, imageViewer);
                imageViewer.addImageViewerListener(this);
            }
        }
    }
View Full Code Here

            String key = null;
            String label = null;
            // build TangoKey and register Key
            while (imageViewerIterator.hasNext()) {
                key = imageViewerIterator.next();
                final ImageViewer imageViewer = imageViewerMap.get(key);
                imageKey = new TangoKey();
                TangoKeyTool.registerAttribute(imageKey, scanServerDeviceName, key);
                label = CurrentScanDataModel.getAttributeLabel(scanServerDeviceName, key);
                imageViewer.setImageName(label);
                imageBox.setSynchronTransmission(imageViewer, true);
                imageBox.connectWidget(imageViewer, imageKey);
                setRefreshingPeriod(imageKey);
                setxAttributeName(xAttributeName);
                setyAttributeName(xAttributeName);
                if (imageProp != null && label != null) {
                    final ImageProperties property = imageProp.get(label.toLowerCase());
                    if (property != null) {
                        imageViewer.setImageProperties(property);
                    }
                }
                imageBox.setSynchronTransmission(imageViewer, false);
            }
            refreshComboBox();
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.