Statistics
| Revision:

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

History | View | Annotate | Download (3.85 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.awt.Frame;
44
import java.util.Collection;
45

    
46
import javax.swing.JDialog;
47

    
48
import org.gvsig.i18n.Messages;
49

    
50
import com.iver.andami.PluginServices;
51
import com.iver.andami.ui.mdiManager.IWindow;
52
import com.iver.andami.ui.mdiManager.ViewInfo;
53

    
54
import es.gva.cit.catalogClient.CatalogClient;
55
import es.gva.cit.catalogClient.metadataXML.XMLNode;
56
import es.gva.cit.catalogClient.schemas.discoverer.Resource;
57
import es.gva.cit.catalogClient.ui.showResults.ShowResultsDialogPanel;
58
import es.gva.cit.catalogClient.utils.Frames;
59

    
60

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

    
81
    /**
82
     * DOCUMENT ME!
83
     */
84
    public void descriptionButtonActionPerformed() {
85
        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
    }
98

    
99
    /**
100
     * DOCUMENT ME!
101
     */
102
    public void mapButtonActionPerformed() {
103
        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
        dialog.setBounds(0, 0, 586, 145);
110
        dialog.setName(Messages.getText("Recursos Disponibles"));
111
        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
        frame.setVisible(false);
127
    }
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
}