Package ghidra.formats.gfilesystem
Interface GIconProvider
-
public interface GIconProviderGFileSystemadd-on interface to allow filesystems to override how image files are converted into viewableIconinstances.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description javax.swing.IcongetIcon(GFile file, TaskMonitor monitor)A method thatfile systemscan implement if they need to preprocess image files so that Ghidra can display them.static javax.swing.IcongetIconForFile(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 systemscan implement if they need to preprocess image files so that Ghidra can display them.- Parameters:
file-GFileto read and convert into an Icon.monitor-TaskMonitorto watch and update with progress.- Returns:
- new
Iconinstance 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-GFileto read and convert into an Icon.monitor-TaskMonitorto watch and update with progress.- Returns:
- new
Iconinstance with contents of the GFile, or null if the file couldn't be converted into an image. - Throws:
CancelledException- if the user cancels.
-
-