Source Code Cross Referenced for BasicCommandFactory.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.Collection;
012:        import java.util.List;
013:
014:        import net.refractions.udig.catalog.IGeoResource;
015:        import net.refractions.udig.project.ILayer;
016:        import net.refractions.udig.project.IMap;
017:        import net.refractions.udig.project.command.UndoableMapCommand;
018:        import net.refractions.udig.project.internal.Layer;
019:        import net.refractions.udig.project.internal.Map;
020:        import net.refractions.udig.project.internal.Project;
021:        import net.refractions.udig.project.internal.commands.AddLayerCommand;
022:        import net.refractions.udig.project.internal.commands.AddLayersCommand;
023:        import net.refractions.udig.project.internal.commands.ChangeCRSCommand;
024:        import net.refractions.udig.project.internal.commands.CreateMapCommand;
025:        import net.refractions.udig.project.internal.commands.DeleteLayerCommand;
026:        import net.refractions.udig.project.internal.commands.SetApplicabilityCommand;
027:
028:        import org.opengis.referencing.crs.CoordinateReferenceSystem;
029:
030:        /**
031:         * Creates Edit commands which must be used to modify editable feature data. API internal classes
032:         * are in the returned API
033:         * 
034:         * @author jeichar
035:         * @since 0.3
036:         */
037:        @SuppressWarnings("deprecation")
038:        public class BasicCommandFactory extends
039:                net.refractions.udig.project.command.BasicCommandFactory {
040:            /**
041:             * Creates a new EditCommandFactory object
042:             * 
043:             * @return a new EditCommandFactory object
044:             */
045:            public static BasicCommandFactory getInstance() {
046:                return instance;
047:            }
048:
049:            private static final BasicCommandFactory instance = new BasicCommandFactory();
050:
051:            protected BasicCommandFactory() {
052:                // no op
053:            }
054:
055:            /**
056:             * Create a delete layer command
057:             * 
058:             * @param map the map containing the layer
059:             * @param layer the layer to delete
060:             * @return a new {@linkplain DeleteLayerCommand}object that deletes the layer.
061:             * @see DeleteLayerCommand
062:             */
063:            public UndoableMapCommand createDeleteLayer(ILayer layer) {
064:                return new DeleteLayerCommand((Layer) layer);
065:            }
066:
067:            /**
068:             * Create an Add Layer command
069:             * 
070:             * @param layer the layer to add to the map.
071:             * @return a new {@linkplain AddLayerCommand}object that deletes the feature.
072:             * @see AddLayerCommand
073:             */
074:            public UndoableMapCommand createAddLayer(ILayer layer) {
075:                return new AddLayerCommand((Layer) layer);
076:            }
077:
078:            /**
079:             * Create an Add Layer command
080:             * 
081:             * @param layer the layer to add to the map.
082:             * @param index the zorder where the layer will be added.
083:             * @return a new {@linkplain AddLayerCommand}object that deletes the feature.
084:             * @see AddLayerCommand
085:             */
086:            public UndoableMapCommand createAddLayer(ILayer layer, int index) {
087:                return new AddLayerCommand((Layer) layer, index);
088:            }
089:
090:            /**
091:             * Create an AddLayers command that adds all the layers in the collection
092:             * 
093:             * @param evaluationObject the layer to add to the map.
094:             * @param index the zorder where the layer will be added.
095:             * @return a new {@linkplain AddLayersCommand}object that deletes the feature.
096:             * @see AddLayersCommand
097:             */
098:            public UndoableMapCommand createAddManyLayers(Collection layers,
099:                    int index) {
100:                return new AddLayersCommand(layers, index);
101:            }
102:
103:            /**
104:             * Create an AddLayers command that adds all the layers in the collection
105:             * 
106:             * @param evaluationObject the layer to add to the map.
107:             * @return a new {@linkplain AddLayersCommand}object that deletes the feature.
108:             * @see AddLayersCommand
109:             */
110:            public UndoableMapCommand createAddManyLayers(Collection layers) {
111:                return new AddLayersCommand(layers);
112:            }
113:
114:            /**
115:             * Create a Change CRS command
116:             * 
117:             * @param map the map for which the CRS is going to change.
118:             * @return a new {@linkplain ChangeCRSCommand}object that changes the CRS.
119:             * @see ChangeCRSCommand
120:             */
121:            public UndoableMapCommand createChangeCRS(IMap map,
122:                    CoordinateReferenceSystem crs) {
123:                return new ChangeCRSCommand((Map) map, crs);
124:            }
125:
126:            /**
127:             * Create a CreateMapCommand
128:             * 
129:             * @param name the name of the map
130:             * @param layerResources the IGeoResources that will make up the layers of the map.
131:             * @param owner The project that will contain the map.
132:             * @return
133:             */
134:            public UndoableMapCommand createCreateMapCommand(String name,
135:                    List<IGeoResource> layerResources, Project owner) {
136:                return new CreateMapCommand(name, layerResources, owner);
137:            }
138:
139:            /**
140:             * Create a CreateMapCommand
141:             * 
142:             * @param layerResources the IGeoResources that will make up the layers of the map.
143:             * @param owner The project that will contain the map.
144:             * @return
145:             */
146:            public UndoableMapCommand createCreateMapCommand(
147:                    List<IGeoResource> layerResources, Project owner) {
148:                return new CreateMapCommand(null, layerResources, owner);
149:            }
150:
151:            /**
152:             * Create a CreateMapCommand
153:             * 
154:             * @param name the name of the map
155:             * @param layerResources the IGeoResources that will make up the layers of the map.
156:             * @return
157:             */
158:            public UndoableMapCommand createCreateMapCommand(String name,
159:                    List<IGeoResource> layerResources) {
160:                return new CreateMapCommand(name, layerResources, null);
161:            }
162:
163:            /**
164:             * Create a CreateMapCommand
165:             * 
166:             * @param layerResources the objects, (Layers or IGeoResources) that will make up the map.
167:             * @return
168:             */
169:            public UndoableMapCommand createCreateMapCommand(
170:                    List<IGeoResource> layerResources) {
171:                return new CreateMapCommand(null, layerResources, null);
172:            }
173:
174:            public UndoableMapCommand createSetApplicabilityCommand(
175:                    ILayer layer, String applicabilityId, boolean newValue) {
176:                return new SetApplicabilityCommand(layer, applicabilityId,
177:                        newValue);
178:            }
179:
180:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.