Package ghidra.formats.gfilesystem
Interface GIconProvider
-
public interface GIconProvider
GFileSystem
add-on interface to allow filesystems to override how image files are converted into viewableIcon
instances.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description javax.swing.Icon
getIcon(GFile file, TaskMonitor monitor)
A method thatfile systems
can implement if they need to preprocess image files so that Ghidra can display them.static javax.swing.Icon
getIconForFile(GFile file, TaskMonitor monitor)
Helper static method that will get an Icon from a data file.
-
-
-
Method Detail
-
getIcon
javax.swing.Icon getIcon(GFile file, TaskMonitor monitor) throws java.io.IOException, CancelledException
A method thatfile 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.
-
-