public interface CGroupBehavior
CGroupBehavior allows to define groups of CDockable. Groups normally
act together when changing the LocationMode: e.g. if one CDockable is minimized, all the other
CDockables follow.| Modifier and Type | Field and Description |
|---|---|
static CGroupBehavior |
STACKED
A behavior that moves around entire stacks of
Dockables. |
static CGroupBehavior |
TOPMOST
A behavior that moves only one
Dockable at a time. |
| Modifier and Type | Method and Description |
|---|---|
Dockable |
getGroupElement(LocationModeManager<? extends LocationMode> manager,
Dockable dockable,
ExtendedMode mode)
Gets the element whose location or mode must be changed in order to apply
mode to dockable. |
Dockable |
getReplaceElement(LocationModeManager<? extends LocationMode> manager,
Dockable old,
Dockable dockable,
ExtendedMode mode)
Gets the element which would replace
old if old is currently
in mode, and dockable is or will not be in mode. |
CGroupMovement |
prepare(LocationModeManager<? extends LocationMode> manager,
Dockable dockable,
ExtendedMode target)
Calculates how the mode of
dockable has to be changed such that it matches target. |
boolean |
shouldForwardActions(LocationModeManager<? extends LocationMode> manager,
DockStation station,
Dockable dockable,
ExtendedMode mode)
Tells whether the actions of
dockable for mode mode should be
shown on station too. |
static final CGroupBehavior TOPMOST
Dockable at a time.static final CGroupBehavior STACKED
Dockables.CGroupMovement prepare(LocationModeManager<? extends LocationMode> manager, Dockable dockable, ExtendedMode target)
dockable has to be changed such that it matches target.
Please note that some modules use directly getGroupElement(LocationModeManager, Dockable, ExtendedMode) and do never call
this method.manager - a manager which may be asked for additional informationdockable - the element that was clicked by the usertarget - the extended mode intended for dockablenullDockable getGroupElement(LocationModeManager<? extends LocationMode> manager, Dockable dockable, ExtendedMode mode)
mode to dockable. Normally dockable itself
is returned, or a parent DockStation of dockable.manager - a manager which may be asked for additional informationdockable - some element, not nullmode - the target modedockable
itself, not nullDockable getReplaceElement(LocationModeManager<? extends LocationMode> manager, Dockable old, Dockable dockable, ExtendedMode mode)
old if old is currently
in mode, and dockable is or will not be in mode.manager - a manager which may be asked for additional informationold - some elementdockable - some element, might be oldmode - the mode in which old isdockable is
no longer in mode, can be nullboolean shouldForwardActions(LocationModeManager<? extends LocationMode> manager, DockStation station, Dockable dockable, ExtendedMode mode)
dockable for mode mode should be
shown on station too.manager - a manager which may be asked for additional informationstation - the parent of dockabledockable - the element whose actions will be shownmode - the mode for which the actions are requestedtrue if the actions should be forwardedCopyright © 2018. All rights reserved.