Revision 10627 trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/MapContext.java

View differences:

MapContext.java
56 56
import org.cresques.cts.IProjection;
57 57
import org.cresques.geo.Projected;
58 58

  
59
import com.hardcode.gdbms.driver.exceptions.ReadDriverException;
60
import com.hardcode.gdbms.engine.data.driver.DriverException;
61
import com.iver.cit.gvsig.exceptions.expansionfile.ExpansionFileReadException;
62
import com.iver.cit.gvsig.exceptions.visitors.VisitorException;
59 63
import com.iver.cit.gvsig.fmap.core.IGeometry;
60 64
import com.iver.cit.gvsig.fmap.core.symbols.ISymbol;
61
import com.iver.cit.gvsig.fmap.core.v02.FConstant;
62 65
import com.iver.cit.gvsig.fmap.layers.CancelationException;
63 66
import com.iver.cit.gvsig.fmap.layers.FLayer;
64 67
import com.iver.cit.gvsig.fmap.layers.FLayers;
......
77 80
import com.iver.cit.gvsig.fmap.operations.selection.Record;
78 81
import com.iver.cit.gvsig.fmap.operations.strategies.FeatureVisitor;
79 82
import com.iver.cit.gvsig.fmap.operations.strategies.SelectedZoomVisitor;
80
import com.iver.cit.gvsig.fmap.operations.strategies.VisitException;
81
import com.iver.cit.gvsig.fmap.rendering.styling.FStyle2D;
82 83
import com.iver.utiles.XMLEntity;
83 84
import com.iver.utiles.swing.threads.Cancellable;
84 85

  
......
290 291
	 *
291 292
	 * @param g
292 293
	 *            Graphics2D
293
	 *
294
	 * @throws DriverException
294
	 * @throws ReadDriverException TODO
295 295
	 */
296
	public void print(Graphics2D g, double scale, PrintRequestAttributeSet properties) throws DriverException {
296
	public void print(Graphics2D g, double scale, PrintRequestAttributeSet properties) throws ReadDriverException {
297 297
		RenderingHints renderHints = new RenderingHints(
298 298
				RenderingHints.KEY_ANTIALIASING,
299 299
				RenderingHints.VALUE_ANTIALIAS_ON);
......
352 352
			} catch (Exception e) {
353 353
				// TODO Auto-generated catch block
354 354
				e.printStackTrace();
355
			}			
355
			}
356 356
		}
357 357
		ret.layers = aux;
358 358
		return ret;
......
569 569

  
570 570
		try {
571 571
			layers.process(visitor);
572
		} catch (DriverException e1) {
572
		} catch (ReadDriverException e1) {
573 573
			throw new RuntimeException(
574 574
					"No se espera que SelectByPointVisitor lance esta excepci?n",
575 575
					e1);
576
		} catch (VisitException e) {
576
		} catch (VisitorException e) {
577 577
			throw new RuntimeException(
578 578
					"No se espera que SelectByPointVisitor lance esta excepci?n",
579 579
					e);
......
587 587
	 *      java.awt.Graphics2D, ISymbol)
588 588
	 */
589 589
	public void draw(BufferedImage image, Graphics2D g, Cancellable cancel,
590
			double scale) throws DriverException {
590
			double scale) throws ReadDriverException {
591 591
		if (viewPort.getExtent() == null) {
592 592
			// System.err.println("viewPort.getExtent() = null");
593 593
			return;
......
708 708
	}
709 709

  
710 710
	public void drawGraphics(BufferedImage image, Graphics2D g,
711
			Cancellable cancel, double scale) throws DriverException {
711
			Cancellable cancel, double scale) throws ReadDriverException {
712 712
		if (viewPort == null)
713 713
			return;
714 714
		tracLayer.draw(image, g, viewPort, cancel, scale);
......
719 719
	 *      java.awt.Graphics2D, ISymbol)
720 720
	 */
721 721
	public void draw(BufferedImage image, Graphics2D g, double scale)
722
			throws DriverException {
722
			throws ReadDriverException {
723 723
		layers.setDirty(true);
724 724
		draw(image, g, new Cancellable() {
725 725
			/**
......
778 778
	 *
779 779
	 * @throws DriverException
780 780
	 */
781
	public Rectangle2D getFullExtent() throws DriverException {
781
	public Rectangle2D getFullExtent() throws ReadDriverException {
782 782
		return layers.getFullExtent();
783 783
	}
784 784

  
......
885 885
			// if (getLayers().getLayersCount() == 1) {
886 886
			if (getViewPort().getExtent() == null) {
887 887
				FLayer lyr = e.getAffectedLayer();
888

  
889
				try {
890
					getViewPort().setExtent(lyr.getFullExtent());
891
				} catch (DriverException e1) {
892
				}
888
				if (lyr.isAvailable())
889
					try {
890
						getViewPort().setExtent(lyr.getFullExtent());
891
					} catch (ReadDriverException e1) {
892
						e1.printStackTrace();
893
					} catch (ExpansionFileReadException e1) {
894
						e1.printStackTrace();
895
					}
893 896
			}
894 897

  
895 898
			// Registramos al FMap como listener del legend de las capas
......
911 914
					if (s!=null) {
912 915
						s.addSelectionListener(eventBuffer);
913 916
					}
914
				} catch (DriverException e1) {
915
					// TODO Auto-generated catch block
917
				} catch (ReadDriverException e1) {
916 918
					e1.printStackTrace();
917 919
				}
918 920

  

Also available in: Unified diff