Interface GIconProvider


  • public interface GIconProvider
    GFileSystem add-on interface to allow filesystems to override how image files are converted into viewable Icon instances.
    • Method Detail

      • getIcon

        javax.swing.Icon getIcon​(GFile file,
                                 TaskMonitor monitor)
                          throws java.io.IOException,
                                 CancelledException
        A method that file systems can implement if they need to preprocess image files so that Ghidra can display them.
        Parameters:
        file - GFile to read and convert into an Icon.
        monitor - TaskMonitor to watch and update with progress.
        Returns:
        new Icon instance with contents of the GFile.
        Throws:
        java.io.IOException - if problem reading or converting image.
        CancelledException - if user cancels.
      • getIconForFile

        static javax.swing.Icon getIconForFile​(GFile file,
                                               TaskMonitor monitor)
                                        throws CancelledException
        Helper static method that will get an Icon from a data file.
        Parameters:
        file - GFile to read and convert into an Icon.
        monitor - TaskMonitor to watch and update with progress.
        Returns:
        new Icon instance with contents of the GFile, or null if the file couldn't be converted into an image.
        Throws:
        CancelledException - if the user cancels.