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
  • Constructor Details

  • Method Details

    • 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 mode
      mode - the mode that is going to be applied
      history - the history object that will be forwarded to mode, may be null
      Returns:
      the history object to use, may be null