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 40559 jjdelcerro
/**
2
 * gvSIG. Desktop Geographic Information System.
3 40435 jjdelcerro
 *
4 40559 jjdelcerro
 * Copyright (C) 2007-2013 gvSIG Association.
5 40435 jjdelcerro
 *
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 40559 jjdelcerro
 * as published by the Free Software Foundation; either version 3
9 40435 jjdelcerro
 * 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 40559 jjdelcerro
 * For any additional information, do not hesitate to contact us
22
 * at info AT gvsig.com, or visit our website www.gvsig.com.
23 40435 jjdelcerro
 */
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 43920 jjdelcerro
import org.gvsig.exportto.swing.spi.options.ExportOptions;
31 40435 jjdelcerro
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 43920 jjdelcerro
    private final DefaultJExporttoServicePanel exporttoServicePanel;
44
    private final ExportOptions options;
45 40435 jjdelcerro
46 43920 jjdelcerro
    public ExportFilterWizard(
47
            DefaultJExporttoServicePanel exporttoServicePanel,
48
            ExportOptions options
49
        ) {
50 40435 jjdelcerro
        super(exporttoServicePanel);
51 41540 jjdelcerro
        this.exporttoServicePanel = exporttoServicePanel;
52 43920 jjdelcerro
        this.options = options;
53 40435 jjdelcerro
    }
54
55 43920 jjdelcerro
    @Override
56 40435 jjdelcerro
    public String getPanelTitle() {
57
        return exporttoServicePanel.getExporttoSwingManager().getTranslation(
58
            "exportto_options");
59
    }
60
61 43920 jjdelcerro
    @Override
62 40435 jjdelcerro
    public void nextPanel() throws NotContinueWizardException {
63 43920 jjdelcerro
        this.options.setFilter(this.getFilter());
64
        this.options.setFilterExpresion(this.getFilterExpresion());
65
        this.options.setFilterName(this.getFilterName());
66 41540 jjdelcerro
        this.checkPanel();
67 40435 jjdelcerro
    }
68
69 43920 jjdelcerro
    @Override
70 40435 jjdelcerro
    public void lastPanel() {
71
        exporttoServicePanel.setExportButtonEnabled(false);
72
        exporttoServicePanel.setNextButtonEnabled(true);
73
    }
74
75 43920 jjdelcerro
    @Override
76 40435 jjdelcerro
    public void updatePanel() {
77
        exporttoServicePanel.setExportButtonEnabled(true);
78
        exporttoServicePanel.setNextButtonEnabled(false);
79
    }
80
81 43920 jjdelcerro
    @Override
82 40435 jjdelcerro
    public JPanel getJPanel() {
83
        return this;
84
    }
85
86
}