Class UIRES

java.lang.Object
net.mcreator.ui.init.UIRES

public class UIRES extends Object
  • Constructor Details

    • UIRES

      public UIRES()
  • Method Details

    • preloadImages

      public static void preloadImages()
    • get

      public static ImageIcon get(String identifier)
      Gets an image from the current theme or the default theme if the image is not found.

      Image loading priority (top down, first match found):
      1. Current theme SVG
      2. Current theme PNG
      3. Default theme SVG
      4. Default theme PNG
      5. Throws NullPointerException
      Parameters:
      identifier - the identifier of the image
      Returns:
      the image icon
    • getBuiltIn

      public static ImageIcon getBuiltIn(String identifier)
      Returns a built-in image from the MCreator UI resources. Only works for raster images. Use UIRES.SVG for vector images.
      Parameters:
      identifier - the identifier of the image
      Returns:
      the image icon