Revision 35778 trunk/applications/appgvSIG/src/com/iver/cit/gvsig/project/documents/layout/fframes/FFrameView.java
FFrameView.java | ||
---|---|---|
112 | 112 |
private AffineTransform at = null; |
113 | 113 |
protected Project project = null; |
114 | 114 |
private double scaleAnt; |
115 |
private boolean refresh=false; |
|
115 |
private boolean refresh_=false;
|
|
116 | 116 |
private Point origin; |
117 | 117 |
private Point2D p1; |
118 | 118 |
private Point2D p2; |
... | ... | |
138 | 138 |
return "FFrameView " + num + ": " + getView().getName(); |
139 | 139 |
} |
140 | 140 |
|
141 |
|
|
142 |
private void setRefresh(boolean b) { |
|
143 |
// System.out.println("################### SET REFRESH = " + b + " (" + |
|
144 |
// this.getName() |
|
145 |
// + ")"); |
|
146 |
// Thread.dumpStack(); |
|
147 |
refresh_ = b; |
|
148 |
} |
|
149 |
|
|
150 |
private boolean getRefresh() { |
|
151 |
// System.out.println("################### GET REFRESH = " + refresh_ + " (" + |
|
152 |
// this.getName() |
|
153 |
// + ")"); |
|
154 |
return refresh_; |
|
155 |
} |
|
141 | 156 |
/** |
142 | 157 |
* Rellena la escala de la vista que contiene el fframe. |
143 | 158 |
* |
... | ... | |
154 | 169 |
*/ |
155 | 170 |
public void setNewExtent(Rectangle2D r) { |
156 | 171 |
getMapContext().getViewPort().setExtent(r); |
157 |
refresh = true;
|
|
172 |
setRefresh(true);
|
|
158 | 173 |
m_Scale = FLayoutUtilities.getScaleView(getMapContext().getViewPort(), |
159 | 174 |
getBoundBox().width, |
160 | 175 |
getBoundingBox(null).width / getBoundBox().width); |
... | ... | |
346 | 361 |
} else { |
347 | 362 |
if (rv != null) { |
348 | 363 |
// Dibujamos en pantalla |
364 |
|
|
365 |
double scale1_1 = MapContext.getScreenDPI() / 2.54; |
|
366 |
double visible__factor = at.getScaleX() / scale1_1; |
|
367 |
|
|
349 | 368 |
Rectangle rclip = null; |
350 | 369 |
if (g.getClipBounds()!=null) |
351 | 370 |
rclip = (Rectangle)g.getClipBounds().clone(); |
... | ... | |
362 | 381 |
&& origin.equals(getLayout().getLayoutControl().getRectOrigin()) |
363 | 382 |
&& getLayout() != null |
364 | 383 |
&& getLayout().getLayoutControl().getAT().getScaleX() == scaleAnt |
365 |
&& m_image != null && !refresh && !(r.getWidth() > getLayout().getWidth()
|
|
384 |
&& m_image != null && !getRefresh() && !(r.getWidth() > getLayout().getWidth()
|
|
366 | 385 |
|| r.getHeight() > getLayout().getHeight())) { |
367 | 386 |
if (theBackColor != null) { |
368 | 387 |
g.setColor(theBackColor); |
... | ... | |
433 | 452 |
try { |
434 | 453 |
MapContext mapContext = getMapContext(); |
435 | 454 |
mapContext.getMapContextDrawer().clean(); |
436 |
mapContext.draw(m_image, gimg, getScale()); |
|
455 |
mapContext.draw(m_image, gimg, getScale(), |
|
456 |
MapContext.getScreenDPI() * visible__factor); |
|
437 | 457 |
} catch (ReadDriverException e) { |
438 | 458 |
e.printStackTrace(); |
439 | 459 |
} |
... | ... | |
450 | 470 |
} |
451 | 471 |
scaleAnt = getLayout().getLayoutControl().getAT().getScaleX(); |
452 | 472 |
origin = (Point) getLayout().getLayoutControl().getRectOrigin(); |
453 |
refresh = false;
|
|
473 |
setRefresh(false);
|
|
454 | 474 |
} |
455 | 475 |
} |
456 | 476 |
} else { |
... | ... | |
808 | 828 |
getLayout().getLayoutControl().setStatus(LayoutControl.DESACTUALIZADO); |
809 | 829 |
} |
810 | 830 |
} |
811 |
refresh=true;
|
|
831 |
setRefresh(true);
|
|
812 | 832 |
} |
813 | 833 |
|
814 | 834 |
/** |
... | ... | |
844 | 864 |
public void legendChanged(LegendChangedEvent e) { |
845 | 865 |
if (getLinked()) { |
846 | 866 |
getLayout().getLayoutControl().setStatus(LayoutControl.DESACTUALIZADO); |
847 |
refresh=true;
|
|
867 |
setRefresh(true);
|
|
848 | 868 |
//setBufferedImage(null); |
849 | 869 |
} |
850 | 870 |
} |
... | ... | |
987 | 1007 |
public void refresh() { |
988 | 1008 |
if (view!=null && (getTypeScale() == MANUAL || getTypeScale() == CONSTANTE )) |
989 | 1009 |
getMapContext().getViewPort().setExtent(getNewExtent(getScale())); |
990 |
refresh=true;
|
|
1010 |
setRefresh(true);
|
|
991 | 1011 |
} |
992 | 1012 |
|
993 | 1013 |
public void fullExtent() throws ReadDriverException { |
... | ... | |
1037 | 1057 |
|
1038 | 1058 |
} |
1039 | 1059 |
public IFFrame cloneFFrame(Layout layout) { |
1060 |
|
|
1040 | 1061 |
FFrameView frame =(FFrameView)FrameFactory.createFrameFromName(FFrameViewFactory.registerName); |
1041 | 1062 |
frame.setLevel(this.getLevel()); |
1042 | 1063 |
frame.setNum(this.num); |
Also available in: Unified diff