Statistics
| Revision:

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

History | View | Annotate | Download (3.85 KB)

1 2819 jorpiell
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
2 3361 jorpiell
 *
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 2026 luisw
package es.gva.cit.gvsig.catalogClient.gui;
42
43 6076 jorpiell
import java.awt.Frame;
44 3567 jorpiell
import java.util.Collection;
45
46 3613 jorpiell
import javax.swing.JDialog;
47
48 4713 cesar
import org.gvsig.i18n.Messages;
49
50 2026 luisw
import com.iver.andami.PluginServices;
51 6877 cesar
import com.iver.andami.ui.mdiManager.IWindow;
52 2026 luisw
import com.iver.andami.ui.mdiManager.ViewInfo;
53
54
import es.gva.cit.catalogClient.CatalogClient;
55 3073 jorpiell
import es.gva.cit.catalogClient.metadataXML.XMLNode;
56 3567 jorpiell
import es.gva.cit.catalogClient.schemas.discoverer.Resource;
57 3224 jorpiell
import es.gva.cit.catalogClient.ui.showResults.ShowResultsDialogPanel;
58 6076 jorpiell
import es.gva.cit.catalogClient.utils.Frames;
59 2026 luisw
60 2819 jorpiell
61 2026 luisw
/**
62 3361 jorpiell
 * DOCUMENT ME!
63
 *
64 2026 luisw
 * @author luisw
65
 */
66 6877 cesar
public class ShowResultsDialog extends ShowResultsDialogPanel implements IWindow {
67 3613 jorpiell
    private JDialog frame = null;
68 3361 jorpiell
    /**
69
     * DOCUMENT ME!
70
     *
71
     * @param client
72
     * @param nodes
73
     * @param currentRecord
74
     */
75 3613 jorpiell
    public ShowResultsDialog(JDialog frame,CatalogClient client, Collection nodes,
76 3361 jorpiell
        int currentRecord) {
77 4713 cesar
        super(client, nodes, currentRecord);
78 3613 jorpiell
        this.frame = frame;
79 3361 jorpiell
    }
80 2026 luisw
81 3361 jorpiell
    /**
82
     * DOCUMENT ME!
83
     */
84
    public void descriptionButtonActionPerformed() {
85 6076 jorpiell
        JDialog panel = new JDialog((Frame) PluginServices.getMainFrame(), false);
86
        Frames.centerFrame(panel, 796, 675);
87
        //panel.setBounds(0, 0, 796, 675);
88
        panel.setTitle(Messages.getText("metadata_tree"));
89
        panel.setResizable(false);
90
91
        ShowTreeDialog dialog = new ShowTreeDialog(panel,(XMLNode)nodes.toArray()[getCurrentNode()]);
92
93
        panel.getContentPane().add(dialog);
94
        panel.show();
95
96
//        PluginServices.getMDIManager().addView(dialog);
97 3361 jorpiell
    }
98
99
    /**
100
     * DOCUMENT ME!
101
     */
102
    public void mapButtonActionPerformed() {
103 3567 jorpiell
        Resource[] resources = controlsPanel.getTags().getResources();
104
        Collection col = new java.util.ArrayList();
105
        for (int i=0 ; i<resources.length ;i++){
106
            col.add(resources[i]);
107
        }
108
        ChooseResourceDialog dialog = new ChooseResourceDialog(col);
109 4346 jorpiell
        dialog.setBounds(0, 0, 586, 145);
110 4713 cesar
        dialog.setName(Messages.getText("Recursos Disponibles"));
111 3361 jorpiell
        dialog.setVisible(true);
112
        PluginServices.getMDIManager().addView(dialog);
113
    }
114
115
    /**
116
     * DOCUMENT ME!
117
     */
118
    public void closeButtonActionPerformed() {
119
        closeJDialog();
120
    }
121
122
    /**
123
     * Cierra el Dialog
124
     */
125
    public void closeJDialog() {
126 3613 jorpiell
        frame.setVisible(false);
127 3361 jorpiell
    }
128
129
    /* (non-Javadoc)
130
     * @see com.iver.andami.ui.mdiManager.View#getViewInfo()
131
     */
132
    public ViewInfo getViewInfo() {
133
        ViewInfo m_viewinfo = new ViewInfo(ViewInfo.MODALDIALOG);
134
        m_viewinfo.setTitle(getName());
135
136
        return m_viewinfo;
137
    }
138 2026 luisw
}