Revision 167 trunk/org.gvsig.app.document.layout2.app/org.gvsig.app.document.layout2.app.mainplugin/src/main/java/org/gvsig/app/project/documents/layout/fframes/FFrame.java

View differences:

FFrame.java
34 34
import java.awt.image.BufferedImage;
35 35

  
36 36
import org.gvsig.andami.PluginServices;
37
import org.gvsig.andami.ui.mdiManager.IWindow;
38 37
import org.gvsig.app.project.ProjectManager;
39 38
import org.gvsig.app.project.documents.Document;
40 39
import org.gvsig.app.project.documents.layout.Attributes;
41 40
import org.gvsig.app.project.documents.layout.DefaultLayoutManager;
42 41
import org.gvsig.app.project.documents.layout.FLayoutUtilities;
43
import org.gvsig.app.project.documents.layout.FrameChangedNotificationImpl;
44 42
import org.gvsig.app.project.documents.layout.LayoutContext;
45
import org.gvsig.app.project.documents.layout.LayoutControl;
46 43
import org.gvsig.app.project.documents.layout.LayoutDocument;
47 44
import org.gvsig.app.project.documents.layout.LayoutManager;
48
import org.gvsig.app.project.documents.layout.LayoutNotification;
49
import org.gvsig.app.project.documents.layout.gui.LayoutPanel;
50 45
import org.gvsig.tools.ToolsLocator;
51 46
import org.gvsig.tools.dynobject.DynStruct;
52
import org.gvsig.tools.observer.Observable;
53 47
import org.gvsig.tools.observer.ObservableHelper;
54 48
import org.gvsig.tools.observer.Observer;
55 49
import org.gvsig.tools.persistence.PersistenceManager;
......
830 824
		
831 825
	}
832 826
	
833
	/**
834
	 * This method is called just before the FFrame is going to
835
	 * be added to the Layout
836
	 */
837
	protected void beforeAdded() {}
827
	public void frameRemoved() {}
838 828
	
839
	/**
840
	 * This method is called just before the FFrame is going to
841
	 * be removed from the Layout
842
	 */
843
	protected void beforeRemoved() {}
829
	public void frameAdded() {}
844 830
	
845
	/**
846
	 * This method is called just after the FFrame has been
847
	 * added to the Layout
848
	 */
849
	protected void afterAdded() {}
850
	
851
	
852
	/**
853
	 * This method is called just before the FFrame is going to
854
	 * be removed from the Layout
855
	 */
856
	protected void afterRemoved() {}
857
	
858
	public void update(Observable observable, Object notification) {
859
		if ((notification != null) && (notification instanceof FrameChangedNotificationImpl)){
860
			FrameChangedNotificationImpl layoutNotification = (FrameChangedNotificationImpl)notification;
861
			if (this.equals(layoutNotification.getFrame()) && FrameChangedNotificationImpl.FRAME_ADDED.equals(layoutNotification.getType())){
862
				afterAdded();
863
			}else if (this.equals(layoutNotification.getFrame()) && FrameChangedNotificationImpl.FRAME_ADDING.equals(layoutNotification.getType())){
864
				beforeAdded();
865
			}else if (this.equals(layoutNotification.getFrame()) && FrameChangedNotificationImpl.FRAME_REMOVING.equals(layoutNotification.getType())){
866
				beforeRemoved();
867
			}else if (this.equals(layoutNotification.getFrame()) && FrameChangedNotificationImpl.FRAME_REMOVED.equals(layoutNotification.getType())){
868
				afterRemoved();
869
			}
870
		}
871
	}
872

  
873 831
	public LayoutContext getLayoutContext() {
874 832
		return layoutContext;
875 833
	}

Also available in: Unified diff