01: /* uDig - User Friendly Desktop Internet GIS client
02: * http://udig.refractions.net
03: * (C) 2004, Refractions Research Inc.
04: *
05: * This library is free software; you can redistribute it and/or
06: * modify it under the terms of the GNU Lesser General Public
07: * License as published by the Free Software Foundation;
08: * version 2.1 of the License.
09: *
10: * This library is distributed in the hope that it will be useful,
11: * but WITHOUT ANY WARRANTY; without even the implied warranty of
12: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13: * Lesser General Public License for more details.
14: */
15: package org.tcat.citd.sim.udig.bookmarks;
16:
17: import net.refractions.udig.project.command.NavCommand;
18:
19: import org.tcat.citd.sim.udig.bookmarks.internal.command.GotoBookmarkCommand;
20:
21: /**
22: * Factory for creating bookmark-related commands
23: * <p>
24: *
25: * </p>
26: * @author cole.markham
27: * @since 1.0.0
28: */
29: public class BookmarkCommandFactory {
30: /**
31: * Creates a new BookmarkCommandFactory object
32: *
33: * @return a new BookmarkCommandFactory object
34: */
35: public static BookmarkCommandFactory getInstance() {
36: return instance;
37: }
38:
39: private static final BookmarkCommandFactory instance = new BookmarkCommandFactory();
40:
41: private BookmarkCommandFactory() {
42: // no op
43: }
44:
45: /**
46: * Creates a new {@linkplain GotoBookmarkCommand}
47: *
48: * @param target The target bookmark for the new command
49: * @return a new GotoBookmarkCommand object
50: * @see NavCommand
51: */
52: public NavCommand createGotoBookmarkCommand(Bookmark target) {
53: return new GotoBookmarkCommand(target);
54: }
55: }
|