Revision 3567
trunk/extensions/extCatalogYNomenclator/src/es/gva/cit/gvsig/catalogClient/gui/ChooseResourceDialog.java | ||
---|---|---|
41 | 41 |
package es.gva.cit.gvsig.catalogClient.gui; |
42 | 42 |
|
43 | 43 |
import java.io.IOException; |
44 |
import java.util.Collection; |
|
44 | 45 |
|
45 | 46 |
import javax.swing.JOptionPane; |
46 | 47 |
|
... | ... | |
49 | 50 |
import com.iver.andami.ui.mdiManager.View; |
50 | 51 |
import com.iver.andami.ui.mdiManager.ViewInfo; |
51 | 52 |
|
52 |
import es.gva.cit.catalogClient.parsers.Resource;
|
|
53 |
import es.gva.cit.catalogClient.schemas.discoverer.Resource;
|
|
53 | 54 |
import es.gva.cit.catalogClient.ui.chooseResource.ChooseResourceDialogPanel; |
54 | 55 |
import es.gva.cit.gvsig.catalogClient.loaders.PostgisLoader; |
55 | 56 |
import es.gva.cit.gvsig.catalogClient.loaders.WCSLoader; |
... | ... | |
69 | 70 |
* @param resources |
70 | 71 |
* Found resources array |
71 | 72 |
*/ |
72 |
public ChooseResourceDialog(Resource[] resources) {
|
|
73 |
public ChooseResourceDialog(Collection resources) {
|
|
73 | 74 |
super(resources,new AndamiTranslation()); |
74 | 75 |
} |
75 | 76 |
|
trunk/extensions/extCatalogYNomenclator/src/es/gva/cit/gvsig/catalogClient/gui/ShowResultsDialog.java | ||
---|---|---|
40 | 40 |
*/ |
41 | 41 |
package es.gva.cit.gvsig.catalogClient.gui; |
42 | 42 |
|
43 |
import java.util.Collection; |
|
44 |
|
|
43 | 45 |
import com.iver.andami.PluginServices; |
44 | 46 |
import com.iver.andami.ui.mdiManager.View; |
45 | 47 |
import com.iver.andami.ui.mdiManager.ViewInfo; |
46 | 48 |
|
47 | 49 |
import es.gva.cit.catalogClient.CatalogClient; |
48 | 50 |
import es.gva.cit.catalogClient.metadataXML.XMLNode; |
49 |
import es.gva.cit.catalogClient.parsers.Resource;
|
|
51 |
import es.gva.cit.catalogClient.schemas.discoverer.Resource;
|
|
50 | 52 |
import es.gva.cit.catalogClient.ui.showResults.ShowResultsDialogPanel; |
51 | 53 |
import es.gva.cit.gvsig.catalogClient.translation.AndamiTranslation; |
52 | 54 |
|
... | ... | |
64 | 66 |
* @param nodes |
65 | 67 |
* @param currentRecord |
66 | 68 |
*/ |
67 |
public ShowResultsDialog(CatalogClient client, XMLNode[] nodes,
|
|
69 |
public ShowResultsDialog(CatalogClient client, Collection nodes,
|
|
68 | 70 |
int currentRecord) { |
69 | 71 |
super(client, nodes, currentRecord, new AndamiTranslation()); |
70 | 72 |
} |
... | ... | |
73 | 75 |
* DOCUMENT ME! |
74 | 76 |
*/ |
75 | 77 |
public void descriptionButtonActionPerformed() { |
76 |
ShowTreeDialog dialog = new ShowTreeDialog(nodes[getCurrentNode()]);
|
|
78 |
ShowTreeDialog dialog = new ShowTreeDialog((XMLNode)nodes.toArray()[getCurrentNode()]);
|
|
77 | 79 |
dialog.setBounds(0, 0, 800, 645); |
78 | 80 |
dialog.setName(PluginServices.getText(this, "metadata_tree")); |
79 | 81 |
dialog.setVisible(true); |
... | ... | |
84 | 86 |
* DOCUMENT ME! |
85 | 87 |
*/ |
86 | 88 |
public void mapButtonActionPerformed() { |
87 |
Resource[] resources = ppalPanel.getTags().getResources(); |
|
88 |
ChooseResourceDialog dialog = new ChooseResourceDialog(resources); |
|
89 |
Resource[] resources = controlsPanel.getTags().getResources(); |
|
90 |
Collection col = new java.util.ArrayList(); |
|
91 |
for (int i=0 ; i<resources.length ;i++){ |
|
92 |
col.add(resources[i]); |
|
93 |
} |
|
94 |
ChooseResourceDialog dialog = new ChooseResourceDialog(col); |
|
89 | 95 |
dialog.setBounds(0, 0, 600, 145); |
90 | 96 |
dialog.setName(PluginServices.getText(this, "Recursos Disponibles")); |
91 | 97 |
dialog.setVisible(true); |
trunk/extensions/extCatalogYNomenclator/src/es/gva/cit/gvsig/catalogClient/gui/SearchDialog.java | ||
---|---|---|
43 | 43 |
import java.awt.event.MouseEvent; |
44 | 44 |
import java.awt.event.MouseListener; |
45 | 45 |
import java.awt.geom.Rectangle2D; |
46 |
import java.util.Collection; |
|
46 | 47 |
|
47 | 48 |
import javax.swing.JDialog; |
48 | 49 |
|
... | ... | |
75 | 76 |
|
76 | 77 |
/** |
77 | 78 |
* This method opens the show results frame. |
78 |
* @param nodesRecords
|
|
79 |
* @param nodes |
|
79 | 80 |
* XML node returned by the query |
80 | 81 |
*/ |
81 |
public void showResults(XMLNode[] nodesRecords) {
|
|
82 |
public void showResults(Collection nodes) {
|
|
82 | 83 |
ShowResultsPanel.mustShowThumbnails = true; |
83 | 84 |
ShowResultsDialog dialog = |
84 |
new ShowResultsDialog(client,nodesRecords,1);
|
|
85 |
new ShowResultsDialog(client,nodes,1); |
|
85 | 86 |
dialog.setBounds(0, 0, 625, 390); |
86 | 87 |
dialog.setName(PluginServices.getText(this, "search_results")+":"); |
87 | 88 |
dialog.setVisible(true); |
... | ... | |
112 | 113 |
*/ |
113 | 114 |
public void searchButtonActionPerformed() { |
114 | 115 |
doSearch(); |
115 |
if (nodesRecords != null && nodesRecords.length > 1) {
|
|
116 |
showResults(nodesRecords);
|
|
116 |
if (nodes != null && nodes.size() > 1) {
|
|
117 |
showResults(nodes); |
|
117 | 118 |
} |
118 | 119 |
} |
119 | 120 |
|
Also available in: Unified diff