Class SvgIconLoader

java.lang.Object
be.imgn.swing.flatlaf.SvgIconLoader
All Implemented Interfaces:
IconLoader

public final class SvgIconLoader extends Object implements IconLoader
Loads SVG icons, through FlatSVGIcon: they stay sharp on HiDPI screens.
  • Constructor Details

    • SvgIconLoader

      public SvgIconLoader()
      Creates the loader.
  • Method Details

    • supports

      public boolean supports(String path)
      Description copied from interface: IconLoader
      Returns whether this loader loads an icon, by its extension.
      Specified by:
      supports in interface IconLoader
      Parameters:
      path - the icon's path, relative to its package
      Returns:
      true if this loader loads it
    • load

      public Icon load(ResourceOpener opener, String path)
      Description copied from interface: IconLoader
      Loads an icon.
      Specified by:
      load in interface IconLoader
      Parameters:
      opener - the opener of the icon's package
      path - the icon's path, relative to its package
      Returns:
      the icon