Package org.locationtech.udig.bookmarks

Examples of org.locationtech.udig.bookmarks.IBookmark


                    }
                    ((BookmarksView) view)
                            .selectReveal(new StructuredSelection(bookmark));
                }
            } else if (RENAME_BOOKMARK_ACTION_ID.equals(action.getId())) {
                IBookmark bookmark = (IBookmark) selection.getFirstElement();
                InputDialog dialog = new InputDialog(Display.getCurrent()
                        .getActiveShell(),
                        Messages.BookmarkAction_dialogtitle_renamebookmark,
                        Messages.BookmarkAction_dialogprompt_enterbookmarkname,
                        bookmark.getName(), null);
                dialog.open();
                if (dialog.getReturnCode() == Window.OK) {
                    String name = dialog.getValue();
                    bookmark.setName(name);
                    refreshView();
                }
            } else if (SAVE_BOOKMARKS_ACTION_ID.equals(action.getId())) {
                BookmarksPlugin.getDefault().storeToPreferences();
            } else if (RESTORE_BOOKMARKS_ACTION_ID.equals(action.getId())) {
View Full Code Here


        comboViewer.setContentProvider(new ArrayContentProvider());
        comboViewer.setLabelProvider(new LabelProvider(){
            @Override
            public String getText( Object element ) {
                if (element instanceof IBookmark) {
                    IBookmark bookmark = (IBookmark) element;
                    return bookmark.getName();
                }
                return super.getText(element);
            }
        });
        List<IBookmark> bookmarks = (List<IBookmark>)bookmarkService.getBookmarks();
View Full Code Here

        if (comboViewer == null || disposed) {
            listenService(false);
            return; // the view has shutdown!
        }
       
        IBookmark current = getSelected();
        // check combo
        if (current != selected) {
            try {
                //listenCombo(false);
                comboViewer.setSelection(new StructuredSelection(selected), true);
View Full Code Here

        String name;
        if (obj instanceof IBookmarkService) {
            IBookmarkService bManager = (BookmarkServiceImpl) obj;
            name = bManager.getName();
        } else if (obj instanceof Bookmark) {
            IBookmark bookmark = (IBookmark) obj;
            name = bookmark.getName();
        } else if (obj instanceof ProjectWrapper) {
            ProjectWrapper project = (ProjectWrapper) obj;
            name = project.getName();
        } else if (obj instanceof MapReference) {
            MapReference map = (MapReference) obj;
View Full Code Here

TOP

Related Classes of org.locationtech.udig.bookmarks.IBookmark

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.