bibliothek.gui.dock.common.grouping
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 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
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GroupingHistoryRewriter
public GroupingHistoryRewriter(CControl control,
HistoryRewriter<Location,CLocationMode> validation)
- Creates a new
GroupingHistoryRewriter.
- Parameters:
control - the CControl in whose realm this history rewriter worksvalidation - a rewriter that will be used to validate the location of dockables
rewrite
public Location rewrite(Dockable dockable,
CLocationMode mode,
Location history)
- Description copied from interface:
HistoryRewriter
- Checks whether the history object
history is still valid.
- Specified by:
rewrite in interface HistoryRewriter<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 to mode, may be null
- Returns:
- the history object to use, may be
null