Revision 42192 trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.mapcontext/org.gvsig.fmap.mapcontext.api/src/main/java/org/gvsig/fmap/mapcontext/ViewPort.java
ViewPort.java | ||
---|---|---|
703 | 703 |
*/ |
704 | 704 |
public void setPreviousEnvelope() { |
705 | 705 |
this.updateDrawVersion(); |
706 |
extentsHistory.putNext(extent); |
|
707 |
extent = extentsHistory.removePrev(); |
|
706 |
|
|
707 |
// extentsHistory.putNext(extent); |
|
708 |
// extent = extentsHistory.removePrev(); |
|
709 |
extent = extentsHistory.setPreviousExtent(); |
|
708 | 710 |
|
709 | 711 |
// Calcula la transformaci�n af�n |
710 | 712 |
calculateAffineTransform(); |
... | ... | |
725 | 727 |
*/ |
726 | 728 |
public void setNextEnvelope() { |
727 | 729 |
this.updateDrawVersion(); |
728 |
extentsHistory.put(extent); |
|
729 |
extent = extentsHistory.removeNext();
|
|
730 |
|
|
730 |
|
|
731 |
extent = extentsHistory.setNextExtent();
|
|
732 |
|
|
731 | 733 |
// Calcula la transformaci�n af�n |
732 | 734 |
calculateAffineTransform(); |
733 | 735 |
|
... | ... | |
832 | 834 |
public void setEnvelope(Envelope r) { |
833 | 835 |
Rectangle2D newExtent = null; |
834 | 836 |
// Esto comprueba que el extent no es de anchura o altura = "0" |
835 |
// y si es as� lo redimensiona.
|
|
837 |
// y si es as? lo redimensiona.
|
|
836 | 838 |
if (r != null) { |
837 | 839 |
if ((r.getMaximum(0) - r.getMinimum(0) == 0) |
838 | 840 |
|| (r.getMaximum(1) - r.getMinimum(1) == 0)) { |
... | ... | |
851 | 853 |
return; |
852 | 854 |
} |
853 | 855 |
|
854 |
if (extent != null) { |
|
855 |
if (!extent.equals(extentsHistory.get()) |
|
856 |
&& !extent.equals(extentsHistory.getNext())) { |
|
857 |
extentsHistory.clear(); |
|
858 |
} |
|
859 |
extentsHistory.put(extent); |
|
860 |
} |
|
861 |
|
|
862 | 856 |
this.updateDrawVersion(); |
863 | 857 |
this.extent = newExtent; |
858 |
extentsHistory.put(extent); |
|
864 | 859 |
|
865 | 860 |
// Calcula la transformaci�n af�n |
866 | 861 |
calculateAffineTransform(); |
... | ... | |
887 | 882 |
* @see #calculateAffineTransform() |
888 | 883 |
*/ |
889 | 884 |
public void refreshExtent() { |
890 |
// this.scale = scale; |
|
885 |
//Por compatibilidad con versiones anteriores a la introducci?n de las lista de zooms siguientes |
|
886 |
if (extentsHistory.getCurrent() == null) { |
|
887 |
extentsHistory.put(extent); |
|
888 |
} else { |
|
889 |
extent = extentsHistory.getCurrent(); |
|
890 |
} |
|
891 | 891 |
|
892 |
// Calcula la transformaci�n af�n
|
|
892 |
// Calcula la transformaci?n af?n
|
|
893 | 893 |
calculateAffineTransform(); |
894 | 894 |
|
895 | 895 |
// Lanzamos los eventos de extent cambiado |
... | ... | |
1524 | 1524 |
} |
1525 | 1525 |
|
1526 | 1526 |
// ----------------------------------------------------------------------------------------------------------- |
1527 |
// NOTA PARA DESARROLLADORES SOBRE EL M�TODO
|
|
1527 |
// NOTA PARA DESARROLLADORES SOBRE EL M?TODO
|
|
1528 | 1528 |
// "public void setAffineTransform(AffineTransform at)" |
1529 | 1529 |
// ============================================================================================== |
1530 | 1530 |
// Only used for print, should be removed, redefining the {@link |
Also available in: Unified diff