Class BookmarkList

All Implemented Interfaces:
Iterable<FileInfo>, Collection<FileInfo>, List<FileInfo>, SequencedCollection<FileInfo>, ListModel<FileInfo>, Proxy, ListModelJavaList<FileInfo>

@Generated("org.javagi.JavaGI") public class BookmarkList extends GObject implements ListModel<FileInfo>

A list model that wraps GBookmarkFile.

It presents a GListModel and fills it asynchronously with the GFileInfos returned from that function.

The GFileInfos in the list have some attributes in the recent namespace added: recent::private (boolean) and recent:applications (stringv).

  • Constructor Details

    • BookmarkList

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

      public BookmarkList(@Nullable String filename, @Nullable String attributes)
      Creates a new GtkBookmarkList with the given attributes.
      Parameters:
      filename - The bookmark file to load
      attributes - The attributes to query
    • BookmarkList

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

    • getType

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

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

      protected BookmarkList 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
    • getAttributes

      public @Nullable String getAttributes()
      Gets the attributes queried on the children.
      Returns:
      The queried attributes
    • getFilename

      public String getFilename()
      Returns the filename of the bookmark file that this list is loading.
      Returns:
      the filename of the .xbel file
    • getIoPriority

      public int getIoPriority()
      Gets the IO priority to use while loading file.
      Returns:
      The IO priority.
    • isLoading

      public boolean isLoading()

      Returns true if the files are currently being loaded.

      Files will be added to this BookmarkList from time to time while loading is going on. The order in which are added is undefined and may change in between runs.

      Returns:
      true if this BookmarkList is loading
    • setAttributes

      public void setAttributes(@Nullable String attributes)

      Sets the attributes to be enumerated and starts the enumeration.

      If attributes is null, no attributes will be queried, but a list of GFileInfos will still be created.

      Parameters:
      attributes - the attributes to enumerate
    • setIoPriority

      public void setIoPriority(int ioPriority)

      Sets the IO priority to use while loading files.

      The default IO priority is G_PRIORITY_DEFAULT.

      Parameters:
      ioPriority - IO priority to use
    • builder

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