Revision 6076
trunk/extensions/extCatalogYNomenclator/src/es/gva/cit/gvsig/catalogClient/gui/ShowTreeDialog.java | ||
---|---|---|
40 | 40 |
*/ |
41 | 41 |
package es.gva.cit.gvsig.catalogClient.gui; |
42 | 42 |
|
43 |
import javax.swing.JDialog; |
|
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; |
... | ... | |
55 | 57 |
* go to Window - Preferences - Java - Code Style - Code Templates |
56 | 58 |
*/ |
57 | 59 |
public class ShowTreeDialog extends ShowTreeDialogPanel implements View { |
58 |
/** |
|
60 |
private JDialog frame = null; |
|
61 |
/** |
|
59 | 62 |
* DOCUMENT ME! |
60 | 63 |
* |
61 | 64 |
* @param node |
62 | 65 |
*/ |
63 |
public ShowTreeDialog(XMLNode node) { |
|
66 |
public ShowTreeDialog(JDialog frame,XMLNode node) {
|
|
64 | 67 |
super(node); |
65 |
|
|
68 |
this.frame = frame; |
|
66 | 69 |
//8 --> Modal window |
67 | 70 |
PluginServices.getMDIManager().getViewInfo(this).setViewInfo(new ViewInfo( |
68 | 71 |
8)); |
... | ... | |
79 | 82 |
* DOCUMENT ME! |
80 | 83 |
*/ |
81 | 84 |
public void closeJDialog() { |
82 |
setVisible(true); |
|
83 |
PluginServices.getMDIManager().closeView(ShowTreeDialog.this); |
|
85 |
frame.setVisible(false); |
|
84 | 86 |
} |
85 | 87 |
|
86 | 88 |
/** |
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.awt.Frame; |
|
43 | 44 |
import java.util.Collection; |
44 | 45 |
|
45 | 46 |
import javax.swing.JDialog; |
... | ... | |
54 | 55 |
import es.gva.cit.catalogClient.metadataXML.XMLNode; |
55 | 56 |
import es.gva.cit.catalogClient.schemas.discoverer.Resource; |
56 | 57 |
import es.gva.cit.catalogClient.ui.showResults.ShowResultsDialogPanel; |
58 |
import es.gva.cit.catalogClient.utils.Frames; |
|
57 | 59 |
|
58 | 60 |
|
59 | 61 |
/** |
... | ... | |
80 | 82 |
* DOCUMENT ME! |
81 | 83 |
*/ |
82 | 84 |
public void descriptionButtonActionPerformed() { |
83 |
ShowTreeDialog dialog = new ShowTreeDialog((XMLNode)nodes.toArray()[getCurrentNode()]); |
|
84 |
dialog.setBounds(0, 0, 796, 645); |
|
85 |
dialog.setName(Messages.getText("metadata_tree")); |
|
86 |
dialog.setVisible(true); |
|
87 |
PluginServices.getMDIManager().addView(dialog); |
|
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); |
|
88 | 97 |
} |
89 | 98 |
|
90 | 99 |
/** |
Also available in: Unified diff