Source Code Cross Referenced for SelectionCommandFactory.java in  » GIS » udig-1.1 » net » refractions » udig » project » command » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » GIS » udig 1.1 » net.refractions.udig.project.command 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * uDig - User Friendly Desktop Internet GIS client http://udig.refractions.net (C) 2004,
003:         * Refractions Research Inc. This library is free software; you can redistribute it and/or modify it
004:         * under the terms of the GNU Lesser General Public License as published by the Free Software
005:         * Foundation; version 2.1 of the License. This library is distributed in the hope that it will be
006:         * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
007:         * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
008:         */
009:        package net.refractions.udig.project.command;
010:
011:        import java.util.List;
012:
013:        import net.refractions.udig.project.ILayer;
014:        import net.refractions.udig.project.internal.commands.selection.BBoxSelectionCommand;
015:        import net.refractions.udig.project.internal.commands.selection.FIDSelectCommand;
016:        import net.refractions.udig.project.internal.commands.selection.NoSelectCommand;
017:        import net.refractions.udig.project.internal.commands.selection.SelectCommand;
018:
019:        import org.geotools.feature.Feature;
020:        import org.geotools.filter.Filter;
021:
022:        import com.vividsolutions.jts.geom.Envelope;
023:
024:        /**
025:         * A factory which can be used to create all the standard selection commands.
026:         * 
027:         * API use
028:         * 
029:         * @author jeichar
030:         * @deprecated
031:         * @since 0.3
032:         */
033:        public class SelectionCommandFactory {
034:            /**
035:             * Creates a new SelectionCommandFactory object
036:             * 
037:             * @return a new SelectionCommandFactory object
038:             */
039:            public static SelectionCommandFactory getInstance() {
040:                return instance;
041:            }
042:
043:            private static final SelectionCommandFactory instance = new SelectionCommandFactory();
044:
045:            protected SelectionCommandFactory() {
046:                // no op;
047:            }
048:
049:            /**
050:             * Creates a new {@linkplain BBoxSelectionCommand}
051:             * 
052:             * @param bbox A bounding used as the filter, all features intersecting the bbox will be
053:             *        considered selected
054:             * @param modifiers Options include: BBoxSelectionCommand.ADD, BBoxSelectionCommand.NONE,
055:             *        BBoxSelectionCommand.SUBTRACT
056:             * @return A new BBoxSelectionCommand. The command should be sent to the
057:             *         {@linkplain SelectionManager}to be executed.
058:             * @see Envelope
059:             * @see MapCommand
060:             */
061:            public MapCommand createBBoxSelectionCommand(Envelope bbox,
062:                    int modifiers) {
063:                return new BBoxSelectionCommand(bbox, modifiers);
064:            }
065:
066:            /**
067:             * Creates a new {@linkplain BBoxSelectionCommand}.  
068:             * Same as createBBoxSelectionCommand(bbox, BBoxSelectionCommand.NONE)
069:             * 
070:             * @param bbox A bounding used as the filter, all features intersecting the bbox will be
071:             *        considered selected
072:             * @return A new BBoxSelectionCommand. The command should be sent to the
073:             *         {@linkplain SelectionManager}to be executed.
074:             * @see Envelope
075:             * @see MapCommand
076:             */
077:            public MapCommand createBBoxSelectionCommand(Envelope boundingBox) {
078:                return new BBoxSelectionCommand(boundingBox,
079:                        BBoxSelectionCommand.NONE);
080:            }
081:
082:            /**
083:             * Creates a {@linkplain NoSelectCommand}
084:             * 
085:             * @return a {@linkplain NoSelectCommand}object. The command should be sent to the
086:             *         {@linkplain SelectionManager}to be executed.
087:             * @see MapCommand
088:             */
089:            public MapCommand createNoSelectCommand() {
090:                return new NoSelectCommand();
091:            }
092:
093:            /**
094:             * Create a MapCommand that sets the layer selection to be a fidfilter.
095:             * 
096:             * @return a {@linkplain FIDSelectCommand}
097:             * @see MapCommand
098:             */
099:            public MapCommand createFIDSelectCommand(ILayer layer, String fid) {
100:                return new FIDSelectCommand(layer, fid);
101:            }
102:
103:            /**
104:             * Create a MapCommand that sets the layer selection to be a fidfilter.
105:             * 
106:             * @return a {@linkplain FIDSelectCommand}
107:             * @see MapCommand
108:             */
109:            public MapCommand createFIDSelectCommand(ILayer layer,
110:                    Feature feature) {
111:                return new FIDSelectCommand(layer, feature.getID());
112:            }
113:
114:            /**
115:             * Create a MapCommand that sets the layer selection to be the filter.
116:             * 
117:             * @return a {@linkplain SelectCommand}
118:             * @see MapCommand
119:             */
120:            public MapCommand createSelectCommand(ILayer layer, Filter filter) {
121:                return new SelectCommand(layer, filter);
122:            }
123:
124:            /**
125:             * Create a CompositeCommand
126:             * 
127:             * @param commands the commands to be executed as a single command
128:             * @return a {@linkplain CompositeCommand}
129:             * @see MapCommand
130:             */
131:            public MapCommand createCompositeCommand(
132:                    List<? extends MapCommand> commands) {
133:                return new CompositeCommand(commands);
134:            }
135:
136:            /**
137:             * Create a CompositeCommand
138:             * 
139:             * @param commands the commands to be executed as a single command
140:             * @return a {@linkplain CompositeCommand}
141:             * @see MapCommand
142:             */
143:            public MapCommand createUndoableCompositeCommand(
144:                    List<? extends UndoableMapCommand> commands) {
145:                return new UndoableComposite(commands);
146:            }
147:
148:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.