root / tags / v2_0_0_Build_2050 / applications / appgvSIG / src / org / gvsig / app / ApplicationManager.java @ 38653
History | View | Annotate | Download (9.15 KB)
1 | 26919 | jmvivo | /* gvSIG. Geographic Information System of the Valencian Government
|
---|---|---|---|
2 | *
|
||
3 | * Copyright (C) 2007-2008 Infrastructures and Transports Department
|
||
4 | * of the Valencian Government (CIT)
|
||
5 | *
|
||
6 | * This program is free software; you can redistribute it and/or
|
||
7 | * modify it under the terms of the GNU General Public License
|
||
8 | * as published by the Free Software Foundation; either version 2
|
||
9 | * of the License, or (at your option) any later version.
|
||
10 | *
|
||
11 | * This program is distributed in the hope that it will be useful,
|
||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
14 | * GNU General Public License for more details.
|
||
15 | *
|
||
16 | * You should have received a copy of the GNU General Public License
|
||
17 | * along with this program; if not, write to the Free Software
|
||
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||
19 | * MA 02110-1301, USA.
|
||
20 | *
|
||
21 | */
|
||
22 | |||
23 | /*
|
||
24 | * AUTHORS (In addition to CIT):
|
||
25 | * 2009 IVER T.I {{Task}}
|
||
26 | */
|
||
27 | |||
28 | 29596 | jpiera | package org.gvsig.app; |
29 | 26919 | jmvivo | |
30 | 29197 | jmvivo | import java.util.List; |
31 | |||
32 | 31496 | jjdelcerro | import org.cresques.cts.IProjection; |
33 | 35153 | jjdelcerro | |
34 | 34002 | jjdelcerro | import org.gvsig.about.AboutManager; |
35 | 38634 | jjdelcerro | import org.gvsig.andami.ui.mdiFrame.ThreadSafeDialogs; |
36 | 35153 | jjdelcerro | import org.gvsig.andami.ui.mdiManager.IWindow; |
37 | 31496 | jjdelcerro | import org.gvsig.andami.ui.mdiManager.MDIManager; |
38 | import org.gvsig.app.extension.Version; |
||
39 | 29596 | jpiera | import org.gvsig.app.gui.WizardPanel; |
40 | 31496 | jjdelcerro | import org.gvsig.app.prepareAction.PrepareContext; |
41 | import org.gvsig.app.prepareAction.PrepareContextView; |
||
42 | import org.gvsig.app.prepareAction.PrepareDataStore; |
||
43 | import org.gvsig.app.prepareAction.PrepareDataStoreParameters; |
||
44 | import org.gvsig.app.prepareAction.PrepareLayer; |
||
45 | import org.gvsig.app.project.Project; |
||
46 | import org.gvsig.app.project.ProjectManager; |
||
47 | 35191 | jjdelcerro | import org.gvsig.app.project.documents.Document; |
48 | import org.gvsig.app.project.documents.gui.IDocumentWindow; |
||
49 | 31496 | jjdelcerro | import org.gvsig.fmap.dal.DataManager; |
50 | 26919 | jmvivo | import org.gvsig.fmap.dal.DataStore; |
51 | import org.gvsig.fmap.dal.DataStoreParameters; |
||
52 | 31496 | jjdelcerro | import org.gvsig.fmap.geom.GeometryManager; |
53 | import org.gvsig.fmap.mapcontext.MapContextManager; |
||
54 | 26932 | jmvivo | import org.gvsig.fmap.mapcontext.layers.FLayer; |
55 | 38371 | nbrodin | import org.gvsig.gui.ColorTablesFactory; |
56 | 36476 | jjdelcerro | import org.gvsig.tools.dataTypes.DataTypesManager; |
57 | 31496 | jjdelcerro | import org.gvsig.tools.dispose.DisposableManager; |
58 | import org.gvsig.tools.dynobject.DynObjectManager; |
||
59 | import org.gvsig.tools.extensionpoint.ExtensionPointManager; |
||
60 | import org.gvsig.tools.persistence.PersistenceManager; |
||
61 | 38564 | jjdelcerro | import org.gvsig.tools.swing.icontheme.IconThemeManager; |
62 | 26919 | jmvivo | |
63 | 29197 | jmvivo | |
64 | 38634 | jjdelcerro | public interface ApplicationManager extends ThreadSafeDialogs { |
65 | 26919 | jmvivo | |
66 | 35191 | jjdelcerro | /**
|
67 | * Return the version of the application.
|
||
68 | *
|
||
69 | * @return the version
|
||
70 | */
|
||
71 | public Version getVersion() ;
|
||
72 | 26919 | jmvivo | |
73 | 35191 | jjdelcerro | /**
|
74 | * Return the active window, IWindow, in the application.
|
||
75 | *
|
||
76 | * @return the active window
|
||
77 | */
|
||
78 | public IWindow getActiveWindow();
|
||
79 | |||
80 | /**
|
||
81 | * Return the project that is loaded and in use in the application.
|
||
82 | *
|
||
83 | * @return the project
|
||
84 | */
|
||
85 | public Project getCurrentProject();
|
||
86 | |||
87 | /**
|
||
88 | * Returns the active document of the application or null
|
||
89 | * if there is no active document.
|
||
90 | *
|
||
91 | * @return the active document
|
||
92 | */
|
||
93 | public Document getActiveDocument(); |
||
94 | |||
95 | /**
|
||
96 | * Returns the active document of the application that is of the
|
||
97 | * requested type or null if there is no active document or the
|
||
98 | * active document is not of the requested type.
|
||
99 | *
|
||
100 | * @param documentTypeName, type name of the document requested.
|
||
101 | * @return the active document
|
||
102 | */
|
||
103 | public Document getActiveDocument(String documentTypeName); |
||
104 | |||
105 | /**
|
||
106 | * Returns the active document of the application that is of the
|
||
107 | * requested type or null if there is no active document or the
|
||
108 | * active document is not of the requested type.
|
||
109 | *
|
||
110 | * @param documentClass, class of the document requested.
|
||
111 | * @return the active document
|
||
112 | */
|
||
113 | 36443 | cordinyana | public Document getActiveDocument(Class<? extends Document> documentClass); |
114 | 35191 | jjdelcerro | |
115 | /**
|
||
116 | * Returns the window associated with the document passed as
|
||
117 | * parameter or null if there is no window associated with
|
||
118 | * the document.
|
||
119 | *
|
||
120 | * @param document to search the window
|
||
121 | * @return window associated to the document
|
||
122 | */
|
||
123 | public IDocumentWindow getDocumentWindow(Document document); |
||
124 | |||
125 | |||
126 | /**
|
||
127 | * Return the root of the nodes of preferences in the application.
|
||
128 | *
|
||
129 | * @return the root of preferences.
|
||
130 | */
|
||
131 | PreferencesNode getPreferences(); |
||
132 | 31496 | jjdelcerro | |
133 | 35191 | jjdelcerro | /**
|
134 | * Search and return the node of preferences required as nodeName.
|
||
135 | *
|
||
136 | * @param nodeName, name of the node to return
|
||
137 | * @return the preferences node requested
|
||
138 | */
|
||
139 | 31496 | jjdelcerro | PreferencesNode getPreferences(String nodeName);
|
140 | |||
141 | 35191 | jjdelcerro | /**
|
142 | * Return the arguments passed to the application in the command line
|
||
143 | *
|
||
144 | * @return arguments as a string array
|
||
145 | */
|
||
146 | public String[] getArguments(); |
||
147 | 31496 | jjdelcerro | |
148 | 35191 | jjdelcerro | /**
|
149 | * Return the value of the argument passed in the command line by
|
||
150 | * the name indicated as the parameter. This is passed as:
|
||
151 | * <code>
|
||
152 | * application --name=value
|
||
153 | * </code>
|
||
154 | * @param name of the requested argument
|
||
155 | * @return value of the requested argument
|
||
156 | */
|
||
157 | public String getArgument(String name); |
||
158 | 31496 | jjdelcerro | |
159 | 35191 | jjdelcerro | /**
|
160 | * Get the value of the system clipboard as a string.
|
||
161 | *
|
||
162 | * @return the clipboard value
|
||
163 | */
|
||
164 | public String getFromClipboard(); |
||
165 | 31496 | jjdelcerro | |
166 | 35191 | jjdelcerro | /**
|
167 | * Put the string value passed as parameter in the clipboard of
|
||
168 | * the system.
|
||
169 | *
|
||
170 | * @param data to put in the clipboard.
|
||
171 | */
|
||
172 | public void putInClipboard(String data) ; |
||
173 | 26919 | jmvivo | |
174 | 35191 | jjdelcerro | /**
|
175 | * Obtain the projection associated by the code of projection
|
||
176 | * Passed as parameter. If passed code of projection it not
|
||
177 | * a valid projection code null is returned.
|
||
178 | *
|
||
179 | * @param code of the projection requested
|
||
180 | * @return the requested projection or null
|
||
181 | */
|
||
182 | public IProjection getCRS(String code); |
||
183 | |||
184 | /**
|
||
185 | * Utility method to obtain the DataManager used in the application at this moment.
|
||
186 | *
|
||
187 | * @return the DataManager
|
||
188 | */
|
||
189 | public DataManager getDataManager();
|
||
190 | |||
191 | /**
|
||
192 | * Utility method to obtain the ProjectManager used in the application at this moment.
|
||
193 | *
|
||
194 | * @return the ProjectManager
|
||
195 | */
|
||
196 | public ProjectManager getProjectManager();
|
||
197 | 26932 | jmvivo | |
198 | 35191 | jjdelcerro | /**
|
199 | * Utility method to obtain the UIManager used in the application at this moment.
|
||
200 | *
|
||
201 | * @return the UIManager
|
||
202 | */
|
||
203 | public MDIManager getUIManager();
|
||
204 | |||
205 | /**
|
||
206 | * Utility method to obtain the GeometryManager used in the application at this moment.
|
||
207 | *
|
||
208 | * @return the GeometryManager
|
||
209 | */
|
||
210 | public GeometryManager getGeometryManager();
|
||
211 | |||
212 | /**
|
||
213 | * Utility method to obtain the PersistenceManager used in the application at this moment.
|
||
214 | *
|
||
215 | * @return the PersistenceManager
|
||
216 | */
|
||
217 | public PersistenceManager getPersistenceManager();
|
||
218 | |||
219 | /**
|
||
220 | * Utility method to obtain the DisposableManager used in the application at this moment.
|
||
221 | *
|
||
222 | * @return the DisposableManager
|
||
223 | */
|
||
224 | public DisposableManager getDisposableManager() ;
|
||
225 | 31496 | jjdelcerro | |
226 | 35191 | jjdelcerro | /**
|
227 | * Utility method to obtain the DynObjectManager used in the application at this moment.
|
||
228 | *
|
||
229 | * @return the DynObjectManager
|
||
230 | */
|
||
231 | public DynObjectManager getDynObjectManager() ;
|
||
232 | 31496 | jjdelcerro | |
233 | 35191 | jjdelcerro | /**
|
234 | * Utility method to obtain the ExtensionPointManager used in the application at this moment.
|
||
235 | *
|
||
236 | * @return the ExtensionPointManager
|
||
237 | */
|
||
238 | public ExtensionPointManager getExtensionPointManager();
|
||
239 | |||
240 | /**
|
||
241 | * Utility method to obtain the MapContextManager used in the application at this moment.
|
||
242 | *
|
||
243 | * @return the MapContextManager
|
||
244 | */
|
||
245 | public MapContextManager getMapContextManager();
|
||
246 | |||
247 | /**
|
||
248 | * Utility method to obtain the AboutManager used in the application at this moment.
|
||
249 | *
|
||
250 | * @return the AboutManager
|
||
251 | */
|
||
252 | public AboutManager getAbout();
|
||
253 | |||
254 | 36476 | jjdelcerro | public DataTypesManager getDataTypesManager();
|
255 | 35191 | jjdelcerro | |
256 | /**
|
||
257 | * Utility method to obtain the IconThemeManager used in the application at this moment.
|
||
258 | *
|
||
259 | * @return the IconThemeManager
|
||
260 | */
|
||
261 | IconThemeManager getIconThemeManager(); |
||
262 | |||
263 | 29197 | jmvivo | void registerAddTableWizard(String name, String description, |
264 | Class<? extends WizardPanel> wpClass); |
||
265 | |||
266 | List<WizardPanel> getWizardPanels() throws Exception; |
||
267 | |||
268 | 31496 | jjdelcerro | |
269 | |||
270 | void registerPrepareOpenDataStore(PrepareDataStore action);
|
||
271 | void registerPrepareOpenDataStoreParameters( PrepareDataStoreParameters action);
|
||
272 | void registerPrepareOpenLayer(PrepareLayer action);
|
||
273 | |||
274 | 26919 | jmvivo | DataStore pepareOpenDataSource(DataStore store, |
275 | 29197 | jmvivo | PrepareContext context) |
276 | throws Exception; |
||
277 | 26919 | jmvivo | |
278 | DataStoreParameters prepareOpenDataStoreParameters( |
||
279 | 29197 | jmvivo | DataStoreParameters storeParameters, PrepareContext context) |
280 | throws Exception; |
||
281 | 36767 | nbrodin | |
282 | List<DataStoreParameters> prepareOpenDataStoreParameters(
|
||
283 | List<DataStoreParameters> storeParameters, PrepareContext context)
|
||
284 | throws Exception; |
||
285 | 26932 | jmvivo | |
286 | FLayer prepareOpenLayer(FLayer layer, |
||
287 | 29197 | jmvivo | PrepareContextView context) |
288 | throws Exception; |
||
289 | 31496 | jjdelcerro | |
290 | |||
291 | 38371 | nbrodin | public ColorTablesFactory getColorTablesFactory();
|
292 | 31496 | jjdelcerro | |
293 | 38371 | nbrodin | public void registerColorTablesFactory(ColorTablesFactory factory); |
294 | 35974 | jjdelcerro | |
295 | public String getLocaleLanguage(); |
||
296 | 38242 | jldominguez | |
297 | /**
|
||
298 | 38634 | jjdelcerro | * sets message in status bar
|
299 | *
|
||
300 | * This method is thread safe.
|
||
301 | *
|
||
302 | 38242 | jldominguez | * @param message
|
303 | 38634 | jjdelcerro | * @param message_type One of: JOptionPane.ERROR_MESSAGE,
|
304 | 38242 | jldominguez | * JOptionPane.WARNING_MESSAGE, JOptionPane.INFORMATION_MESSAGE
|
305 | */
|
||
306 | public void message(String message, int message_type); |
||
307 | 31496 | jjdelcerro | |
308 | 26919 | jmvivo | } |