Statistics
| Revision:

root / branches / v2_0_0_prep / applications / appgvSIG / src / org / gvsig / app / ApplicationManager.java @ 38564

History | View | Annotate | Download (9.03 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 35153 jjdelcerro
import org.gvsig.andami.ui.mdiManager.IWindow;
36 31496 jjdelcerro
import org.gvsig.andami.ui.mdiManager.MDIManager;
37
import org.gvsig.app.extension.Version;
38 29596 jpiera
import org.gvsig.app.gui.WizardPanel;
39 31496 jjdelcerro
import org.gvsig.app.prepareAction.PrepareContext;
40
import org.gvsig.app.prepareAction.PrepareContextView;
41
import org.gvsig.app.prepareAction.PrepareDataStore;
42
import org.gvsig.app.prepareAction.PrepareDataStoreParameters;
43
import org.gvsig.app.prepareAction.PrepareLayer;
44
import org.gvsig.app.project.Project;
45
import org.gvsig.app.project.ProjectManager;
46 35191 jjdelcerro
import org.gvsig.app.project.documents.Document;
47
import org.gvsig.app.project.documents.gui.IDocumentWindow;
48 31496 jjdelcerro
import org.gvsig.fmap.dal.DataManager;
49 26919 jmvivo
import org.gvsig.fmap.dal.DataStore;
50
import org.gvsig.fmap.dal.DataStoreParameters;
51 31496 jjdelcerro
import org.gvsig.fmap.geom.GeometryManager;
52
import org.gvsig.fmap.mapcontext.MapContextManager;
53 26932 jmvivo
import org.gvsig.fmap.mapcontext.layers.FLayer;
54 38371 nbrodin
import org.gvsig.gui.ColorTablesFactory;
55 36476 jjdelcerro
import org.gvsig.tools.dataTypes.DataTypesManager;
56 31496 jjdelcerro
import org.gvsig.tools.dispose.DisposableManager;
57
import org.gvsig.tools.dynobject.DynObjectManager;
58
import org.gvsig.tools.extensionpoint.ExtensionPointManager;
59
import org.gvsig.tools.persistence.PersistenceManager;
60 38564 jjdelcerro
import org.gvsig.tools.swing.icontheme.IconThemeManager;
61 26919 jmvivo
62 29197 jmvivo
63 31496 jjdelcerro
public interface ApplicationManager {
64 26919 jmvivo
65 35191 jjdelcerro
    /**
66
     * Return the version of the application.
67
     *
68
     * @return the version
69
     */
70
        public Version getVersion() ;
71 26919 jmvivo
72 35191 jjdelcerro
    /**
73
     * Return the active window, IWindow, in the application.
74
     *
75
     * @return the active window
76
     */
77
        public IWindow getActiveWindow();
78
79
        /**
80
         * Return the project that is loaded and in use in the application.
81
         *
82
         * @return the project
83
         */
84
    public Project getCurrentProject();
85
86
    /**
87
     * Returns the active document of the application or null
88
     * if there is no active document.
89
     *
90
     * @return the active document
91
     */
92
    public Document getActiveDocument();
93
94
    /**
95
     * Returns the active document of the application that is of the
96
     * requested type or null if there is no active document or the
97
     * active document is not of the requested type.
98
     *
99
     * @param documentTypeName, type name of the document requested.
100
     * @return the active document
101
     */
102
    public Document getActiveDocument(String documentTypeName);
103
104
    /**
105
     * Returns the active document of the application that is of the
106
     * requested type or null if there is no active document or the
107
     * active document is not of the requested type.
108
     *
109
     * @param documentClass, class of the document requested.
110
     * @return the active document
111
     */
112 36443 cordinyana
    public Document getActiveDocument(Class<? extends Document> documentClass);
113 35191 jjdelcerro
114
    /**
115
     * Returns the window associated with the document passed as
116
     * parameter or null if there is no window associated with
117
     * the document.
118
     *
119
     * @param document to search the window
120
     * @return window associated to the document
121
     */
122
    public IDocumentWindow getDocumentWindow(Document document);
123
124
125
    /**
126
     * Return the root of the nodes of preferences in the application.
127
     *
128
     * @return the root of preferences.
129
     */
130
    PreferencesNode getPreferences();
131 31496 jjdelcerro
132 35191 jjdelcerro
    /**
133
     * Search and return the node of preferences required as nodeName.
134
     *
135
     * @param nodeName, name of the node to return
136
     * @return the preferences node requested
137
     */
138 31496 jjdelcerro
        PreferencesNode getPreferences(String nodeName);
139
140 35191 jjdelcerro
        /**
141
         * Return the arguments passed to the application in the command line
142
         *
143
         * @return arguments as a string array
144
         */
145
        public String[] getArguments();
146 31496 jjdelcerro
147 35191 jjdelcerro
        /**
148
         * Return the value of the argument passed in the command line by
149
         * the name indicated as the parameter. This is passed as:
150
         * <code>
151
         * application --name=value
152
         * </code>
153
         * @param name of the requested argument
154
         * @return value of the requested argument
155
         */
156
        public String getArgument(String name);
157 31496 jjdelcerro
158 35191 jjdelcerro
        /**
159
         * Get the value of the system clipboard as a string.
160
         *
161
         * @return the clipboard value
162
         */
163
        public String getFromClipboard();
164 31496 jjdelcerro
165 35191 jjdelcerro
        /**
166
         * Put the string value passed as parameter in the clipboard of
167
         * the system.
168
         *
169
         * @param data to put in the clipboard.
170
         */
171
        public void putInClipboard(String data) ;
172 26919 jmvivo
173 35191 jjdelcerro
        /**
174
         * Obtain the projection associated by the code of projection
175
         * Passed as parameter. If passed code of projection it not
176
         * a valid projection code null is returned.
177
         *
178
         * @param code of the projection requested
179
         * @return the requested projection or null
180
         */
181
    public IProjection getCRS(String code);
182
183
        /**
184
     * Utility method to obtain the DataManager used in the application at this moment.
185
     *
186
     * @return the DataManager
187
         */
188
        public DataManager getDataManager();
189
190
    /**
191
     * Utility method to obtain the ProjectManager used in the application at this moment.
192
     *
193
     * @return the ProjectManager
194
     */
195
    public ProjectManager getProjectManager();
196 26932 jmvivo
197 35191 jjdelcerro
    /**
198
     * Utility method to obtain the UIManager used in the application at this moment.
199
     *
200
     * @return the UIManager
201
     */
202
    public MDIManager getUIManager();
203
204
    /**
205
     * Utility method to obtain the GeometryManager used in the application at this moment.
206
     *
207
     * @return the GeometryManager
208
     */
209
    public GeometryManager getGeometryManager();
210
211
    /**
212
     * Utility method to obtain the PersistenceManager used in the application at this moment.
213
     *
214
     * @return the PersistenceManager
215
     */
216
    public PersistenceManager getPersistenceManager();
217
218
    /**
219
     * Utility method to obtain the DisposableManager used in the application at this moment.
220
     *
221
     * @return the DisposableManager
222
     */
223
    public DisposableManager getDisposableManager() ;
224 31496 jjdelcerro
225 35191 jjdelcerro
    /**
226
     * Utility method to obtain the DynObjectManager used in the application at this moment.
227
     *
228
     * @return the DynObjectManager
229
     */
230
    public DynObjectManager getDynObjectManager() ;
231 31496 jjdelcerro
232 35191 jjdelcerro
    /**
233
     * Utility method to obtain the ExtensionPointManager used in the application at this moment.
234
     *
235
     * @return the ExtensionPointManager
236
     */
237
    public ExtensionPointManager getExtensionPointManager();
238
239
    /**
240
     * Utility method to obtain the MapContextManager used in the application at this moment.
241
     *
242
     * @return the MapContextManager
243
     */
244
    public MapContextManager getMapContextManager();
245
246
    /**
247
     * Utility method to obtain the AboutManager used in the application at this moment.
248
     *
249
     * @return the AboutManager
250
     */
251
    public AboutManager getAbout();
252
253 36476 jjdelcerro
    public DataTypesManager getDataTypesManager();
254 35191 jjdelcerro
255
    /**
256
     * Utility method to obtain the IconThemeManager used in the application at this moment.
257
     *
258
     * @return the IconThemeManager
259
     */
260
    IconThemeManager getIconThemeManager();
261
262 29197 jmvivo
        void registerAddTableWizard(String name, String description,
263
                        Class<? extends WizardPanel> wpClass);
264
265
        List<WizardPanel> getWizardPanels() throws Exception;
266
267 31496 jjdelcerro
268
269
        void registerPrepareOpenDataStore(PrepareDataStore action);
270
        void registerPrepareOpenDataStoreParameters(        PrepareDataStoreParameters action);
271
        void registerPrepareOpenLayer(PrepareLayer action);
272
273 26919 jmvivo
        DataStore pepareOpenDataSource(DataStore store,
274 29197 jmvivo
                        PrepareContext context)
275
                        throws Exception;
276 26919 jmvivo
277
        DataStoreParameters prepareOpenDataStoreParameters(
278 29197 jmvivo
                        DataStoreParameters storeParameters, PrepareContext context)
279
                        throws Exception;
280 36767 nbrodin
281
        List<DataStoreParameters> prepareOpenDataStoreParameters(
282
                        List<DataStoreParameters> storeParameters, PrepareContext context)
283
                        throws Exception;
284 26932 jmvivo
285
        FLayer prepareOpenLayer(FLayer layer,
286 29197 jmvivo
                        PrepareContextView context)
287
                        throws Exception;
288 31496 jjdelcerro
289
290 38371 nbrodin
        public ColorTablesFactory getColorTablesFactory();
291 31496 jjdelcerro
292 38371 nbrodin
        public void registerColorTablesFactory(ColorTablesFactory factory);
293 35974 jjdelcerro
294
        public String getLocaleLanguage();
295 38242 jldominguez
296
    /**
297
     * Adds message to status bar
298
     * @param message
299
     * @param message_type One of: JOptionPane.ERROR_MESSAGE),
300
     * JOptionPane.WARNING_MESSAGE, JOptionPane.INFORMATION_MESSAGE
301
     */
302
    public void message(String message, int message_type);
303 31496 jjdelcerro
304 35191 jjdelcerro
305 26919 jmvivo
}