Method Summary |
|
public void | addBookmark(BookmarkReference bookmark) Adds a bookmark to this folder. |
public BookmarkFolder | addChildFolder(String folderName) Adds a child folder to this instance. |
public Enumeration<Object> | childElements() Enumeration for processing all child elements of this folder. |
public boolean | containsBookmark(String bookmarkName) |
public static BookmarkFolder | createRootFolder() Creates a new root folder for creating a new bookmark tree. |
public BookmarkFolder | findChildPath(String childPath) Searches for a folder using the specified path.
Assumes that the given path precedes the given path.
Parameters: childPath - to search for within this folder. |
public Object | getChild(int index) Gets the child component by index.
This method is here to mainly support the use of this object within the Swing TreeModel.
Parameters: index - of the child component to get. |
public int | getChildCount() Gets the number of child components that exist within this instance. |
public String | getName() Gets the user-specific name for this folder.
This value can be null if no name has been set. |
public String | getParent() Gets the name of the parent folder for this folder. |
public BookmarkFolder | getParentFolder() Gets the parent folder this folder was created with. |
public String | getPath() Gets the full path of this folder. |
public static BookmarkFolder[] | getPathElements(BookmarkFolder folder) |
public int | getType() Gets the type of folder this instance is. |
public int | indexOfChild(Object child) Returns the index of the child component.
This method is here to mainly support the use of this object within the Swing TreeModel.
Parameters: child - to get the index of. |
public String[] | list() Returns a string list of all the names of the folders and bookmarks in this folder.
This will return a list of all folders and bookmark names contained in this folder. |
public BookmarkFolder | mkdirs(String childPath) |
public boolean | removeBookmark(BookmarkReference bookmark) Removes a bookmark from the folder it resides within.
This method can technically be called on any folder, so the bookmark does not have to actually exist in this
folder instance to be removed from its parent folder.
If a null bookmark is given this method immediately returns false.
Parameters: bookmark - to remove from its parent folder. |
public boolean | removeFolder(BookmarkFolder folder) Removes a child folder from this instance.
Unlike the remove bookmark method this method cannot be called anywhere and the given folder must exist in this
instance.
If a null bookmark is given this method immediately returns false.
Parameters: folder - to remove from this instance. |
public void | setName(String name) Changes the name of this folder. |
public String | toString() |