Class GroupingHistoryRewriter
java.lang.Object
bibliothek.gui.dock.common.grouping.GroupingHistoryRewriter
- All Implemented Interfaces:
HistoryRewriter<Location,CLocationMode>
public class GroupingHistoryRewriter
extends Object
implements HistoryRewriter<Location,CLocationMode>
This
Clients should not have any need to create instances of this class, because any
HistoryRewriter gets the current CGroupingBehavior using the key CControl.GROUPING_BEHAVIOR
from its CControl. It then accesses the DockableGrouping of a Dockable to rewrite its history.
This rewriter makes use of another HistoryRewriter called "validation", to make sure that a valid location is
created.Clients should not have any need to create instances of this class, because any
CControl will already have
a GroupingHistoryRewriter pre-installed.- Author:
- Benjamin Sigg
-
Constructor Summary
ConstructorsConstructorDescriptionGroupingHistoryRewriter(CControl control, HistoryRewriter<Location, CLocationMode> validation) Creates a newGroupingHistoryRewriter. -
Method Summary
Modifier and TypeMethodDescriptionrewrite(Dockable dockable, CLocationMode mode, Location history) Checks whether the history objecthistoryis still valid.
-
Constructor Details
-
GroupingHistoryRewriter
public GroupingHistoryRewriter(CControl control, HistoryRewriter<Location, CLocationMode> validation) Creates a newGroupingHistoryRewriter.- Parameters:
control- theCControlin whose realm this history rewriter worksvalidation- a rewriter that will be used to validate the location of dockables
-
-
Method Details
-
rewrite
Description copied from interface:HistoryRewriterChecks whether the history objecthistoryis still valid.- Specified by:
rewritein interfaceHistoryRewriter<Location,CLocationMode> - Parameters:
dockable- the element which is about to change its modemode- the mode that is going to be appliedhistory- the history object that will be forwarded tomode, may benull- Returns:
- the history object to use, may be
null
-