Class Emblem

All Implemented Interfaces:
Icon, Proxy

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

GEmblem is an implementation of Icon that supports having an emblem, which is an icon with additional properties. It can than be added to a EmblemedIcon.

Currently, only metainformation about the emblem's origin is supported. More may be added in the future.

  • Constructor Details

    • Emblem

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

      public Emblem(Icon icon)
      Creates a new emblem for icon.
      Parameters:
      icon - a GIcon containing the icon.
      Since:
      2.18
    • Emblem

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

    • getType

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

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

      protected Emblem 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
    • withOrigin

      public static Emblem withOrigin(Icon icon, EmblemOrigin origin)
      Creates a new emblem for icon.
      Parameters:
      icon - a GIcon containing the icon.
      origin - a GEmblemOrigin enum defining the emblem's origin
      Returns:
      a new GEmblem.
      Since:
      2.18
    • getIcon

      public Icon getIcon()
      Gives back the icon from emblem.
      Returns:
      a GIcon. The returned object belongs to the emblem and should not be modified or freed.
      Since:
      2.18
    • getOrigin

      public EmblemOrigin getOrigin()
      Gets the origin of the emblem.
      Returns:
      the origin of the emblem
      Since:
      2.18
    • builder

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