Statistics
| Revision:

svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.library / org.gvsig.exportto / org.gvsig.exportto.swing / org.gvsig.exportto.swing.impl / src / main / java / org / gvsig / exportto / swing / impl / wizard / ExportFilterWizard.java @ 43920

History | View | Annotate | Download (2.74 KB)

1
/**
2
 * gvSIG. Desktop Geographic Information System.
3
 *
4
 * Copyright (C) 2007-2013 gvSIG Association.
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 3
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
 * For any additional information, do not hesitate to contact us
22
 * at info AT gvsig.com, or visit our website www.gvsig.com.
23
 */
24
package org.gvsig.exportto.swing.impl.wizard;
25

    
26
import javax.swing.JPanel;
27

    
28
import org.gvsig.exportto.swing.impl.DefaultJExporttoServicePanel;
29
import org.gvsig.exportto.swing.impl.panel.ExportFilterPanel;
30
import org.gvsig.exportto.swing.spi.options.ExportOptions;
31
import org.gvsig.gui.beans.wizard.panel.NotContinueWizardException;
32
import org.gvsig.gui.beans.wizard.panel.OptionPanel;
33

    
34
/**
35
 * @author gvSIG Team
36
 * @version $Id$
37
 * 
38
 */
39
public class ExportFilterWizard extends ExportFilterPanel implements
40
    OptionPanel {
41

    
42
    private static final long serialVersionUID = 8801849211055890046L;
43
    private final DefaultJExporttoServicePanel exporttoServicePanel;
44
    private final ExportOptions options;
45

    
46
    public ExportFilterWizard(
47
            DefaultJExporttoServicePanel exporttoServicePanel,
48
            ExportOptions options
49
        ) {
50
        super(exporttoServicePanel);
51
        this.exporttoServicePanel = exporttoServicePanel;
52
        this.options = options;
53
    }
54

    
55
    @Override
56
    public String getPanelTitle() {
57
        return exporttoServicePanel.getExporttoSwingManager().getTranslation(
58
            "exportto_options");
59
    }
60

    
61
    @Override
62
    public void nextPanel() throws NotContinueWizardException {
63
        this.options.setFilter(this.getFilter());
64
        this.options.setFilterExpresion(this.getFilterExpresion());
65
        this.options.setFilterName(this.getFilterName());
66
        this.checkPanel();
67
    }
68

    
69
    @Override
70
    public void lastPanel() {
71
        exporttoServicePanel.setExportButtonEnabled(false);
72
        exporttoServicePanel.setNextButtonEnabled(true);
73
    }
74

    
75
    @Override
76
    public void updatePanel() {
77
        exporttoServicePanel.setExportButtonEnabled(true);
78
        exporttoServicePanel.setNextButtonEnabled(false);
79
    }
80

    
81
    @Override
82
    public JPanel getJPanel() {
83
        return this;
84
    }
85

    
86
}