org.autoplot.bookmarks.BookmarksManager

Object for managing the user's bookmarks. This object sits quietly beside the Autoplot UI, becoming visible when the user asks to manage bookmarks. This also populates the Bookmarks submenu.

BookmarksManager( java.awt.Frame parent, boolean modal )

creates new BookmarksManager. Use

BookmarksManager( java.awt.Frame parent, boolean modal, String name )

Creates new BookmarksManager


addBookmark

addBookmark( String surl ) → org.autoplot.bookmarks.Bookmark

Parameters

surl - a String

Returns:

org.autoplot.bookmarks.Bookmark

[search for examples] [view on GitHub] [view on old javadoc]


findBookmarkByUri

findBookmarkByUri( java.util.List list, String bookmarkURI, int remoteLimit ) → org.autoplot.bookmarks.Bookmark

return the first bookmark with the URI that matches the bookmarkURI. This is introduced to allow the tools bookmarks to be a set of trusted bookmarks. See https://sourceforge.net/p/autoplot/bugs/1270/

Parameters

list - bookmarks list, such as manager.getList();
bookmarkURI - the URI to find.
remoteLimit - the number of times we can look at remote files.

Returns:

null if the bookmark is not found.

[search for examples] [view on GitHub] [view on old javadoc]


getModel

getModel( ) → org.autoplot.bookmarks.BookmarksManagerModel

Returns:

org.autoplot.bookmarks.BookmarksManagerModel

[search for examples] [view on GitHub] [view on old javadoc]


getSelectedBookmark

getSelectedBookmark( ) → org.autoplot.bookmarks.Bookmark

provide a means to get the selection.

Returns:

the selected bookmark

[search for examples] [view on GitHub] [view on old javadoc]


hasPrefNode

hasPrefNode( String nodeName ) → boolean

returns true if the preference node exists.

Parameters

nodeName - a String

Returns:

a boolean

[search for examples] [view on GitHub] [view on old javadoc]


haveRemoteBookmark

haveRemoteBookmark( String bookmarksFile ) → boolean

return true if we are already using the remote bookmark, marked as a remote bookmark, at the root level.

Parameters

bookmarksFile - a String

Returns:

true if we already have the bookmark.

[search for examples] [view on GitHub] [view on old javadoc]


isEdit

isEdit( ) → boolean

Returns:

boolean

[search for examples] [view on GitHub] [view on old javadoc]


isPlay

isPlay( ) → boolean

Returns:

boolean

[search for examples] [view on GitHub] [view on old javadoc]


main

main( String[] args ) → void

Parameters

args - a java.lang.String[]

Returns:

void (returns nothing)

[search for examples] [view on GitHub] [view on old javadoc]


printBooks

printBooks( java.util.List book, String indent ) → void

Parameters

book - a java.util.List
indent - a String

Returns:

void (returns nothing)

[search for examples] [view on GitHub] [view on old javadoc]

printBooks( org.autoplot.bookmarks.Bookmark book, String indent ) → void

reload

reload( ) → void

reload the bookmarks from disk. Remote bookmarks will be reloaded slightly later.

Returns:

void (returns nothing)

[search for examples] [view on GitHub] [view on old javadoc]


resetPrefNode

resetPrefNode( String nodeName ) → void

rename the pref node, to aid with version changes. E.g. convert autoplot.xml to bookmarks.xml

Parameters

nodeName - a String

Returns:

void (returns nothing)

[search for examples] [view on GitHub] [view on old javadoc]


resetToDefault

resetToDefault( String surl ) → void

Parameters

surl - a String

Returns:

void (returns nothing)

[search for examples] [view on GitHub] [view on old javadoc]


setAddBookmark

setAddBookmark( org.autoplot.bookmarks.Bookmark b ) → void

Parameters

b - a Bookmark

Returns:

void (returns nothing)

[search for examples] [view on GitHub] [view on old javadoc]


setHidePlotButtons

setHidePlotButtons( boolean b ) → void

Parameters

b - a boolean

Returns:

void (returns nothing)

[search for examples] [view on GitHub] [view on old javadoc]


setPlotActionsVisible

setPlotActionsVisible( boolean v ) → void

Hide the plot and edit buttons, because sometimes they are confusing. For example we click "add bookmark" because we have a plot we want to keep. It wouldn't make sense for this editor to offer plot as an action because we have it plotted already.

Parameters

v - a boolean

Returns:

void (returns nothing)

[search for examples] [view on GitHub] [view on old javadoc]


setPrefNode

setPrefNode( String nodeName, String propName, String deft ) → void

setting this makes this manager the authority on bookmarks. For example,


 man.setPrefNode( "bookmarks", "autoplot.default.bookmarks",  "http://autoplot.org/data/bookmarks.xml" );

Parameters

nodeName - the name for the set of bookmarks.
propName - property containing the URL for the default bookmarks
deft - value to use if the propName has not been set.

Returns:

void (returns nothing)

[search for examples] [view on GitHub] [view on old javadoc]

setPrefNode( String nodeName ) → void

updateBookmarks

updateBookmarks( javax.swing.JMenu bookmarksMenu, org.autoplot.datasource.DataSetSelector dataSetSelector ) → void

add the bookmarks to the JMenu.

Parameters

bookmarksMenu - a JMenu
dataSetSelector - a DataSetSelector

Returns:

void (returns nothing)

[search for examples] [view on GitHub] [view on old javadoc]

updateBookmarks( javax.swing.JMenu bookmarksMenu, org.autoplot.AutoplotUI app, org.autoplot.datasource.DataSetSelector dataSetSelector ) → void
updateBookmarks( javax.swing.JMenu bookmarksMenu, String afterName, org.autoplot.AutoplotUI app, org.autoplot.datasource.DataSetSelector dataSetSelector ) → void