Class CommonDockStationFactory
java.lang.Object
bibliothek.gui.dock.common.intern.station.CommonDockStationFactory
- All Implemented Interfaces:
DockFactory<CommonDockStation<?,,?>, CommonDockStationPerspective, CommonDockStationLayout> DockConverter<CommonDockStation<?,?>, CommonDockStationPerspective, CommonDockStationLayout>
public class CommonDockStationFactory
extends Object
implements DockFactory<CommonDockStation<?,?>,CommonDockStationPerspective,CommonDockStationLayout>
A factory that is responsible for storing and loading the layout of the
CommonDockStations. This factory actually forwards the work to
a real DockFactory and only stores meta-data (like "was the
CommonDockStation as SingleCDockable?").- Author:
- Benjamin Sigg
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCommonDockStationFactory(CControl control, FrontendPerspectiveCache cache, CommonSingleDockableFactory singleDockableFactory) Creates a new factory -
Method Summary
Modifier and TypeMethodDescriptionprotected CommonDockStation<?,?> createStation(String id) voidestimateLocations(CommonDockStationLayout layout, LocationEstimationMap children) getID()getLayout(CommonDockStation<?, ?> element, Map<Dockable, Integer> children) getPerspectiveLayout(CommonDockStationPerspective element, Map<PerspectiveDockable, Integer> children) CommonDockStation<?,?> layout(CommonDockStationLayout layout, PlaceholderStrategy placeholders) CommonDockStation<?,?> layout(CommonDockStationLayout layout, Map<Integer, Dockable> children, PlaceholderStrategy placeholders) layoutPerspective(CommonDockStationLayout layout, Map<Integer, PerspectiveDockable> children) voidlayoutPerspective(CommonDockStationPerspective element, CommonDockStationLayout layout, Map<Integer, PerspectiveDockable> children) read(XElement element, PlaceholderStrategy placeholders) read(DataInputStream in, PlaceholderStrategy placeholders) protected voidregisterStation(CStation<?> station, boolean root) Registerstationat theCControlin whose realm this factory works.voidsetLayout(CommonDockStation<?, ?> element, CommonDockStationLayout layout, PlaceholderStrategy placeholders) voidsetLayout(CommonDockStation<?, ?> element, CommonDockStationLayout layout, Map<Integer, Dockable> children, PlaceholderStrategy placeholders) voidwrite(CommonDockStationLayout layout, XElement element) voidwrite(CommonDockStationLayout layout, DataOutputStream out)
-
Field Details
-
FACTORY_ID
The unique identifier of this factory- See Also:
-
-
Constructor Details
-
CommonDockStationFactory
public CommonDockStationFactory(CControl control, FrontendPerspectiveCache cache, CommonSingleDockableFactory singleDockableFactory) Creates a new factory- Parameters:
control- theCControlin whose realm this factory works, notnullcache- used to create missingPerspectiveElements, can benullsingleDockableFactory- the factory used to create newCommonDockStations that are alsoSingleCDockables, notnull
-
-
Method Details
-
createStation
- Parameters:
id- the unique identifier of aSingleCDockable- Returns:
- the new station or
nullifidis unknown
-
registerStation
Registerstationat theCControlin whose realm this factory works.- Parameters:
station- the station to registerroot- whether to set the root flag or not
-
getID
- Specified by:
getIDin interfaceDockConverter<CommonDockStation<?,?>, CommonDockStationPerspective, CommonDockStationLayout>
-
getLayout
public CommonDockStationLayout getLayout(CommonDockStation<?, ?> element, Map<Dockable, Integer> children) - Specified by:
getLayoutin interfaceDockConverter<CommonDockStation<?,?>, CommonDockStationPerspective, CommonDockStationLayout>
-
layout
public CommonDockStation<?,?> layout(CommonDockStationLayout layout, Map<Integer, Dockable> children, PlaceholderStrategy placeholders) - Specified by:
layoutin interfaceDockFactory<CommonDockStation<?,?>, CommonDockStationPerspective, CommonDockStationLayout>
-
layout
public CommonDockStation<?,?> layout(CommonDockStationLayout layout, PlaceholderStrategy placeholders) - Specified by:
layoutin interfaceDockFactory<CommonDockStation<?,?>, CommonDockStationPerspective, CommonDockStationLayout>
-
setLayout
public void setLayout(CommonDockStation<?, ?> element, CommonDockStationLayout layout, Map<Integer, Dockable> children, PlaceholderStrategy placeholders) - Specified by:
setLayoutin interfaceDockConverter<CommonDockStation<?,?>, CommonDockStationPerspective, CommonDockStationLayout>
-
setLayout
public void setLayout(CommonDockStation<?, ?> element, CommonDockStationLayout layout, PlaceholderStrategy placeholders) - Specified by:
setLayoutin interfaceDockConverter<CommonDockStation<?,?>, CommonDockStationPerspective, CommonDockStationLayout>
-
estimateLocations
- Specified by:
estimateLocationsin interfaceDockFactory<CommonDockStation<?,?>, CommonDockStationPerspective, CommonDockStationLayout>
-
layoutPerspective
public CommonDockStationPerspective layoutPerspective(CommonDockStationLayout layout, Map<Integer, PerspectiveDockable> children) - Specified by:
layoutPerspectivein interfaceDockFactory<CommonDockStation<?,?>, CommonDockStationPerspective, CommonDockStationLayout>
-
layoutPerspective
public void layoutPerspective(CommonDockStationPerspective element, CommonDockStationLayout layout, Map<Integer, PerspectiveDockable> children) - Specified by:
layoutPerspectivein interfaceDockFactory<CommonDockStation<?,?>, CommonDockStationPerspective, CommonDockStationLayout>
-
getPerspectiveLayout
public CommonDockStationLayout getPerspectiveLayout(CommonDockStationPerspective element, Map<PerspectiveDockable, Integer> children) - Specified by:
getPerspectiveLayoutin interfaceDockConverter<CommonDockStation<?,?>, CommonDockStationPerspective, CommonDockStationLayout>
-
write
- Specified by:
writein interfaceDockConverter<CommonDockStation<?,?>, CommonDockStationPerspective, CommonDockStationLayout>
-
read
- Specified by:
readin interfaceDockConverter<CommonDockStation<?,?>, CommonDockStationPerspective, CommonDockStationLayout>
-
write
- Specified by:
writein interfaceDockConverter<CommonDockStation<?,?>, CommonDockStationPerspective, CommonDockStationLayout> - Throws:
IOException
-
read
public CommonDockStationLayout read(DataInputStream in, PlaceholderStrategy placeholders) throws IOException - Specified by:
readin interfaceDockConverter<CommonDockStation<?,?>, CommonDockStationPerspective, CommonDockStationLayout> - Throws:
IOException
-