Statistics
| Revision:

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 @ 34981

History | View | Annotate | Download (2.83 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);
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);
62
        return panel;
63
    }
64

    
65
    public ExporttoManager getManager() {
66
        return this.manager;
67
    }
68

    
69
    public String getTranslation(String key) {
70
        return Messages.getText(key);
71
    }
72

    
73
    public void registerWindowManager(ExporttoWindowManager manager) {
74
        this.windowManager = manager;
75
    }
76

    
77
    public ExporttoWindowManager getWindowManager() {
78
        return this.windowManager;
79
    }
80
}