Class CommonSingleDockableFactory
java.lang.Object
bibliothek.gui.dock.common.intern.CommonSingleDockableFactory
- All Implemented Interfaces:
DockFactory<CommonDockable,,CommonElementPerspective, CommonSingleDockableLayout> DockConverter<CommonDockable,CommonElementPerspective, CommonSingleDockableLayout>
public class CommonSingleDockableFactory
extends Object
implements DockFactory<CommonDockable,CommonElementPerspective,CommonSingleDockableLayout>
This factory is used to create new
SingleCDockables using various
SingleCDockableFactorys. This factory is accessed when a single
dockable is missing in the cache of its owning CControl.- Author:
- Benjamin Sigg
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCommonSingleDockableFactory(CControl control) Creates a new factory.CommonSingleDockableFactory(CControl control, CPerspective perspective) Creates a new factory. -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(Filter<String> ids, SingleCDockableFactory factory) Registers a new factory that will loadSingleCDockablewith unique identifiers that are included byids.voidadd(String id, SingleCDockableFactory factory) Registers a new factory that will loadSingleCDockables with the unique idid.voidestimateLocations(CommonSingleDockableLayout layout, LocationEstimationMap children) getFactory(String id) Searches the factory which handlesid.Gets the set of keys for all factories known to this.getID()getLayout(CommonDockable element, Map<Dockable, Integer> children) getPerspectiveLayout(CommonElementPerspective element, Map<PerspectiveDockable, Integer> children) layout(CommonSingleDockableLayout layout, PlaceholderStrategy placeholders) layout(CommonSingleDockableLayout layout, Map<Integer, Dockable> children, PlaceholderStrategy placeholders) layoutPerspective(CommonSingleDockableLayout layout, Map<Integer, PerspectiveDockable> children) voidlayoutPerspective(CommonElementPerspective perspective, CommonSingleDockableLayout layout, Map<Integer, PerspectiveDockable> children) String[]Gets a list of keys for all factories known to this.read(XElement element, PlaceholderStrategy placeholders) read(DataInputStream in, PlaceholderStrategy placeholders) voidremove(SingleCDockableFactory factory) Removes any occurrence offactory.voidRemoves a factory from this.voidsetLayout(CommonDockable element, CommonSingleDockableLayout layout, PlaceholderStrategy placeholders) voidsetLayout(CommonDockable element, CommonSingleDockableLayout layout, Map<Integer, Dockable> children, PlaceholderStrategy placeholders) voidwrite(CommonSingleDockableLayout layout, XElement element) voidwrite(CommonSingleDockableLayout layout, DataOutputStream out)
-
Field Details
-
BACKUP_FACTORY_ID
- See Also:
-
-
Constructor Details
-
CommonSingleDockableFactory
Creates a new factory.- Parameters:
control- the owner of the factory, the factory will addSingleCDockableto this control
-
CommonSingleDockableFactory
Creates a new factory.- Parameters:
control- the owner of the factory, the factory will addSingleCDockableto this controlperspective- the perspective which is used to load perspective related content
-
-
Method Details
-
add
Registers a new factory that will loadSingleCDockables with the unique idid.- Parameters:
id- the unique id of the dockables whichfactorywill createfactory- the new factory
-
add
Registers a new factory that will loadSingleCDockablewith unique identifiers that are included byids.- Parameters:
ids- the identifiers that are includedfactory- the new factory
-
remove
Removes a factory from this.- Parameters:
id- the name of the factory to remove
-
remove
Removes any occurrence offactory.- Parameters:
factory- the factory to remove
-
getFactory
Searches the factory which handlesid.- Parameters:
id- the name of a factory- Returns:
- the factory or
null
-
getID
- Specified by:
getIDin interfaceDockConverter<CommonDockable,CommonElementPerspective, CommonSingleDockableLayout>
-
listFactories
Gets a list of keys for all factories known to this.- Returns:
- the list of keys
-
getFactoryIds
Gets the set of keys for all factories known to this.- Returns:
- the set of keys
-
estimateLocations
- Specified by:
estimateLocationsin interfaceDockFactory<CommonDockable,CommonElementPerspective, CommonSingleDockableLayout>
-
getLayout
- Specified by:
getLayoutin interfaceDockConverter<CommonDockable,CommonElementPerspective, CommonSingleDockableLayout>
-
layout
public CommonDockable layout(CommonSingleDockableLayout layout, Map<Integer, Dockable> children, PlaceholderStrategy placeholders) - Specified by:
layoutin interfaceDockFactory<CommonDockable,CommonElementPerspective, CommonSingleDockableLayout>
-
layout
- Specified by:
layoutin interfaceDockFactory<CommonDockable,CommonElementPerspective, CommonSingleDockableLayout>
-
layoutPerspective
public CommonElementPerspective layoutPerspective(CommonSingleDockableLayout layout, Map<Integer, PerspectiveDockable> children) - Specified by:
layoutPerspectivein interfaceDockFactory<CommonDockable,CommonElementPerspective, CommonSingleDockableLayout>
-
layoutPerspective
public void layoutPerspective(CommonElementPerspective perspective, CommonSingleDockableLayout layout, Map<Integer, PerspectiveDockable> children) - Specified by:
layoutPerspectivein interfaceDockFactory<CommonDockable,CommonElementPerspective, CommonSingleDockableLayout>
-
getPerspectiveLayout
public CommonSingleDockableLayout getPerspectiveLayout(CommonElementPerspective element, Map<PerspectiveDockable, Integer> children) - Specified by:
getPerspectiveLayoutin interfaceDockConverter<CommonDockable,CommonElementPerspective, CommonSingleDockableLayout>
-
read
public CommonSingleDockableLayout read(DataInputStream in, PlaceholderStrategy placeholders) throws IOException - Specified by:
readin interfaceDockConverter<CommonDockable,CommonElementPerspective, CommonSingleDockableLayout> - Throws:
IOException
-
read
- Specified by:
readin interfaceDockConverter<CommonDockable,CommonElementPerspective, CommonSingleDockableLayout>
-
setLayout
public void setLayout(CommonDockable element, CommonSingleDockableLayout layout, Map<Integer, Dockable> children, PlaceholderStrategy placeholders) - Specified by:
setLayoutin interfaceDockConverter<CommonDockable,CommonElementPerspective, CommonSingleDockableLayout>
-
setLayout
public void setLayout(CommonDockable element, CommonSingleDockableLayout layout, PlaceholderStrategy placeholders) - Specified by:
setLayoutin interfaceDockConverter<CommonDockable,CommonElementPerspective, CommonSingleDockableLayout>
-
write
- Specified by:
writein interfaceDockConverter<CommonDockable,CommonElementPerspective, CommonSingleDockableLayout> - Throws:
IOException
-
write
- Specified by:
writein interfaceDockConverter<CommonDockable,CommonElementPerspective, CommonSingleDockableLayout>
-