Class IconSelector


  • public class IconSelector
    extends Object
    utility class to select an icon based on a file extension
    Author:
    Sebastian Stein
    • Constructor Detail

      • IconSelector

        public IconSelector()
    • Method Detail

      • selectIcon

        public static String selectIcon​(String ext)
        Returns the icon by parsing the provided file extension
        Parameters:
        ext - file extension
        Returns:
        file name of the icon
      • selectIcon

        public static String selectIcon​(String ext,
                                        boolean shortcut)
        Returns the icon by parsing the provided file extension
        Parameters:
        ext - the file extension(or file name)
        shortcut - If the icon displays a shortcut
        Returns:
        the icon file name
      • isPicture

        public static boolean isPicture​(String ext)
        Determines if the given extension represents a picture
        Parameters:
        ext - the file extension
        Returns:
        if ext is an image