Revision 3551 trunk/applications/appgvSIG/src/com/iver/cit/gvsig/gui/layout/fframes/FFrame.java

View differences:

FFrame.java
48 48
import com.iver.andami.messages.NotificationManager;
49 49

  
50 50
import com.iver.cit.gvsig.AddLayer;
51
import com.iver.cit.gvsig.ProjectExtension;
51 52
import com.iver.cit.gvsig.fmap.DriverException;
52 53
import com.iver.cit.gvsig.gui.layout.FLayoutUtilities;
53 54
import com.iver.cit.gvsig.gui.layout.Layout;
54 55
import com.iver.cit.gvsig.gui.layout.dialogs.Tag;
55 56
import com.iver.cit.gvsig.gui.project.OpenException;
57
import com.iver.cit.gvsig.gui.project.SaveException;
56 58
import com.iver.cit.gvsig.project.Project;
57 59

  
58 60
import com.iver.utiles.XMLEntity;
......
756 758
    public void setLevel(int l) {
757 759
        level = l;
758 760
    }
761
    public IFFrame cloneFFrame(Layout layout){
762
    	Project p=((ProjectExtension)PluginServices.getExtension(ProjectExtension.class)).getProject();
763
    	IFFrame frame=null;
764
    	try {
765
			 frame=createFFrame(this.getXMLEntity(),p);
766
		} catch (OpenException e) {
767
			e.showError();
768
		} catch (SaveException e) {
769
			e.showError();
770
		}
771
		if (frame instanceof IFFrameLayoutDependence){
772
    		((IFFrameLayoutDependence)frame).setLayout(layout);
773
    	}
774
		if (frame instanceof IFFrameViewDependence){
775
    		((IFFrameViewDependence)frame).initDependence(layout.getAllFFrames());
776
    	}
777
		return frame;
778
    }
759 779
}

Also available in: Unified diff