bibliothek.gui.dock.control.relocator
Class TabMerger
java.lang.Object
bibliothek.gui.dock.control.relocator.TabMerger
- All Implemented Interfaces:
- Merger
public class TabMerger
- extends Object
- implements Merger
This Merger merges StackDockStations that are dropped onto a single
tabbed Dockable.
- Author:
- Benjamin Sigg
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TabMerger
public TabMerger()
canMerge
public boolean canMerge(StationDropOperation operation,
DockStation parent,
DockStation child)
- Description copied from interface:
Merger
- Checks whether
Merger.merge(StationDropOperation, DockStation, DockStation) will succeed or not. This
method will only be called if parent would accept all children
of child. This method may be called during "drop" and during "move" operations.
- Specified by:
canMerge in interface Merger
- Parameters:
operation - the operation that would be executed, can be nullparent - an existing stationchild - a station that is dragged around and may be dropped onto parent
- Returns:
- whether
Merger.merge(StationDropOperation, DockStation, DockStation) will succeed
merge
public void merge(StationDropOperation operation,
DockStation parent,
DockStation child)
- Description copied from interface:
Merger
- Moves all children of
child to parent, leaving child
empty. This method is only called if canMerge
returned true and if the accept-methods allow the operation.
If the parent of child is not parent, then child will be removed
from its parent. Otherwise the child remains, allowing this Merger to reuse it.
- Specified by:
merge in interface Merger
- Parameters:
operation - the operation that would be executed, can be nullparent - the new parent of the childrenchild - the station to disolve