public class BookmarksManagerModel
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected java.util.List<Bookmark> |
list |
static java.lang.String |
PROP_BOOKMARK
the contents of a bookmark changed, like the title or URL.
|
static java.lang.String |
PROP_LIST |
| Constructor and Description |
|---|
BookmarksManagerModel() |
| Modifier and Type | Method and Description |
|---|---|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener) |
void |
addPropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener listener) |
void |
addRemoteBookmarks(java.lang.String surl)
add the bookmarks in the remote URL to the list.
|
void |
addRemoteBookmarks(java.lang.String surl,
Bookmark selectedBookmark)
add the remote bookmarks.
|
protected void |
doExport(java.awt.Component c) |
protected void |
doExport(java.awt.Component c,
java.util.List<Bookmark> list) |
protected void |
doImport(java.awt.Component c) |
java.util.List<Bookmark> |
getList()
get the bookmarks as a list.
|
protected Bookmark |
getSelectedBookmark(javax.swing.tree.TreeModel model,
javax.swing.tree.TreePath path)
return the bookmark selected in the tree.
|
protected java.util.List<Bookmark> |
getSelectedBookmarks(javax.swing.tree.TreeModel model,
javax.swing.tree.TreePath[] paths)
return the bookmarks selected in the tree.
|
javax.swing.tree.TreeModel |
getTreeModel()
get a TreeModel of the internal model, so GUIs can show the state.
|
void |
importList(java.util.List<Bookmark> books)
merge the given list into the list.
|
void |
mergeList(java.util.List<Bookmark> src,
java.util.List<Bookmark> dest)
merge in the bookmarks.
|
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener) |
void |
removePropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener listener) |
void |
setList(java.util.List<Bookmark> list)
set the bookmarks list.
|
protected void |
setName(java.lang.String name)
set the name for the bookmarks, such as "Bookmarks" or "Tools".
|
protected java.util.List<Bookmark> list
public static final java.lang.String PROP_LIST
public static final java.lang.String PROP_BOOKMARK
protected void doImport(java.awt.Component c)
protected void doExport(java.awt.Component c)
protected void doExport(java.awt.Component c,
java.util.List<Bookmark> list)
public java.util.List<Bookmark> getList()
public void setList(java.util.List<Bookmark> list)
list - list of bookmarks.public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
public void removePropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener listener)
public void addPropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener listener)
public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
public javax.swing.tree.TreeModel getTreeModel()
public void mergeList(java.util.List<Bookmark> src, java.util.List<Bookmark> dest)
src - the items to merge indest - the list to update.protected Bookmark getSelectedBookmark(javax.swing.tree.TreeModel model, javax.swing.tree.TreePath path)
model - path - the selected path, or null indicating no selection.protected java.util.List<Bookmark> getSelectedBookmarks(javax.swing.tree.TreeModel model, javax.swing.tree.TreePath[] paths)
model - paths - the selected paths. This may be null, indicating no selection.public void importList(java.util.List<Bookmark> books)
books - public void addRemoteBookmarks(java.lang.String surl)
throws MalformedRemoteBookmarksException
surl - MalformedRemoteBookmarksExceptionpublic void addRemoteBookmarks(java.lang.String surl,
Bookmark selectedBookmark)
throws MalformedRemoteBookmarksException
surl - selectedBookmark - location to add the bookmark, can be null.MalformedRemoteBookmarksExceptionprotected void setName(java.lang.String name)
name -