/** * Creates a new {@link DockFrontendPerspective} which uses the settings from <code>perspective</code> to read * and write layouts. This method adds {@link CommonSingleDockableFactory}, {@link CommonMultipleDockableFactory} and * {@link CommonDockStationFactory} to the perspective.<br> * Clients usually have no need to call this method. * @param perspective the perspective whose settings should be used for reading or writing a layout * @param includeWorkingAreas whether the contents of {@link CStation#isWorkingArea() working areas} * should be included in the layout or not * @return the new builder */ @FrameworkOnly public DockFrontendPerspective conversion( CPerspective perspective, boolean includeWorkingAreas ){ DockFrontendPerspective conversion = wrap( perspective, includeWorkingAreas ); DockSituation situation = conversion.getPerspective().getSituation(); for( Map.Entry<String, MultipleCDockableFactory<?, ?>> item : control.getRegister().getFactories().entrySet() ){ situation.add( new CommonMultipleDockableFactory( item.getKey(), item.getValue(), control, perspective ) ); } return conversion; }
/** * Constructs a new DockSituation. Factories for {@link DefaultDockable}, * {@link SplitDockStation}, {@link StackDockStation} and * {@link FlapDockStation} will be preinstalled. * @param controller {@link DockController} in whose realm this {@link DockSituation} will be used, the * controller is used to access the {@link ExtensionManager} and load additional factories */ public DockSituation( DockController controller ){ this( new DefaultDockableFactory(), new SplitDockStationFactory(), new StackDockStationFactory(), new FlapDockStationFactory()); @SuppressWarnings("rawtypes") List<DockFactory> factories = controller.getExtensions().load( new ExtensionName<DockFactory>( DOCK_FACTORY_EXTENSION, DockFactory.class, EXTENSION_PARAM, this ) ); for( DockFactory<?,?,?> factory : factories ){ add( factory ); } @SuppressWarnings("rawtypes") List<AdjacentDockFactory> adjacent = controller.getExtensions().load( new ExtensionName<AdjacentDockFactory>( ADJACENT_DOCK_FACTORY_EXTENSION, AdjacentDockFactory.class, EXTENSION_PARAM, this ) ); for( AdjacentDockFactory<?> factory : adjacent ){ addAdjacent( factory ); } }
/** * Creates a new {@link DockFrontendPerspective} which uses the settings from <code>perspective</code> to read * and write layouts. This method adds {@link CommonSingleDockableFactory}, {@link CommonMultipleDockableFactory} and * {@link CommonDockStationFactory} to the perspective.<br> * Clients usually have no need to call this method. * @param perspective the perspective whose settings should be used for reading or writing a layout * @param includeWorkingAreas whether the contents of {@link CStation#isWorkingArea() working areas} * should be included in the layout or not * @return the new builder */ @FrameworkOnly public DockFrontendPerspective conversion( CPerspective perspective, boolean includeWorkingAreas ){ DockFrontendPerspective conversion = wrap( perspective, includeWorkingAreas ); DockSituation situation = conversion.getPerspective().getSituation(); for( Map.Entry<String, MultipleCDockableFactory<?, ?>> item : control.getRegister().getFactories().entrySet() ){ situation.add( new CommonMultipleDockableFactory( item.getKey(), item.getValue(), control, perspective ) ); } return conversion; }
conversion.getSituation().add( new CommonMultipleDockableFactory( item.getKey(), item.getValue(), control, cperspective ) );
conversion.getSituation().add( new CommonMultipleDockableFactory( item.getKey(), item.getValue(), control, perspective ) );
conversion.getSituation().add( new CommonMultipleDockableFactory( item.getKey(), item.getValue(), control, perspective ) );
conversion.getSituation().add( new CommonMultipleDockableFactory( item.getKey(), item.getValue(), control, cperspective ) );
conversion.getSituation().add( new CommonMultipleDockableFactory( item.getKey(), item.getValue(), control, perspective ) );
conversion.getSituation().add( new CommonMultipleDockableFactory( item.getKey(), item.getValue(), control, perspective ) );