Source Code Cross Referenced for SelectionCommandFactory.java in  » GIS » udig-1.1 » net » refractions » udig » project » command » factory » 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.factory 
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.factory;
010:
011:        import java.util.List;
012:
013:        import net.refractions.udig.project.ILayer;
014:        import net.refractions.udig.project.command.CompositeCommand;
015:        import net.refractions.udig.project.command.MapCommand;
016:        import net.refractions.udig.project.command.UndoableComposite;
017:        import net.refractions.udig.project.command.UndoableMapCommand;
018:        import net.refractions.udig.project.internal.commands.selection.BBoxSelectionCommand;
019:        import net.refractions.udig.project.internal.commands.selection.FIDSelectCommand;
020:        import net.refractions.udig.project.internal.commands.selection.NoSelectCommand;
021:        import net.refractions.udig.project.internal.commands.selection.SelectCommand;
022:
023:        import org.geotools.feature.Feature;
024:        import org.geotools.filter.Filter;
025:
026:        import com.vividsolutions.jts.geom.Envelope;
027:
028:        /**
029:         * A factory which can be used to create all the standard selection commands.
030:         * 
031:         * API use
032:         * 
033:         * @author jeichar
034:         * @since 0.3
035:         */
036:        @SuppressWarnings("deprecation")
037:        public class SelectionCommandFactory extends
038:                net.refractions.udig.project.command.SelectionCommandFactory {
039:            /**
040:             * Creates a new SelectionCommandFactory object
041:             * 
042:             * @return a new SelectionCommandFactory object
043:             */
044:            public static SelectionCommandFactory getInstance() {
045:                return instance;
046:            }
047:
048:            private static final SelectionCommandFactory instance = new SelectionCommandFactory();
049:
050:            protected SelectionCommandFactory() {
051:                // no op;
052:            }
053:
054:            /**
055:             * Creates a new {@linkplain BBoxSelectionCommand}
056:             * 
057:             * @param bbox A bounding used as the filter, all features intersecting the bbox will be
058:             *        considered selected
059:             * @param modifiers Options include: BBoxSelectionCommand.ADD, BBoxSelectionCommand.NONE,
060:             *        BBoxSelectionCommand.SUBTRACT
061:             * @return A new BBoxSelectionCommand. The command should be sent to the
062:             *         {@linkplain SelectionManager}to be executed.
063:             * @see Envelope
064:             * @see MapCommand
065:             */
066:            public UndoableMapCommand createBBoxSelectionCommand(Envelope bbox,
067:                    int modifiers) {
068:                return new BBoxSelectionCommand(bbox, modifiers);
069:            }
070:
071:            /**
072:             * Creates a new {@linkplain BBoxSelectionCommand}.  
073:             * Same as createBBoxSelectionCommand(bbox, BBoxSelectionCommand.NONE)
074:             * 
075:             * @param bbox A bounding used as the filter, all features intersecting the bbox will be
076:             *        considered selected
077:             * @return A new BBoxSelectionCommand. The command should be sent to the
078:             *         {@linkplain SelectionManager}to be executed.
079:             * @see Envelope
080:             * @see MapCommand
081:             */
082:            public UndoableMapCommand createBBoxSelectionCommand(
083:                    Envelope boundingBox) {
084:                return new BBoxSelectionCommand(boundingBox,
085:                        BBoxSelectionCommand.NONE);
086:            }
087:
088:            /**
089:             * Creates a {@linkplain NoSelectCommand}
090:             * 
091:             * @return a {@linkplain NoSelectCommand}object. The command should be sent to the
092:             *         {@linkplain SelectionManager}to be executed.
093:             * @see MapCommand
094:             */
095:            public UndoableMapCommand createNoSelectCommand() {
096:                return new NoSelectCommand();
097:            }
098:
099:            /**
100:             * Create a MapCommand that sets the layer selection to be a fidfilter.
101:             * 
102:             * @return a {@linkplain FIDSelectCommand}
103:             * @see MapCommand
104:             */
105:            public UndoableMapCommand createFIDSelectCommand(ILayer layer,
106:                    String fid) {
107:                return new FIDSelectCommand(layer, fid);
108:            }
109:
110:            /**
111:             * Create a MapCommand that sets the layer selection to be a fidfilter.
112:             * 
113:             * @return a {@linkplain FIDSelectCommand}
114:             * @see MapCommand
115:             */
116:            public UndoableMapCommand createFIDSelectCommand(ILayer layer,
117:                    Feature feature) {
118:                return new FIDSelectCommand(layer, feature.getID());
119:            }
120:
121:            /**
122:             * Create a MapCommand that sets the layer selection to be the filter.
123:             * 
124:             * @return a {@linkplain SelectCommand}
125:             * @see MapCommand
126:             */
127:            public UndoableMapCommand createSelectCommand(ILayer layer,
128:                    Filter filter) {
129:                return new SelectCommand(layer, filter);
130:            }
131:
132:            /**
133:             * Create a CompositeCommand
134:             * 
135:             * @param commands the commands to be executed as a single command
136:             * @return a {@linkplain CompositeCommand}
137:             * @see MapCommand
138:             */
139:            public MapCommand createCompositeCommand(
140:                    List<? extends MapCommand> commands) {
141:                return new CompositeCommand(commands);
142:            }
143:
144:            /**
145:             * Create a CompositeCommand
146:             * 
147:             * @param commands the commands to be executed as a single command
148:             * @return a {@linkplain CompositeCommand}
149:             * @see MapCommand
150:             */
151:            public UndoableMapCommand createUndoableCompositeCommand(
152:                    List<? extends UndoableMapCommand> commands) {
153:                return new UndoableComposite(commands);
154:            }
155:
156:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.