Source Code Cross Referenced for NavigationCommandFactory.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.Arrays;
012:
013:        import net.refractions.udig.project.internal.command.navigation.NavComposite;
014:        import net.refractions.udig.project.internal.command.navigation.PanCommand;
015:        import net.refractions.udig.project.internal.command.navigation.SetViewportBBoxCommand;
016:        import net.refractions.udig.project.internal.command.navigation.SetViewportCenterCommand;
017:        import net.refractions.udig.project.internal.command.navigation.SetViewportHeight;
018:        import net.refractions.udig.project.internal.command.navigation.SetViewportWidth;
019:        import net.refractions.udig.project.internal.command.navigation.ZoomCommand;
020:        import net.refractions.udig.project.internal.command.navigation.ZoomExtentCommand;
021:
022:        import org.opengis.referencing.crs.CoordinateReferenceSystem;
023:
024:        import com.vividsolutions.jts.geom.Coordinate;
025:        import com.vividsolutions.jts.geom.Envelope;
026:
027:        /**
028:         * API comment me TODO provide type description
029:         * 
030:         * @author jeichar
031:         * @deprecated
032:         * @since TODO provide version
033:         */
034:        public class NavigationCommandFactory {
035:            /**
036:             * Creates a new NavigationCommandFactory object
037:             * 
038:             * @return a new NavigationCommandFactory object
039:             */
040:            public static NavigationCommandFactory getInstance() {
041:                return instance;
042:            }
043:
044:            private static final NavigationCommandFactory instance = new NavigationCommandFactory();
045:
046:            protected NavigationCommandFactory() {
047:                // no op
048:            }
049:
050:            /**
051:             * Creates a new {@linkplain NavComposite}
052:             * 
053:             * @param commands an array of commands to execute as a simgle command. The array will be
054:             *        executed from position 0 to position length-1 in order.
055:             * @return a new NavComposite object
056:             * @see NavCommand
057:             */
058:            public NavCommand createCompositeCommand(NavCommand[] commands) {
059:                return new NavComposite(Arrays.asList(commands));
060:            }
061:
062:            /**
063:             * Creates a new {@linkplain SetViewportBBoxCommand}
064:             * 
065:             * @param newbbox the new bounding box to set in the viewport
066:             * @return a new SetViewportBBoxCommand object
067:             * @see NavCommand
068:             * @see Envelope
069:             */
070:            public NavCommand createSetViewportBBoxCommand(Envelope newbbox) {
071:                return new SetViewportBBoxCommand(newbbox);
072:            }
073:
074:            /**
075:             * Creates a new {@linkplain ZoomCommand}
076:             * 
077:             * @param zoomfactor the amount to zoom
078:             * @return a new ZoomCommand object
079:             * @see NavCommand
080:             */
081:            public NavCommand createZoomCommand(double zoomfactor) {
082:                return new ZoomCommand(zoomfactor);
083:            }
084:
085:            /**
086:             * Creates a new {@linkplain ZoomExtentCommand}
087:             * 
088:             * @return a new ZoomExtentCommand object
089:             * @see NavCommand
090:             */
091:            public NavCommand createZoomExtentCommand() {
092:                return new ZoomExtentCommand();
093:            }
094:
095:            /**
096:             * Creates a new {@linkplain SetViewportCenterCommand}
097:             * 
098:             * @param center Sets the center of the viewport. The Coordinate must be in world coordinates.
099:             * @return a new SetViewportCenterCommand object
100:             * @see NavCommand
101:             * @see Coordinate
102:             */
103:            public NavCommand createSetViewportCenterCommand(Coordinate center) {
104:                return new SetViewportCenterCommand(center);
105:            }
106:
107:            /**
108:             * Creates a new {@linkplain SetViewportHeight}
109:             * 
110:             * @param height The new viewport height
111:             * @return a new SetViewportHeight object
112:             * @see NavCommand
113:             */
114:            public NavCommand createSetViewportHeight(double height) {
115:                return new SetViewportHeight(height);
116:            }
117:
118:            /**
119:             * Creates a new {@linkplain SetViewportWidth}
120:             * 
121:             * @param width the new viewport width
122:             * @return a new SetViewportWidth object
123:             * @see NavCommand
124:             */
125:            public NavCommand createSetViewportWidth(double width) {
126:                return new SetViewportWidth(width);
127:            }
128:
129:            /**
130:             * Creates a new {@linkplain PanCommand}Pans the viewport in terms of pixels on the screen.
131:             * Each pixel represents a distance in world coordinates, the x and y distances differ, so a pan
132:             * of 8 pixels in the x direction will be translated to a pan of 8*xdistance in the world.
133:             * 
134:             * @param xpixels The amount, in pixels, to pan in the x direction
135:             * @param ypixels The amount, in pixels, to pan in the y direction
136:             * @return a new PanCommand object
137:             * @see NavCommand
138:             */
139:            public NavCommand createPanCommandUsingScreenCoords(int xpixels,
140:                    int ypixels) {
141:                return new PanCommand(xpixels, ypixels);
142:            }
143:
144:            /**
145:             * Creates a new {@linkplain PanCommand}
146:             * 
147:             * @param x The amount, in world coordinates, to pan in the x direction
148:             * @param y The amount, in world coordinates, to pan in the y direction
149:             * @return a new PanCommand object
150:             * @see NavCommand
151:             */
152:            public NavCommand createPanCommandUsingWorldCoords(double x,
153:                    double y) {
154:                return new PanCommand(x, y);
155:            }
156:
157:            public NavCommand createSetViewportBBoxCommand(Envelope bounds,
158:                    CoordinateReferenceSystem crs) {
159:                return new SetViewportBBoxCommand(bounds, crs);
160:            }
161:
162:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.