/** * Creates a new {@link PredefinedPerspective}. This perspective will write the layout in * such a way that a {@link PredefinedDockSituation} can read it again.<br> * Please note that clients need to register {@link DockElement}s using {@link PredefinedPerspective#put(String, PerspectiveElement)} * before the perspective can be used. The {@link DockElement}s registered to <code>this</code> by using {@link #put(String, DockElement)} * are ignored by the perspective. */ @Override public PredefinedPerspective createPerspective(){ return new PredefinedPerspective( this ){ private PreloadFactory preload; { preload = new PreloadFactory(this); } protected String getID( PerspectiveElement element ){ return PredefinedDockSituation.this.getID( element, this ); } protected DockFactory<?, ?, ?> getFactory( String id ){ DockFactory<?, ?, ?> factory = PredefinedDockSituation.this.getFactory( id ); if( factory == PredefinedDockSituation.this.factory ){ return preload; } return factory; } }; }
/** * Creates a new {@link PredefinedPerspective}. This perspective will write the layout in * such a way that a {@link PredefinedDockSituation} can read it again.<br> * Please note that clients need to register {@link DockElement}s using {@link PredefinedPerspective#put(String, PerspectiveElement)} * before the perspective can be used. The {@link DockElement}s registered to <code>this</code> by using {@link #put(String, DockElement)} * are ignored by the perspective. */ @Override public PredefinedPerspective createPerspective(){ return new PredefinedPerspective( this ){ private PreloadFactory preload; { preload = new PreloadFactory(this); } protected String getID( PerspectiveElement element ){ return PredefinedDockSituation.this.getID( element, this ); } protected DockFactory<?, ?, ?> getFactory( String id ){ DockFactory<?, ?, ?> factory = PredefinedDockSituation.this.getFactory( id ); if( factory == PredefinedDockSituation.this.factory ){ return preload; } return factory; } }; }