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
Nested Classes -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddBookmark(String path, boolean folder)Adds a bookmark with the given path.booleancontainsName(String name)booleancontainsNameRec(String name, BookmarksManager.BNode node)booleancontainsPath(String path)booleancontainsPath(Path path)static List<BookmarksManager.BNode>getBookmarksByType(List<BookmarksManager.BNode> bookmarks, List<BookmarksManager.BNode> result, boolean folder)static voidstatic BookmarksManagerinstance()voidvoidbooleanremoveBookmark(String path)Removes a bookmark by its path.intremoveBookmarksByName(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
-