Package fr.soleil.comete.swing

Examples of fr.soleil.comete.swing.ImageViewer


        return new ImageViewerBox();
    }

    @Override
    protected IImageViewer initWidget() {
        return new ImageViewer();
    }
View Full Code Here


        // f.setRefreshingPeriod(500);

        // f.setAxisRangeX(50, 200);
        // f.setAxisRangeY(100, 200);

        final ImageViewer viewer = ((RotaryImageViewer) f.widget).getImageViewer();
        viewer.addViewerListener(new IIJViewerListener() {
            int index = 1;

            @Override
            public void valueChanged(IJViewerEvent event) {
                // nothing to do
            }

            @Override
            public void pixelSizeChanged(IJViewerEvent event) {
                // nothing to do
            }

            @Override
            public void mouseClicked(IJViewerEvent event) {
                if (viewer != null) {
                    Point2D.Double point = viewer.getAxisPosition();
                    IJCanvas canvas = viewer.getImageCanvas();
                    if ((point != null) && (canvas != null)) {
                        // XXX strange IJ hack that should be done in ImageViewer
                        int x = (canvas.screenXD(point.x));
                        int y = (canvas.screenYD(point.y));
                        f.addRoi("MyRoi" + ++index + ",point,1," + x + "," + y + "," + 5 + "," + 5 + ",GREEN");
View Full Code Here

    }

    @Override
    public <TI extends INumberMatrixTarget, U> boolean connectWidget(TI widget, IKey key) {
        if (widget instanceof ImageViewer) {
            ImageViewer viewer = (ImageViewer) widget;
            if (viewer.getApplicationId() == null) {
                viewer.setApplicationId("ImageViewerBox_Viewer_" + applicationIdNumber++);
            }
        }
        else if (widget instanceof ImagePlayer) {
            ImagePlayer player = (ImagePlayer) widget;
            player.setApplicationId("ImageViewerBox_Player_" + applicationIdNumber++);
View Full Code Here

    }

    @Override
    public <TI extends INumberMatrixTarget, U> boolean connectWidget(TI widget, IKey key) {
        if (widget instanceof ImageViewer) {
            ImageViewer viewer = (ImageViewer) widget;
            if (viewer.getApplicationId() == null) {
                viewer.setApplicationId("ImageViewerBox_Viewer_" + applicationIdNumber++);
            }
        }
        else if (widget instanceof ImagePlayer) {
            ImagePlayer player = (ImagePlayer) widget;
            player.setApplicationId("ImageViewerBox_Player_" + applicationIdNumber++);
View Full Code Here

    }

    @Override
    protected IImageViewer initWidget() {

        return new ImageViewer();
    }
View Full Code Here

    public NumberImageViewerCometeV2() {
        super();
        refreshingPeriodAction = new ChangeRefreshingPeriodAction();
        if (widget instanceof ImageViewer) {
            ImageViewer viewer = (ImageViewer) widget;
            // to keep roi when data change
            viewer.setCleanOnDataSetting(false);
            // Maximum image display
            viewer.setAlwaysFitMaxSize(true);
            // Add refreshing period action in menu
            viewer.getPopupMenu().add(refreshingPeriodAction);
        }
    }
View Full Code Here

    }

    @Override
    protected IImageViewer initWidget() {

        return new ImageViewer();
    }
View Full Code Here

        // f.setAxisRangeX(50, 200);
        // f.setAxisRangeY(100, 200);

        //
        f.setShowImageTransformationActions(true);
        final ImageViewer viewer = ((ImageViewer) f.widget);
        viewer.addViewerListener(new IIJViewerListener() {
            int index = 1;

            @Override
            public void valueChanged(IJViewerEvent event) {
                // nothing to do
            }

            @Override
            public void pixelSizeChanged(IJViewerEvent event) {
                // nothing to do
            }

            @Override
            public void mouseClicked(IJViewerEvent event) {
                if (viewer != null) {
                    Point2D.Double point = viewer.getAxisPosition();
                    IJCanvas canvas = viewer.getImageCanvas();
                    if ((point != null) && (canvas != null)) {
                        // XXX strange IJ hack that should be done in ImageViewer
                        int x = (canvas.screenXD(point.x));
                        int y = (canvas.screenYD(point.y));
                        f.addRoi("MyRoi" + ++index + ",point,1," + x + "," + y + "," + 5 + "," + 5 + ",GREEN");
View Full Code Here

    public NumberImageViewerCometeV2() {
        super();
        refreshingPeriodAction = new ChangeRefreshingPeriodAction();
        if (widget instanceof ImageViewer) {
            ImageViewer viewer = (ImageViewer) widget;
            // to keep roi when data change
            viewer.setCleanOnDataSetting(false);
            // Maximum image display
            viewer.setAlwaysFitMaxSize(true);
            // Add refreshing period action in menu
            viewer.getPopupMenu().add(refreshingPeriodAction);
        }
    }
View Full Code Here

    }

    @Override
    protected IImageViewer initWidget() {

        return new ImageViewer();
    }
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.