root / branches / v2_0_0_prep / libraries / org.gvsig.exportto / org.gvsig.exportto.swing / org.gvsig.exportto.swing.impl / src / main / java / org / gvsig / exportto / swing / impl / DefaultExporttoSwingManager.java @ 38608
History | View | Annotate | Download (3.24 KB)
1 | 34981 | jpiera | /* 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 | package org.gvsig.exportto.swing.impl; |
||
23 | |||
24 | import org.cresques.cts.IProjection; |
||
25 | |||
26 | import org.gvsig.exportto.ExporttoLocator; |
||
27 | import org.gvsig.exportto.ExporttoManager; |
||
28 | import org.gvsig.exportto.ExporttoServiceFinishAction; |
||
29 | import org.gvsig.exportto.swing.ExporttoSwingManager; |
||
30 | import org.gvsig.exportto.swing.ExporttoWindowManager; |
||
31 | import org.gvsig.exportto.swing.JExporttoServicePanel; |
||
32 | import org.gvsig.fmap.dal.feature.FeatureStore; |
||
33 | import org.gvsig.i18n.Messages; |
||
34 | |||
35 | /**
|
||
36 | * Default implementation of the {@link ExporttoSwingManager}.
|
||
37 | *
|
||
38 | * @author gvSIG Team
|
||
39 | * @version $Id$
|
||
40 | */
|
||
41 | public class DefaultExporttoSwingManager implements ExporttoSwingManager { |
||
42 | 37780 | cordinyana | |
43 | 34981 | jpiera | private ExporttoManager manager;
|
44 | // private I18nManager i18nmanager = null;
|
||
45 | private ExporttoWindowManager windowManager;
|
||
46 | |||
47 | public DefaultExporttoSwingManager() {
|
||
48 | this.manager = ExporttoLocator.getManager();
|
||
49 | // this.i18nmanager = ToolsLocator.getI18nManager();
|
||
50 | this.windowManager = new DefaultExporttoWindowManager(); |
||
51 | } |
||
52 | |||
53 | 37780 | cordinyana | public JExporttoServicePanel createExportto(FeatureStore featureStore,
|
54 | IProjection projection) { |
||
55 | 34981 | jpiera | JExporttoServicePanel panel = |
56 | 37780 | cordinyana | new DefaultJExporttoServicePanel(this, featureStore, projection, |
57 | null, new int[0]); |
||
58 | 34981 | jpiera | return panel;
|
59 | } |
||
60 | 37780 | cordinyana | |
61 | public JExporttoServicePanel createExportto(FeatureStore featureStore,
|
||
62 | IProjection projection, |
||
63 | ExporttoServiceFinishAction exporttoServiceFinishAction) { |
||
64 | 34981 | jpiera | JExporttoServicePanel panel = |
65 | 37780 | cordinyana | new DefaultJExporttoServicePanel(this, featureStore, projection, |
66 | exporttoServiceFinishAction, new int[0]); |
||
67 | 34981 | jpiera | return panel;
|
68 | } |
||
69 | 37780 | cordinyana | |
70 | 35745 | jpiera | public JExporttoServicePanel createExportto(FeatureStore featureStore,
|
71 | IProjection projection, |
||
72 | ExporttoServiceFinishAction exporttoServiceFinishAction, |
||
73 | int[] providerTypes) { |
||
74 | 37780 | cordinyana | return new DefaultJExporttoServicePanel(this, featureStore, projection, |
75 | exporttoServiceFinishAction, providerTypes); |
||
76 | 35745 | jpiera | } |
77 | 34981 | jpiera | |
78 | public ExporttoManager getManager() {
|
||
79 | return this.manager; |
||
80 | } |
||
81 | |||
82 | public String getTranslation(String key) { |
||
83 | return Messages.getText(key);
|
||
84 | } |
||
85 | |||
86 | public void registerWindowManager(ExporttoWindowManager manager) { |
||
87 | this.windowManager = manager;
|
||
88 | } |
||
89 | |||
90 | public ExporttoWindowManager getWindowManager() {
|
||
91 | return this.windowManager; |
||
92 | } |
||
93 | } |