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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddBookmark(String path, boolean folder)Adds a bookmark with the given path.booleancontainsName(String name)booleancontainsNameRec(String name, BookmarksManager.BookmarkNode node)booleancontainsPath(Path path)Returns the internal list of bookmark nodes.getBookmarksByType(List<BookmarksManager.BookmarkNode> bookmarks, List<BookmarksManager.BookmarkNode> result, boolean folder)voidEvent notification call.voidbooleanremoveBookmark(String path)Removes a bookmark by its path.intremoveBookmarksByName(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.BookmarkNodeobjects.
-
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:IObserverEvent notification call.
-