Revision 70
trunk/org.gvsig.app.document.layout.app/org.gvsig.app.document.layout.app.mainplugin/src/main/java/org/gvsig/app/project/documents/layout/fframes/FFrameOverView.java | ||
---|---|---|
31 | 31 |
import java.awt.geom.Rectangle2D; |
32 | 32 |
import java.awt.image.BufferedImage; |
33 | 33 |
|
34 |
import javax.swing.JOptionPane; |
|
35 |
|
|
36 |
import org.slf4j.Logger; |
|
37 |
import org.slf4j.LoggerFactory; |
|
38 |
|
|
34 | 39 |
import org.gvsig.andami.PluginServices; |
35 | 40 |
import org.gvsig.andami.messages.NotificationManager; |
41 |
import org.gvsig.app.ApplicationLocator; |
|
36 | 42 |
import org.gvsig.app.project.documents.view.ViewDocument; |
37 | 43 |
import org.gvsig.compat.print.PrintAttributes; |
38 | 44 |
import org.gvsig.fmap.dal.exception.ReadException; |
... | ... | |
52 | 58 |
*/ |
53 | 59 |
public class FFrameOverView extends FFrameView implements IFFrameViewDependence { |
54 | 60 |
|
61 |
private static final Logger logger = LoggerFactory |
|
62 |
.getLogger(FFrameOverView.class); |
|
63 |
|
|
55 | 64 |
public static final String PERSISTENCE_DEFINITION_NAME = "FFrameOverView"; |
56 | 65 |
|
57 | 66 |
private static final String FFRAMEVIEWDEPENDENCE_FIELD = |
... | ... | |
82 | 91 |
getMapContext().getFullEnvelope()); |
83 | 92 |
} |
84 | 93 |
} catch (ReadException e) { |
85 |
e.printStackTrace(); |
|
94 |
ApplicationLocator.getManager().message( |
|
95 |
e.getMessage(), JOptionPane.ERROR_MESSAGE); |
|
96 |
logger.info("Error while setting full extent.", e); |
|
86 | 97 |
} |
87 | 98 |
refresh(); |
88 | 99 |
super.draw(g, at, rv, imgBase); |
... | ... | |
203 | 214 |
|
204 | 215 |
|
205 | 216 |
protected void print(Graphics2D g, AffineTransform at, PrintAttributes printAttributes) { |
217 |
|
|
218 |
try { |
|
219 |
if (getMapContext() != null |
|
220 |
&& getMapContext().getFullEnvelope() != null) { |
|
221 |
getMapContext().getViewPort().setEnvelope( |
|
222 |
getMapContext().getFullEnvelope()); |
|
223 |
} |
|
224 |
} catch (ReadException e) { |
|
225 |
ApplicationLocator.getManager().message( |
|
226 |
e.getMessage(), JOptionPane.ERROR_MESSAGE); |
|
227 |
logger.info("Error while setting full extent.", e); |
|
228 |
} |
|
229 |
refresh(); |
|
230 |
|
|
206 | 231 |
super.print(g, at, printAttributes); |
207 | 232 |
|
208 | 233 |
drawAreaOfInterestBox(g, at, printAttributes); |
Also available in: Unified diff