1 19 20 package org.netbeans.lib.editor.bookmarks; 21 22 import java.beans.PropertyChangeListener ; 23 import javax.swing.event.DocumentEvent ; 24 import javax.swing.text.BadLocationException ; 25 import javax.swing.text.Document ; 26 import org.netbeans.lib.editor.bookmarks.api.Bookmark; 27 import org.netbeans.lib.editor.bookmarks.api.BookmarkList; 28 import org.netbeans.lib.editor.bookmarks.spi.BookmarkImplementation; 29 import org.netbeans.lib.editor.bookmarks.spi.BookmarkManager; 30 31 37 38 public abstract class BookmarksApiPackageAccessor { 39 40 private static BookmarksApiPackageAccessor INSTANCE; 41 42 public static BookmarksApiPackageAccessor get() { 43 return INSTANCE; 44 } 45 46 52 public static void register(BookmarksApiPackageAccessor accessor) { 53 if (INSTANCE != null) { 54 throw new IllegalStateException ("Already registered"); } 56 INSTANCE = accessor; 57 } 58 59 public abstract BookmarkManager getBookmarkManager(BookmarkList bookmarkList); 60 61 public abstract BookmarkImplementation getBookmarkImplementation(Bookmark bookmark); 62 63 public abstract Bookmark addBookmark(BookmarkList list, BookmarkImplementation impl); 64 65 public abstract void addBookmarkListPcl(BookmarkList list, PropertyChangeListener l); 66 67 public abstract void removeBookmarkListPcl(BookmarkList list, PropertyChangeListener l); 68 } 69 | Popular Tags |