Statistics
| Revision:

root / trunk / extensions / extCatalogYNomenclator / src / es / gva / cit / gvsig / catalogClient / gui / ShowResultsDialog.java @ 4346

History | View | Annotate | Download (3.63 KB)

1
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
2
 *
3
 * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
4
 *
5
 * This program is free software; you can redistribute it and/or
6
 * modify it under the terms of the GNU General Public License
7
 * as published by the Free Software Foundation; either version 2
8
 * of the License, or (at your option) any later version.
9
 *
10
 * This program is distributed in the hope that it will be useful,
11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 * GNU General Public License for more details.
14
 *
15
 * You should have received a copy of the GNU General Public License
16
 * along with this program; if not, write to the Free Software
17
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
18
 *
19
 * For more information, contact:
20
 *
21
 *  Generalitat Valenciana
22
 *   Conselleria d'Infraestructures i Transport
23
 *   Av. Blasco Ib??ez, 50
24
 *   46010 VALENCIA
25
 *   SPAIN
26
 *
27
 *      +34 963862235
28
 *   gvsig@gva.es
29
 *      www.gvsig.gva.es
30
 *
31
 *    or
32
 *
33
 *   IVER T.I. S.A
34
 *   Salamanca 50
35
 *   46005 Valencia
36
 *   Spain
37
 *
38
 *   +34 963163400
39
 *   dac@iver.es
40
 */
41
package es.gva.cit.gvsig.catalogClient.gui;
42

    
43
import java.util.Collection;
44

    
45
import javax.swing.JDialog;
46

    
47
import com.iver.andami.PluginServices;
48
import com.iver.andami.ui.mdiManager.View;
49
import com.iver.andami.ui.mdiManager.ViewInfo;
50

    
51
import es.gva.cit.catalogClient.CatalogClient;
52
import es.gva.cit.catalogClient.metadataXML.XMLNode;
53
import es.gva.cit.catalogClient.schemas.discoverer.Resource;
54
import es.gva.cit.catalogClient.ui.showResults.ShowResultsDialogPanel;
55
import es.gva.cit.gvsig.catalogClient.translation.AndamiTranslation;
56

    
57

    
58
/**
59
 * DOCUMENT ME!
60
 *
61
 * @author luisw
62
 */
63
public class ShowResultsDialog extends ShowResultsDialogPanel implements View {
64
    private JDialog frame = null;
65
    /**
66
     * DOCUMENT ME!
67
     *
68
     * @param client
69
     * @param nodes
70
     * @param currentRecord
71
     */
72
    public ShowResultsDialog(JDialog frame,CatalogClient client, Collection nodes,
73
        int currentRecord) {
74
        super(client, nodes, currentRecord, new AndamiTranslation());
75
        this.frame = frame;
76
    }
77

    
78
    /**
79
     * DOCUMENT ME!
80
     */
81
    public void descriptionButtonActionPerformed() {
82
        ShowTreeDialog dialog = new ShowTreeDialog((XMLNode)nodes.toArray()[getCurrentNode()]);
83
        dialog.setBounds(0, 0, 796, 645);
84
      dialog.setName(PluginServices.getText(this, "metadata_tree"));
85
        dialog.setVisible(true);
86
        PluginServices.getMDIManager().addView(dialog);
87
    }
88

    
89
    /**
90
     * DOCUMENT ME!
91
     */
92
    public void mapButtonActionPerformed() {
93
        Resource[] resources = controlsPanel.getTags().getResources();
94
        Collection col = new java.util.ArrayList();
95
        for (int i=0 ; i<resources.length ;i++){
96
            col.add(resources[i]);
97
        }
98
        ChooseResourceDialog dialog = new ChooseResourceDialog(col);
99
        dialog.setBounds(0, 0, 586, 145);
100
        dialog.setName(PluginServices.getText(this, "Recursos Disponibles"));
101
        dialog.setVisible(true);
102
        PluginServices.getMDIManager().addView(dialog);
103
    }
104

    
105
    /**
106
     * DOCUMENT ME!
107
     */
108
    public void closeButtonActionPerformed() {
109
        closeJDialog();
110
    }
111

    
112
    /**
113
     * Cierra el Dialog
114
     */
115
    public void closeJDialog() {
116
        frame.setVisible(false);
117
    }
118

    
119
    /* (non-Javadoc)
120
     * @see com.iver.andami.ui.mdiManager.View#getViewInfo()
121
     */
122
    public ViewInfo getViewInfo() {
123
        ViewInfo m_viewinfo = new ViewInfo(ViewInfo.MODALDIALOG);
124
        m_viewinfo.setTitle(getName());
125

    
126
        return m_viewinfo;
127
    }
128
}