Package gaiasky.interafce
Class BookmarksManager
java.lang.Object
gaiasky.interafce.BookmarksManager
- All Implemented Interfaces:
IObserver
Manages the bookmarks in Gaia Sky. Supports folders.
-
Nested Class Summary
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
addBookmark(String path, boolean folder)
Adds a bookmark with the given path.boolean
containsName(String name)
boolean
containsNameRec(String name, BookmarksManager.BNode node)
boolean
containsPath(String path)
boolean
containsPath(Path path)
static List<BookmarksManager.BNode>
getBookmarksByType(List<BookmarksManager.BNode> bookmarks, List<BookmarksManager.BNode> result, boolean folder)
static void
static BookmarksManager
instance()
void
void
boolean
removeBookmark(String path)
Removes a bookmark by its path.int
removeBookmarksByName(String name)
Remove all bookmarks with the given name.
-
Field Details
-
instance
-
-
Method Details
-
initialize
public static void initialize() -
instance
-
getBookmarks
-
getFolders
- Returns:
- A list with all folder bookmarks
-
getLeafBookmarks
- Returns:
- A list with all non-folder bookmarks
-
getBookmarksByType
public List<BookmarksManager.BNode> getBookmarksByType(List<BookmarksManager.BNode> bookmarks, List<BookmarksManager.BNode> result, boolean folder) -
containsName
-
containsNameRec
-
containsPath
-
containsPath
-
persistBookmarks
public void persistBookmarks() -
addBookmark
Adds a bookmark with the given path.- Parameters:
path
- The path to add.- Returns:
- True if added.
-
removeBookmark
Removes a bookmark by its path.- Parameters:
path
- The path to remove- Returns:
- True if removed.
-
removeBookmarksByName
Remove all bookmarks with the given name.- Parameters:
name
- The name to remove.- Returns:
- Number of removed bookmarks.
-
notify
-