Package bibliothek.gui.dock.common
Interface MissingCDockableStrategy
public interface MissingCDockableStrategy
A strategy that tells what to do if
CControl finds a description of
a CDockable that it does not know while reading a layout.- Author:
- Benjamin Sigg
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final MissingCDockableStrategyA strategy that will always throw away information.static final MissingCDockableStrategyA strategy that will always throw away information forMultipleCDockables but store information forSingleCDockable.static final MissingCDockableStrategyA strategy that will always store any information -
Method Summary
Modifier and TypeMethodDescriptionbooleanshouldCreate(String id, MultipleCDockableFactory<?, ?> factory) Tells whether the factoryfactoryshould be used to createMultipleCDockables for which location information is available.<L extends MultipleCDockableLayout>
booleanshouldCreate(String id, MultipleCDockableFactory<?, L> factory, String uniqueId, L data) Tells whether theMultipleCDockablewith identifieruniqueIdshould automatically be created outside the normal setup-phase.booleanTells whether layout information for the missingMultipleCDockablewith identifieridshould be stored.booleanTells whether layout information for the missingSingleCDockablewith identifieridshould be stored.
-
Field Details
-
PURGE
A strategy that will always throw away information. -
SINGLE
A strategy that will always throw away information forMultipleCDockables but store information forSingleCDockable. -
STORE
A strategy that will always store any information
-
-
Method Details
-
shouldStoreSingle
Tells whether layout information for the missingSingleCDockablewith identifieridshould be stored.- Parameters:
id- the identifier of the missingSingleCDockable- Returns:
trueif layout information should remain available,falseif the information should be purged.
-
shouldStoreMulti
Tells whether layout information for the missingMultipleCDockablewith identifieridshould be stored.- Parameters:
id- the identifier of the missingMultipleCDockable- Returns:
trueif layout information should remain available,falseif the information should be purged.
-
shouldCreate
Tells whether the factoryfactoryshould be used to createMultipleCDockables for which location information is available.- Parameters:
id- the identifier of the factoryfactory- the factory to use- Returns:
trueif dockables can be restored byfactory
-
shouldCreate
<L extends MultipleCDockableLayout> boolean shouldCreate(String id, MultipleCDockableFactory<?, L> factory, String uniqueId, L data) Tells whether theMultipleCDockablewith identifieruniqueIdshould automatically be created outside the normal setup-phase. This method is not called when applying a new layout through the normal ways, only whenfactoryhas become available after the layout was already set.- Type Parameters:
L- the kind of datafactoryuses- Parameters:
id- the identifier offactoryfactory- the factory which would create the new elementuniqueId- the identifier of the element that would be createddata- the data that would be given tofactoryto create the new element- Returns:
trueif a new element should be created
-