Revision 33647 branches/v2_0_0_prep/applications/appgvSIG/src/org/gvsig/app/project/documents/layout/fframes/FFrameView.java
FFrameView.java | ||
---|---|---|
97 | 97 |
*/ |
98 | 98 |
public class FFrameView extends FFrame implements ViewPortListener, |
99 | 99 |
LegendListener, IFFrameUseProject, IFFrameUseFMap { |
100 |
public static final String PERSISTENCE_DEFINITION_NAME = "FFrameText";
|
|
100 |
public static final String PERSISTENCE_DEFINITION_NAME = "FFrameView";
|
|
101 | 101 |
|
102 | 102 |
private static final String MODE_FIELD = "mode"; |
103 | 103 |
private static final String TYPESCALE_FIELD = "typeScale"; |
... | ... | |
275 | 275 |
v.getMapContext().addLayerListener(this); |
276 | 276 |
} |
277 | 277 |
} else if (!m_bLinked) { |
278 |
// try { |
|
278 |
|
|
279 | 279 |
if (getTypeScale() == AUTOMATICO) { |
280 | 280 |
m_fmap = v.getMapContext().cloneFMap(); //(v.getMapContext().getViewPort().cloneViewPort()); |
281 | 281 |
try { |
... | ... | |
864 | 864 |
} |
865 | 865 |
} |
866 | 866 |
|
867 |
public void cloneActions(IFFrame frame) {
|
|
867 |
protected void cloneActions(IFFrame frame) {
|
|
868 | 868 |
if (view ==null || view.getMapContext()==null) { |
869 | 869 |
return; |
870 | 870 |
} |
... | ... | |
890 | 890 |
} |
891 | 891 |
((FFrameView)frame).view.getMapContext().removeLayerListener((FFrameView)frame); |
892 | 892 |
((FFrameView)frame).view.getMapContext().getViewPort().removeViewPortListener((FFrameView)frame); |
893 |
|
|
894 |
|
|
895 | 893 |
} |
894 |
|
|
896 | 895 |
public Object clone() throws CloneNotSupportedException { |
897 |
FFrameView frame =(FFrameView)super.clone(); |
|
898 |
frame.setLevel(this.getLevel()); |
|
899 |
frame.setNum(this.num); |
|
900 |
frame.setBoundBox(this.getBoundBox()); |
|
901 |
frame.setTag(this.getTag()); |
|
902 |
frame.m_Mode = this.m_Mode; |
|
903 |
frame.m_typeScale = this.m_typeScale; |
|
904 |
frame.m_extension = this.m_extension; |
|
905 |
frame.m_quality = this.m_quality; |
|
906 |
frame.m_viewing = this.m_viewing; |
|
907 |
frame.m_bLinked = this.m_bLinked; |
|
908 |
frame.m_mapUnits = this.m_mapUnits; |
|
909 |
frame.setRotation(this.getRotation()); |
|
910 |
|
|
911 |
frame.m_Scale = this.m_Scale; |
|
912 |
frame.view=this.getView(); |
|
913 |
frame.m_fmap = this.getMapContext(); |
|
914 |
frame.setSelected(this.getSelected()!=IFFrame.NOSELECT); |
|
915 |
// frame.setLayout(getLayout()); |
|
916 |
frame.origin=this.origin; |
|
917 |
frame.scaleAnt=this.scaleAnt; |
|
918 |
frame.m_image=this.m_image; |
|
919 |
frame.refresh=this.refresh; |
|
920 |
|
|
921 |
if (frame instanceof IFFrameViewDependence) { |
|
922 |
((IFFrameViewDependence) frame).initDependence(getLayoutContext().getAllFFrames()); |
|
923 |
} |
|
924 |
if (grid!=null){ |
|
925 |
FFrameGrid newGrid=(FFrameGrid)this.grid.clone(); |
|
896 |
FFrameView frame = (FFrameView)super.clone(); |
|
897 |
|
|
898 |
frame.setSelected(this.getSelected() != IFFrame.NOSELECT); |
|
899 |
|
|
900 |
if (grid != null){ |
|
901 |
FFrameGrid newGrid = (FFrameGrid)this.grid.clone(); |
|
926 | 902 |
newGrid.setFFrameDependence(frame); |
927 | 903 |
frame.setGrid(newGrid); |
928 | 904 |
} |
929 |
frame.showGrid=showGrid; |
|
930 | 905 |
cloneActions(frame); |
931 | 906 |
return frame; |
932 | 907 |
} |
... | ... | |
995 | 970 |
definition.addDynFieldBoolean(BLINKED_FIELD).setMandatory(true); |
996 | 971 |
definition.addDynFieldInt(MAPUNITS_FIELD).setMandatory(true); |
997 | 972 |
definition.addDynFieldDouble(SCALE_FIELD).setMandatory(true); |
998 |
definition.addDynField(VIEW_FIELD).setClassOfValue(ViewDocument.class).setMandatory(true);
|
|
973 |
definition.addDynFieldObject(VIEW_FIELD).setClassOfValue(ViewDocument.class).setMandatory(false);
|
|
999 | 974 |
definition.addDynFieldBoolean(ENVELOPE_FIELD).setClassOfValue(Envelope.class).setMandatory(false); |
1000 | 975 |
definition.addDynFieldBoolean(SHOWGRID_FIELD).setMandatory(true); |
1001 |
definition.addDynFieldString(GRID_FIELD).setClassOfValue(IFFrame.class).setMandatory(true);
|
|
976 |
definition.addDynFieldString(GRID_FIELD).setClassOfValue(IFFrame.class).setMandatory(false);
|
|
1002 | 977 |
} |
1003 | 978 |
} |
1004 | 979 |
|
Also available in: Unified diff