Revision 4496
trunk/applications/appgvSIG/src/com/iver/cit/gvsig/gui/layout/fframes/IFFrameUseFMap.java | ||
---|---|---|
4 | 4 |
import java.awt.geom.Rectangle2D; |
5 | 5 |
import java.awt.image.BufferedImage; |
6 | 6 |
|
7 |
import com.iver.cit.gvsig.fmap.DriverException; |
|
7 | 8 |
import com.iver.cit.gvsig.fmap.FMap; |
8 | 9 |
|
9 | 10 |
public interface IFFrameUseFMap { |
... | ... | |
14 | 15 |
public void refresh(); |
15 | 16 |
public void setNewExtent(Rectangle2D r); |
16 | 17 |
public BufferedImage getBufferedImage(); |
18 |
public void fullExtent() throws DriverException; |
|
17 | 19 |
} |
trunk/applications/appgvSIG/src/com/iver/cit/gvsig/gui/layout/fframes/FFrameView.java | ||
---|---|---|
109 | 109 |
private double scaleAnt; |
110 | 110 |
private boolean refresh=false; |
111 | 111 |
private FFrameView fframeAux; |
112 |
|
|
112 |
|
|
113 | 113 |
/** |
114 | 114 |
* Creates a new FFrameView object. |
115 | 115 |
*/ |
... | ... | |
205 | 205 |
* @param v Modelo de la vista. |
206 | 206 |
*/ |
207 | 207 |
public void setView(ProjectView v) { |
208 |
view = v; |
|
208 |
if (view!=null)return; |
|
209 |
view = v; |
|
209 | 210 |
|
210 | 211 |
ViewPort vp = v.getMapContext().getViewPort().cloneViewPort(); |
211 | 212 |
|
... | ... | |
269 | 270 |
|
270 | 271 |
/* |
271 | 272 |
m_fmap = v.getMapContext(); |
272 |
|
|
273 |
|
|
273 | 274 |
v.getMapContext().getViewPort(); |
274 | 275 |
ViewPort vp = new ViewPort(); |
275 | 276 |
vp.setExtent(v.getMapContext().getViewPort().getExtent()); |
... | ... | |
348 | 349 |
|
349 | 350 |
if (getQuality() == PRESENTACION) { |
350 | 351 |
if (rv.intersects(r)) { |
351 |
|
|
352 |
|
|
353 | 352 |
|
353 |
|
|
354 |
|
|
354 | 355 |
ViewPort viewPort = this.getFMap().getViewPort(); |
355 | 356 |
Color theBackColor = viewPort.getBackColor(); |
356 | 357 |
|
... | ... | |
369 | 370 |
r.getX(), r.getY())); |
370 | 371 |
getFMap().getViewPort().setImageSize(new Dimension( |
371 | 372 |
(int) r.getWidth(), (int) r.getHeight())); |
372 |
|
|
373 |
|
|
373 | 374 |
BufferedImage image=new BufferedImage((int)cliprectLayoutpixels.getWidth(), |
374 | 375 |
(int) cliprectLayoutpixels.getHeight(), |
375 | 376 |
BufferedImage.TYPE_INT_ARGB); |
376 |
|
|
377 |
|
|
377 | 378 |
Graphics2D gimg=(Graphics2D) image.getGraphics(); |
378 | 379 |
gimg.translate(-r.getX(),-r.getY()); |
379 | 380 |
getFMap().draw(image,gimg,getScale()); |
... | ... | |
418 | 419 |
if (getRotation()!=0) |
419 | 420 |
g.rotate(Math.toRadians(-getRotation()), r.x + (r.width / 2), |
420 | 421 |
r.y + (r.height / 2)); |
421 |
|
|
422 |
|
|
422 | 423 |
setATMap((AffineTransform) getFMap() |
423 | 424 |
.getViewPort() |
424 | 425 |
.getAffineTransform() |
... | ... | |
914 | 915 |
private FLayoutFunctions functions=new FLayoutFunctions(layout); |
915 | 916 |
public Rectangle2D getRectView(Point2D p1,Point2D p2){ |
916 | 917 |
//if (cliprect==null){ |
917 |
|
|
918 |
|
|
918 | 919 |
cliprectLayout=FLayoutUtilities.toSheetRect(new Rectangle2D.Double(p1.getX(),p1.getY(),p2.getX()-p1.getX(),p2.getY()-p1.getY()),layout.getAT()); |
919 | 920 |
//setZoomIn(layout.getFirstPoint(),layout.getLastPoint()); |
920 | 921 |
Point2D point1=functions.toMapPoint(new Point2D.Double(p1.getX(),p1.getY()),getATMap()); |
... | ... | |
1017 | 1018 |
layout.getAT())); |
1018 | 1019 |
} |
1019 | 1020 |
cliprectLayoutpixels=rScreen; |
1020 |
|
|
1021 |
|
|
1021 | 1022 |
}*/ |
1023 |
|
|
1024 |
public void fullExtent() throws DriverException { |
|
1025 |
setNewExtent(getFMap().getFullExtent()); |
|
1026 |
} |
|
1022 | 1027 |
} |
trunk/applications/appgvSIG/src/com/iver/cit/gvsig/gui/layout/fframes/dialogs/FFrameViewDialog.java | ||
---|---|---|
203 | 203 |
liVistas.setModel(listmodel); |
204 | 204 |
for (int i = 0; i < liVistas.getModel().getSize(); i++) { |
205 | 205 |
if (fframeview.getFMap() != null) { |
206 |
|
|
206 |
|
|
207 | 207 |
ProjectView pvaux= (ProjectView) liVistas.getModel() |
208 | 208 |
.getElementAt(i); |
209 | 209 |
|
... | ... | |
476 | 476 |
}else{ |
477 | 477 |
((FFrameScaleBar)fframe).setIsFixed(false); |
478 | 478 |
} |
479 |
|
|
479 |
|
|
480 | 480 |
} |
481 | 481 |
} |
482 |
|
|
483 |
|
|
482 |
|
|
483 |
|
|
484 | 484 |
} |
485 | 485 |
*/ |
486 | 486 |
} |
... | ... | |
491 | 491 |
// isAcepted=false; |
492 | 492 |
//} |
493 | 493 |
PluginServices.getMDIManager().closeView(FFrameViewDialog.this); |
494 |
fframeview.refresh(); |
|
494 | 495 |
m_layout.refresh(); |
495 | 496 |
} |
496 | 497 |
}); |
... | ... | |
583 | 584 |
} |
584 | 585 |
|
585 | 586 |
/** |
586 |
* This method initializes rotation
|
|
587 |
*
|
|
588 |
* @return javax.swing.JPanel
|
|
589 |
*/
|
|
587 |
* This method initializes rotation |
|
588 |
* |
|
589 |
* @return javax.swing.JPanel |
|
590 |
*/ |
|
590 | 591 |
private JPRotation getPRotation() { |
591 | 592 |
if (rotation == null) { |
592 | 593 |
rotation = new JPRotation(); |
... | ... | |
594 | 595 |
} |
595 | 596 |
return rotation; |
596 | 597 |
} |
597 |
} // @jve:decl-index=0:visual-constraint="10,10" |
|
598 |
} // @jve:decl-index=0:visual-constraint="10,10" |
trunk/applications/appgvSIG/src/com/iver/cit/gvsig/gui/layout/Layout.java | ||
---|---|---|
1242 | 1242 |
* @throws DriverException |
1243 | 1243 |
*/ |
1244 | 1244 |
public void viewFull() throws DriverException { |
1245 |
for (int i = 0; i < getFFrames().length; i++) { |
|
1246 |
if (getFFrame(i) instanceof IFFrameUseFMap) { |
|
1247 |
IFFrameUseFMap fframe = (IFFrameUseFMap) getFFrame(i); |
|
1245 |
IFFrame[] fframes=getFFrameSelected(); |
|
1246 |
for (int i = 0; i < fframes.length; i++) { |
|
1247 |
if (fframes[i] instanceof IFFrameUseFMap) { |
|
1248 |
IFFrameUseFMap fframe = (IFFrameUseFMap)fframes[i]; |
|
1248 | 1249 |
|
1249 |
if ((((IFFrame)fframe).getSelected() != IFFrame.NOSELECT) && |
|
1250 |
(fframe.getFMap() != null)) { |
|
1251 |
fframe.getFMap().getViewPort().setExtent(fframe.getFMap() |
|
1252 |
.getFullExtent()); |
|
1250 |
if (fframe.getFMap() != null) { |
|
1251 |
fframe.fullExtent();//getFMap().getViewPort().setExtent(fframe.getFMap() |
|
1252 |
// .getFullExtent()); |
|
1253 | 1253 |
} |
1254 | 1254 |
fframe.refresh(); |
1255 | 1255 |
} |
1256 | 1256 |
} |
1257 |
// for (int i = 0; i < getFFrames().length; i++) { |
|
1258 |
// if (getFFrame(i) instanceof IFFrameUseFMap) { |
|
1259 |
// IFFrameUseFMap fframe = (IFFrameUseFMap) getFFrame(i); |
|
1260 |
// |
|
1261 |
// if ((((IFFrame)fframe).getSelected() != IFFrame.NOSELECT) && |
|
1262 |
// (fframe.getFMap() != null)) { |
|
1263 |
// fframe.getFMap().getViewPort().setExtent(fframe.getFMap() |
|
1264 |
// .getFullExtent()); |
|
1265 |
// } |
|
1266 |
// fframe.refresh(); |
|
1267 |
// } |
|
1268 |
// } |
|
1257 | 1269 |
|
1258 | 1270 |
setStatus(DESACTUALIZADO); |
1259 | 1271 |
repaint(); |
Also available in: Unified diff