Revision 41102 trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.fmap.control/src/main/java/org/gvsig/fmap/mapcontrol/impl/MapControlDrawer2D.java

View differences:

MapControlDrawer2D.java
85 85
	 */
86 86
	public void drawHandlers(Handler[] handlers, AffineTransform at, ISymbol symbol) {
87 87
		for (int i = 0; i < handlers.length; i++) {
88
			Point2D point = handlers[i].getPoint();
89
			at.transform(point, point);
88
		    
89
		    try {
90
	            Point2D point = handlers[i].getPoint();
91
	            at.transform(point, point);
90 92

  
91
			graphics.setPaintMode();
92
			graphics.setColor(symbol.getColor());
93
			graphics.fillRect((int) (point.getX() - 3), (int) (point.getY() - 3), 7, 7);
94
			graphics.drawRect((int) (point.getX() - 5), (int) (point.getY() - 5), 10, 10);
95
			graphics.drawString( "" + i, (int) (point.getX() - 5), (int) (point.getY() - 5));
93
	            graphics.setPaintMode();
94
	            graphics.setColor(symbol.getColor());
95
	            graphics.fillRect((int) (point.getX() - 3), (int) (point.getY() - 3), 7, 7);
96
	            graphics.drawRect((int) (point.getX() - 5), (int) (point.getY() - 5), 10, 10);
97
	            graphics.drawString( "" + i, (int) (point.getX() - 5), (int) (point.getY() - 5));
98
		    } catch (Throwable th) {
99
		        /*
100
		         * jmvivo experienced a "java.lang.InternalError" here, possibly
101
		         * a graphic bug in the JRE when dealing with windows.
102
		         * Since we are simply drawing a handler, we will ignore this
103
		         * error and simply write a line in the log file.. 
104
		         */
105
		        LOG.info("Unexpected error while drawing handler: " + th.getMessage());
106
		    }
96 107
		}
97 108
	}
98 109

  

Also available in: Unified diff