|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectbibliothek.gui.dock.frontend.DefaultLayoutChangeStrategy
bibliothek.gui.dock.common.intern.layout.CLayoutChangeStrategy
@FrameworkOnly public class CLayoutChangeStrategy
Strategy that pays attention to MultipleCDockableFactory.match(bibliothek.gui.dock.common.MultipleCDockable, bibliothek.gui.dock.common.MultipleCDockableLayout)
and that fires CVetoClosingEvents for MultipleCDockables as well.
| Nested Class Summary | |
|---|---|
protected class |
CLayoutChangeStrategy.CSettingAccess
A DefaultLayoutChangeStrategy.SettingAccess that modifies the roots by calling
replaceMultipleDockables(DockFrontendInternals, CSettingAccess, DockLayoutComposition). |
| Nested classes/interfaces inherited from class bibliothek.gui.dock.frontend.DefaultLayoutChangeStrategy |
|---|
DefaultLayoutChangeStrategy.SettingAccess |
| Constructor Summary | |
|---|---|
CLayoutChangeStrategy(CControl control)
Creates a new strategy. |
|
| Method Summary | |
|---|---|
protected DefaultLayoutChangeStrategy.SettingAccess |
createAccess(DockFrontendInternals frontend,
Setting setting)
Creates a wrapper around setting that allows the algorithm of this
LayoutChangeStrategy to access the setting. |
protected PredefinedDockSituation |
createSituation(DockFrontendInternals frontend,
boolean entry,
boolean onSetLayout)
Creates a DockSituation which represents all the knowledge
frontend currently has. |
protected Set<Dockable> |
estimateVisible(DockFrontendInternals frontend,
DockSituation situation,
DockLayoutComposition layout)
Tries to estimate which of the currently visible Dockables will
still be visible if layout is applied to frontend. |
protected Collection<Dockable> |
getClosingDockables(DockFrontendInternals frontend,
Set<Dockable> visible)
Creates a collection of all the Dockables that are about to be closed. |
protected DockLayoutComposition |
replaceMultipleDockables(DockFrontendInternals frontend,
CLayoutChangeStrategy.CSettingAccess setting,
DockLayoutComposition composition)
Checks the DockLayout that is associated with composition and may replace
the layout by another layout if a MultipleCDockableFactory finds a match between an existing
item and meta-data about an item. |
protected boolean |
shouldPredefine(Dockable dockable)
Tells whether the element dockable should be added as predefined element to the PredefinedDockSituation
that is created by DefaultLayoutChangeStrategy.createSituation(DockFrontendInternals, boolean, boolean). |
| Methods inherited from class bibliothek.gui.dock.frontend.DefaultLayoutChangeStrategy |
|---|
applyInvisibleLayout, applyLayout, approveClosing, createPerspective, createSituation, createTransformer, estimateLocations, getPlaceholderStrategy, listEstimateLocations, listLayouts, setLayout |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CLayoutChangeStrategy(CControl control)
control - the control in whose realm this strategy will be used| Method Detail |
|---|
protected PredefinedDockSituation createSituation(DockFrontendInternals frontend,
boolean entry,
boolean onSetLayout)
DefaultLayoutChangeStrategyDockSituation which represents all the knowledge
frontend currently has.
createSituation in class DefaultLayoutChangeStrategyfrontend - the frontend for which the situation is requiredentry - true if the situation is used for a regular setting,
false if the situation is used as the final setting which will
be loaded the next time the application starts.onSetLayout - whether this method is called by DefaultLayoutChangeStrategy.setLayout(DockFrontendInternals, Setting, boolean) or not. If
true then the situation is used to apply some layout, otherwise it is used to store or read a layout
PredefinedDockSituation, subclasses
may override and return other situations.protected boolean shouldPredefine(Dockable dockable)
DefaultLayoutChangeStrategydockable should be added as predefined element to the PredefinedDockSituation
that is created by DefaultLayoutChangeStrategy.createSituation(DockFrontendInternals, boolean, boolean).
shouldPredefine in class DefaultLayoutChangeStrategydockable - the element which may need to be predefined
true if dockable is to be predefined
protected Set<Dockable> estimateVisible(DockFrontendInternals frontend,
DockSituation situation,
DockLayoutComposition layout)
DefaultLayoutChangeStrategyDockables will
still be visible if layout is applied to frontend. The
default implementation assumes that situation is a PredefinedDockSituation.
estimateVisible in class DefaultLayoutChangeStrategyfrontend - the caller of this methodsituation - algorithm used to convert layoutlayout - the layout that will be applied
null
protected Collection<Dockable> getClosingDockables(DockFrontendInternals frontend,
Set<Dockable> visible)
DefaultLayoutChangeStrategyDockables that are about to be closed. Subclasses
may override this method, they should at least check all the Dockables that are
registered at frontend. Subclasses may need to override
estimateVisible as
well to get the correct set of visible elements.
getClosingDockables in class DefaultLayoutChangeStrategyfrontend - the caller of this methodvisible - the elements that remain visible as told by DefaultLayoutChangeStrategy.estimateVisible(DockFrontendInternals, DockSituation, DockLayoutComposition).
null, may be empty
protected DockLayoutComposition replaceMultipleDockables(DockFrontendInternals frontend,
CLayoutChangeStrategy.CSettingAccess setting,
DockLayoutComposition composition)
DockLayout that is associated with composition and may replace
the layout by another layout if a MultipleCDockableFactory finds a match between an existing
item and meta-data about an item.
frontend - the caller of this methodsetting - the layout that is about to be appliedcomposition - the composition to modify, may be null
null
protected DefaultLayoutChangeStrategy.SettingAccess createAccess(DockFrontendInternals frontend,
Setting setting)
DefaultLayoutChangeStrategysetting that allows the algorithm of this
LayoutChangeStrategy to access the setting.
createAccess in class DefaultLayoutChangeStrategyfrontend - the caller of this methodsetting - the setting to hide
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||