Class FileIcon

All Implemented Interfaces:
Icon, LoadableIcon, Proxy

@Generated("org.javagi.JavaGI") public class FileIcon extends GObject implements Icon, LoadableIcon

GFileIcon specifies an icon by pointing to an image file to be used as icon.

It implements LoadableIcon.

  • Constructor Details

    • FileIcon

      public FileIcon(MemorySegment address)
      Create a FileIcon instance for the provided memory address.
      Parameters:
      address - the memory address of the native object
    • FileIcon

      public FileIcon(File file)
      Creates a new icon for a file.
      Parameters:
      file - a GFile.
    • FileIcon

      public FileIcon()
      Create a new FileIcon.
  • Method Details

    • getType

      public static @Nullable Type getType()
      Get the GType of the FileIcon class.
      Returns:
      the GType
    • getMemoryLayout

      public static MemoryLayout getMemoryLayout()
      The memory layout of the native struct.
      Returns:
      the memory layout
    • asParent

      protected FileIcon asParent()
      Return this instance as if it were its parent type. Comparable to the Java super keyword, but ensures the parent typeclass is also used in native code.
      Overrides:
      asParent in class GObject
      Returns:
      the instance as if it were its parent type
    • getFile

      public File getFile()
      Gets the GFile associated with the given icon.
      Returns:
      a GFile.
    • builder

      public static FileIcon.Builder<? extends FileIcon.Builder> builder()
      A FileIcon.Builder object constructs a FileIcon with the specified properties. Use the various set...() methods to set properties, and finish construction with FileIcon.Builder.build().
      Returns:
      the builder object