Statistics
| Revision:

svn-gvsig-desktop / 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 @ 35745

History | View | Annotate | Download (3.19 KB)

1
/* 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
    private ExporttoManager manager;
43
    // private I18nManager i18nmanager = null;
44
    private ExporttoWindowManager windowManager;
45

    
46
    public DefaultExporttoSwingManager() {
47
        this.manager = ExporttoLocator.getManager();
48
        // this.i18nmanager = ToolsLocator.getI18nManager();
49
        this.windowManager = new DefaultExporttoWindowManager();
50
    }
51

    
52
    public JExporttoServicePanel createExportto(FeatureStore featureStore, IProjection projection){
53
        JExporttoServicePanel panel =
54
            new DefaultJExporttoServicePanel(this, featureStore, projection, null, new int[0]);
55
        return panel;
56
    }
57
    
58
    public JExporttoServicePanel createExportto(FeatureStore featureStore, IProjection projection, 
59
        ExporttoServiceFinishAction exporttoServiceFinishAction){
60
        JExporttoServicePanel panel =
61
            new DefaultJExporttoServicePanel(this, featureStore, projection, exporttoServiceFinishAction, new int[0]);
62
        return panel;
63
    }
64
    
65
    public JExporttoServicePanel createExportto(FeatureStore featureStore,
66
        IProjection projection,
67
        ExporttoServiceFinishAction exporttoServiceFinishAction,
68
        int[] providerTypes) {
69
        return new DefaultJExporttoServicePanel(this, featureStore, projection, exporttoServiceFinishAction, providerTypes);
70
    }
71

    
72
    public ExporttoManager getManager() {
73
        return this.manager;
74
    }
75

    
76
    public String getTranslation(String key) {
77
        return Messages.getText(key);
78
    }
79

    
80
    public void registerWindowManager(ExporttoWindowManager manager) {
81
        this.windowManager = manager;
82
    }
83

    
84
    public ExporttoWindowManager getWindowManager() {
85
        return this.windowManager;
86
    }
87
}