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
-
Constructor 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.BookmarkNode node)
boolean
containsPath(Path path)
Returns the internal list of bookmark nodes.getBookmarksByType(List<BookmarksManager.BookmarkNode> bookmarks, List<BookmarksManager.BookmarkNode> result, boolean folder)
void
Event notification call.void
boolean
removeBookmark(String path)
Removes a bookmark by its path.int
removeBookmarksByName(String name)
Remove all bookmarks with the given name.
-
Constructor Details
-
BookmarksManager
public BookmarksManager()
-
-
Method Details
-
getBookmarks
Returns the internal list of bookmark nodes.- Returns:
- The list of
BookmarksManager.BookmarkNode
objects.
-
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
-
containsNameRec
-
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
Description copied from interface:IObserver
Event notification call.
-