Package gaiasky.gui

Class BookmarksManager

java.lang.Object
gaiasky.gui.BookmarksManager
All Implemented Interfaces:
IObserver

public class BookmarksManager extends Object implements IObserver
  • Constructor Details

    • BookmarksManager

      public BookmarksManager()
  • Method Details

    • getBookmarks

      public List<BookmarksManager.BookmarkNode> getBookmarks()
      Returns the internal list of bookmark nodes.
      Returns:
      The list of BookmarksManager.BookmarkNode objects.
    • getFolders

      public List<BookmarksManager.BookmarkNode> getFolders()
      Returns:
      A list with all folder bookmarks
    • getBookmarksByType

      public List<BookmarksManager.BookmarkNode> getBookmarksByType(List<BookmarksManager.BookmarkNode> bookmarks, List<BookmarksManager.BookmarkNode> result, boolean folder)
    • containsName

      public boolean containsName(String name)
    • containsNameRec

      public boolean containsNameRec(String name, BookmarksManager.BookmarkNode node)
    • containsPath

      public boolean containsPath(Path path)
    • persistBookmarks

      public void persistBookmarks()
    • addBookmark

      public boolean addBookmark(String path, boolean folder)
      Adds a bookmark with the given path.
      Parameters:
      path - The path to add.
      Returns:
      True if added.
    • removeBookmark

      public boolean removeBookmark(String path)
      Removes a bookmark by its path.
      Parameters:
      path - The path to remove
      Returns:
      True if removed.
    • removeBookmarksByName

      public int removeBookmarksByName(String name)
      Remove all bookmarks with the given name.
      Parameters:
      name - The name to remove.
      Returns:
      Number of removed bookmarks.
    • notify

      public void notify(Event event, Object source, Object... data)
      Description copied from interface: IObserver
      Event notification call.
      Specified by:
      notify in interface IObserver
      Parameters:
      event - The event type.
      source - The source object, if any.
      data - The data associated with this event.