Class EmblemedIcon

All Implemented Interfaces:
Icon, Proxy

@Generated("org.javagi.JavaGI") public class EmblemedIcon extends GObject implements Icon

GEmblemedIcon is an implementation of Icon that supports adding an emblem to an icon. Adding multiple emblems to an icon is ensured via addEmblem(Emblem).

Note that GEmblemedIcon allows no control over the position of the emblems. See also Emblem for more information.

  • Constructor Details

    • EmblemedIcon

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

      public EmblemedIcon(Icon icon, @Nullable Emblem emblem)
      Creates a new emblemed icon for icon with the emblem emblem.
      Parameters:
      icon - a GIcon
      emblem - a GEmblem, or null
      Since:
      2.18
    • EmblemedIcon

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

    • getType

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

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

      protected EmblemedIcon 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
    • addEmblem

      public void addEmblem(Emblem emblem)
      Adds emblem to the GList of GEmblems.
      Parameters:
      emblem - a GEmblem
      Since:
      2.18
    • clearEmblems

      public void clearEmblems()
      Removes all the emblems from icon.
      Since:
      2.28
    • getEmblems

      public List<Emblem> getEmblems()
      Gets the list of emblems for the icon.
      Returns:
      a GList of GEmblems that is owned by this EmblemedIcon
      Since:
      2.18
    • getIcon

      public Icon getIcon()
      Gets the main icon for emblemed.
      Returns:
      a GIcon that is owned by this EmblemedIcon
      Since:
      2.18
    • builder

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