Class ImageMultiPagePane

    • Constructor Detail

      • ImageMultiPagePane

        public ImageMultiPagePane​(ImageViewerPanel owner)
        Initializes the tabbed pane.
        Parameters:
        owner - the viewer this pane belongs to
    • Method Detail

      • getOwner

        public ImageViewerPanel getOwner()
        Returns the owner.
        Returns:
        the owner
      • getCurrentPanel

        public ImagePanel getCurrentPanel()
        Returns the image panel in the currently selected tab.
        Returns:
        the image panel, null if none available
      • getPanelAt

        public ImagePanel getPanelAt​(int index)
        Returns the image panel of the specified tab.
        Parameters:
        index - the tab index
        Returns:
        the image panel, null if none available
      • getAllPanels

        public ImagePanel[] getAllPanels()
        Returns all the image panels.
        Returns:
        the image panels
      • getCurrentImage

        public BufferedImage getCurrentImage()
        Returns the underlying image.
        Returns:
        the current image, can be null
      • getImageAt

        public BufferedImage getImageAt​(int index)
        Returns the underlying image.
        Parameters:
        index - the tab index
        Returns:
        the current image, can be null
      • getCurrentFile

        public File getCurrentFile()
        Returns the current filename.
        Returns:
        the current filename, can be null
      • getFileAt

        public File getFileAt​(int index)
        Returns the current filename.
        Parameters:
        index - the tab index
        Returns:
        the current filename, can be null
      • checkForModified

        protected boolean checkForModified​(ImagePanel panel)
        Returns whether we can proceed with the operation or not, depending on whether the user saved the flow or discarded the changes.
        Parameters:
        panel - the panel to check
        Returns:
        true if safe to proceed
      • updateTabTitles

        public void updateTabTitles()
        Updates the title of all tabs, takes modified state into account.
      • updateCurrentTabTitle

        public void updateCurrentTabTitle()
        Updates the title of the current tab, takes modified state into account.
      • updateTabTitle

        public void updateTabTitle​(int index)
        Updates the title of the specified tab, takes modified state into account.
        Parameters:
        index - the index of the tab
      • load

        public boolean load​(File file)
        Loads the specified file in a new panel.
        Parameters:
        file - the file to load
        Returns:
        true if successfully loaded
      • load

        public boolean load​(File file,
                            ImageReader reader)
        Loads the specified file in a new panel.
        Parameters:
        file - the file to load
        reader - the reader to use, null for auto-detection
        Returns:
        true if successfully loaded