Package bibliothek.gui.dock.common.group
Class TopMostGroupBehavior
java.lang.Object
bibliothek.gui.dock.common.group.TopMostGroupBehavior
- All Implemented Interfaces:
CGroupBehavior
This most simple
CGroupBehavior just set the mode of the one
Dockable whose mode should change anyway.- Author:
- Benjamin Sigg
-
Field Summary
Fields inherited from interface bibliothek.gui.dock.common.group.CGroupBehavior
STACKED, TOPMOST -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetGroupElement(LocationModeManager<? extends LocationMode> manager, Dockable dockable, ExtendedMode mode) Gets the element whose location or mode must be changed in order to applymodetodockable.getReplaceElement(LocationModeManager<? extends LocationMode> manager, Dockable old, Dockable dockable, ExtendedMode mode) Gets the element which would replaceoldifoldis currently inmode, anddockableis or will not be inmode.prepare(LocationModeManager<? extends LocationMode> manager, Dockable dockable, ExtendedMode target) Calculates how the mode ofdockablehas to be changed such that it matchestarget.booleanshouldForwardActions(LocationModeManager<? extends LocationMode> manager, DockStation station, Dockable dockable, ExtendedMode mode) Tells whether the actions ofdockablefor modemodeshould be shown onstationtoo.
-
Constructor Details
-
TopMostGroupBehavior
public TopMostGroupBehavior()
-
-
Method Details
-
prepare
public CGroupMovement prepare(LocationModeManager<? extends LocationMode> manager, Dockable dockable, ExtendedMode target) Description copied from interface:CGroupBehaviorCalculates how the mode ofdockablehas to be changed such that it matchestarget. Please note that some modules use directlyCGroupBehavior.getGroupElement(LocationModeManager, Dockable, ExtendedMode)and do never call this method.- Specified by:
preparein interfaceCGroupBehavior- Parameters:
manager- a manager which may be asked for additional informationdockable- the element that was clicked by the usertarget- the extended mode intended fordockable- Returns:
- the operation to execute, may be
null
-
getGroupElement
public Dockable getGroupElement(LocationModeManager<? extends LocationMode> manager, Dockable dockable, ExtendedMode mode) Description copied from interface:CGroupBehaviorGets the element whose location or mode must be changed in order to applymodetodockable. Normallydockableitself is returned, or a parentDockStationofdockable.- Specified by:
getGroupElementin interfaceCGroupBehavior- Parameters:
manager- a manager which may be asked for additional informationdockable- some element, notnullmode- the target mode- Returns:
- the element that must be repositioned, might be
dockableitself, notnull
-
getReplaceElement
public Dockable getReplaceElement(LocationModeManager<? extends LocationMode> manager, Dockable old, Dockable dockable, ExtendedMode mode) Description copied from interface:CGroupBehaviorGets the element which would replaceoldifoldis currently inmode, anddockableis or will not be inmode.- Specified by:
getReplaceElementin interfaceCGroupBehavior- Parameters:
manager- a manager which may be asked for additional informationold- some elementdockable- some element, might beoldmode- the mode in whicholdis- Returns:
- the element which would be maximized if
dockableis no longer inmode, can benull
-
shouldForwardActions
public boolean shouldForwardActions(LocationModeManager<? extends LocationMode> manager, DockStation station, Dockable dockable, ExtendedMode mode) Description copied from interface:CGroupBehaviorTells whether the actions ofdockablefor modemodeshould be shown onstationtoo.- Specified by:
shouldForwardActionsin interfaceCGroupBehavior- Parameters:
manager- a manager which may be asked for additional informationstation- the parent ofdockabledockable- the element whose actions will be shownmode- the mode for which the actions are requested- Returns:
trueif the actions should be forwarded
-