Interface IImageViewer

  • All Superinterfaces:
    java.awt.event.ComponentListener, java.util.EventListener
    All Known Implementing Classes:
    Equirectangular, Perspective

    public interface IImageViewer
    extends java.awt.event.ComponentListener
    An interface for image viewers for specific projections
    Since:
    18246
    • Method Detail

      • getSupportedProjections

        java.util.Set<ProjectionsgetSupportedProjections()
        Get the supported projections for the image viewer
        Returns:
        The projections supported. Typically, only one.
      • paintImage

        void paintImage​(java.awt.Graphics g,
                        java.awt.image.BufferedImage image,
                        java.awt.Rectangle target,
                        java.awt.Rectangle visibleRect)
        Paint the image
        Parameters:
        g - The graphics to paint on
        image - The image to paint
        target - The target area
        visibleRect - The visible rectangle
      • getDefaultVisibleRectangle

        ImageDisplay.VisRect getDefaultVisibleRectangle​(java.awt.Component component,
                                                        java.awt.Image image)
        Get the default visible rectangle for the projection
        Parameters:
        component - The component the image will be displayed in
        image - The image that will be shown
        Returns:
        The default visible rectangle
      • getRotation

        default Vector3D getRotation()
        Get the current rotation in the image viewer
        Returns:
        The rotation
        Since:
        18263
      • mouseDragged

        default void mouseDragged​(java.awt.Point from,
                                  java.awt.Point to,
                                  ImageDisplay.VisRect currentVisibleRect)
        Indicate that the mouse has been dragged to a point
        Parameters:
        from - The point the mouse was dragged from
        to - The point the mouse has been dragged to
        currentVisibleRect - The currently visible rectangle (this is updated by the default implementation)
      • checkAndModifyVisibleRectSize

        default void checkAndModifyVisibleRectSize​(java.awt.Image image,
                                                   ImageDisplay.VisRect visibleRect)
        Check and modify the visible rect size to appropriate dimensions
        Parameters:
        visibleRect - the visible rectangle to update
        image - The image to use for checking
      • getMaxImageSize

        default java.awt.Image getMaxImageSize​(ImageDisplay imageDisplay,
                                               java.awt.Image image)
        Get the maximum image size that can be displayed
        Parameters:
        imageDisplay - The image display
        image - The image
        Returns:
        The maximum image size (may be the original image passed in)