Revision 10626 trunk/extensions/extCatalogYNomenclator/src/es/gva/cit/gvsig/catalogClient/gui/ChooseResourceDialog.java

View differences:

ChooseResourceDialog.java
50 50
import com.iver.andami.PluginServices;
51 51
import com.iver.andami.ui.mdiManager.IWindow;
52 52
import com.iver.andami.ui.mdiManager.WindowInfo;
53
import com.iver.cit.gvsig.exceptions.layers.LoadLayerException;
53 54

  
54 55
import es.gva.cit.catalogClient.schemas.discoverer.Resource;
55 56
import es.gva.cit.catalogClient.ui.chooseResource.ChooseResourceDialogPanel;
56 57
import es.gva.cit.gvsig.catalogClient.loaders.LayerLoader;
57
import es.gva.cit.gvsig.catalogClient.loaders.LayerLoaderException;
58 58

  
59 59
/**
60 60
 * This class implements the resources list view.
61
 * 
61
 *
62 62
 * @author Jorge Piera Llodra (piera_jor@gva.es)
63 63
 */
64 64
public class ChooseResourceDialog extends ChooseResourceDialogPanel
65 65
implements IWindow {
66
	
66

  
67 67
	/**
68 68
	 * @param resources
69 69
	 * Found resources array
70 70
	 */
71 71
	public ChooseResourceDialog(Collection resources) {
72 72
		super(resources);
73
	}   
74
	
73
	}
74

  
75 75
	public WindowInfo getWindowInfo() {
76 76
		WindowInfo m_viewinfo = new WindowInfo(WindowInfo.MODALDIALOG);
77 77
		m_viewinfo.setTitle(getName());
78 78
		return m_viewinfo;
79 79
	}
80
	
80

  
81 81
	public void closeButtonActionPerformed() {
82 82
		closeJDialog();
83 83
	}
84
	
84

  
85 85
	public void closeJDialog() {
86 86
		setVisible(true);
87 87
		PluginServices.getMDIManager().closeWindow(ChooseResourceDialog.this);
88 88
	}
89
	
89

  
90 90
	/**
91 91
	 * This method is invocated when a resource button is clicked
92 92
	 */
......
99 99
			} else {
100 100
				JOptionPane.showMessageDialog(this,
101 101
						Messages.getText("pluginNotFound") ,
102
						Messages.getText("pluginNotFoundTitle"),			
103
						JOptionPane.INFORMATION_MESSAGE);	
102
						Messages.getText("pluginNotFoundTitle"),
103
						JOptionPane.INFORMATION_MESSAGE);
104 104
				return;
105 105
			}
106
			
106

  
107 107
		} catch (IllegalArgumentException e) {
108 108
			// TODO Auto-generated catch block
109 109
			e.printStackTrace();
......
122 122
		} catch (NoSuchMethodException e) {
123 123
			// TODO Auto-generated catch block
124 124
			e.printStackTrace();
125
		} catch (LayerLoaderException e) {
125
		} catch (LoadLayerException e) {
126 126
			JOptionPane.showMessageDialog(this,
127
					e.getMessage(),
128
					e.getWindowMessage(),			
129
					JOptionPane.ERROR_MESSAGE);	
130
		}		
127
					e.getMessage(),	e.getMessageKey(),
128
					JOptionPane.ERROR_MESSAGE);
129
		}
131 130
		closeJDialog();
132
	}   
131
	}
133 132
}
134 133

  
135 134

  

Also available in: Unified diff