Class StringObject

All Implemented Interfaces:
Proxy

@Generated("org.javagi.JavaGI") public class StringObject extends GObject

The type of items in a GtkStringList.

A GtkStringObject is a wrapper around a const char*; it has a Gtk.StringObject:string property that can be used for property bindings and expressions.

  • Constructor Details

    • StringObject

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

      public StringObject(String string)
      Wraps a string in an object for use with GListModel.
      Parameters:
      string - The string to wrap
    • StringObject

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

    • getType

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

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

      protected StringObject 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
    • getString

      public String getString()
      Returns the string contained in a GtkStringObject.
      Returns:
      the string of this StringObject
    • toString

      public String toString()
      Returns a string representation of the object.
      Overrides:
      toString in class Object
      Returns:
      a string representation of the object
    • builder

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