Revision 10626 trunk/applications/appgvSIG/src/com/iver/cit/gvsig/project/documents/view/ProjectViewBase.java

View differences:

ProjectViewBase.java
2 2

  
3 3
import java.awt.Color;
4 4
import java.awt.Component;
5
import java.awt.Dimension;
5 6
import java.util.ArrayList;
6 7
import java.util.List;
7 8

  
8 9
import javax.swing.JOptionPane;
10
import javax.swing.JPanel;
11
import javax.swing.JScrollPane;
12
import javax.swing.JSplitPane;
9 13

  
10 14
import org.cresques.cts.IProjection;
15
import org.gvsig.exceptions.BaseException;
11 16

  
17
import com.hardcode.gdbms.driver.exceptions.ReadDriverException;
12 18
import com.iver.andami.PluginServices;
13 19
import com.iver.andami.ui.mdiManager.IWindow;
14 20
import com.iver.andami.ui.mdiManager.WindowInfo;
15 21
import com.iver.cit.gvsig.ProjectExtension;
16
import com.iver.cit.gvsig.fmap.DriverException;
17 22
import com.iver.cit.gvsig.fmap.ErrorEvent;
18 23
import com.iver.cit.gvsig.fmap.ErrorListener;
19 24
import com.iver.cit.gvsig.fmap.MapContext;
......
82 87
	}
83 88

  
84 89
	public void setXMLEntity(XMLEntity xml, Project p) throws XMLException,
85
			DriverException, DriverIOException, OpenException {	}
90
			 OpenException {	}
86 91

  
87
	public void setXMLEntity03(XMLEntity xml, Project p) throws XMLException,
88
			DriverException, DriverIOException { }
92
	public void setXMLEntity03(XMLEntity xml, Project p) throws XMLException
93
			{ }
89 94

  
90 95
	public void showErrors(){
91 96
		if (mapContext.getLayersError().size()>0){
......
105 110
	 */
106 111
	public void reportDriverExceptions(String introductoryText, List driverExceptions) {
107 112
		//TODO INTERNACIONALIZAR
108
		HtmlWindow htmlPanel = new HtmlWindow(570, 450, "Excepciones de driver");
113
		HtmlWindow htmlPanel = new HtmlWindow(570, 600, "Excepciones de driver");
109 114
		String htmlText = "";
110 115
		if(introductoryText == null){
111
			htmlText += "<p>Se han producido los siguientes errores durante la carga de capas.</p>";
116
			htmlText += "<h2 text=\"#000080\">Se han producido los siguientes errores durante la carga de capas.</h2>";
112 117
		}else{
113 118
			htmlText += introductoryText;
114 119
		}
115 120
		int numErrors = driverExceptions.size();
116 121
		for(int i = 0; i < numErrors; i++){
117
			htmlText += "<br>\n";
118
			DriverException exception = (DriverException) driverExceptions.get(i);
119
			htmlText += exception.getExceptionType().getHtmlErrorMessage();
122
			//htmlText += "<br>\n";
123
			BaseException exception = (BaseException) driverExceptions.get(i);
124
			htmlText += "<h3>"+exception.getMessageKey()+"</h3>";
125
			htmlText += "<p>"+exception.getMessage()+"</p>";
126
			htmlText +="<p text=\"#550080\">----------------------------------------------------------------------------</p>";
120 127
		}
128

  
121 129
		System.out.println(htmlText);
122 130
		htmlPanel.show(htmlText);
123 131

  
......
130 138
	 * @author azabala
131 139
	 *
132 140
	 */
133
	class HtmlWindow extends HTMLInfoToolPanel implements IWindow {
141
	class HtmlWindow extends JPanel implements IWindow {
142
		private HTMLInfoToolPanel htmlPanel=new HTMLInfoToolPanel();
134 143
		WindowInfo viewInfo = null;
135 144
		public HtmlWindow(int width, int height, String windowTitle){
145
			JScrollPane scrollPane=new JScrollPane(htmlPanel);
146
			scrollPane.setPreferredSize(new Dimension(width-30,height-30));
147
			this.add(scrollPane);
136 148
			viewInfo = new WindowInfo(WindowInfo.MODELESSDIALOG);
137 149
			viewInfo.setTitle(windowTitle);
138 150
			viewInfo.setWidth(width);
139 151
			viewInfo.setHeight(height);
140 152
		}
141 153

  
154
		public void show(String htmlText) {
155
			htmlPanel.show(htmlText);
156
		}
157

  
142 158
		public WindowInfo getWindowInfo() {
143 159
			return viewInfo;
144 160
		}

Also available in: Unified diff