bibliothek.gui.dock.control.relocator
Class StackMerger
java.lang.Object
bibliothek.gui.dock.control.relocator.StackMerger
- All Implemented Interfaces:
- Merger
public class StackMerger
- extends Object
- implements Merger
This merger takes two StackDockStation
s and merges them into one.
- Author:
- Benjamin Sigg
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StackMerger
public StackMerger()
canMerge
public boolean canMerge(DockStation parent,
DockStation child)
- Description copied from interface:
Merger
- Checks whether
Merger.merge(DockStation, DockStation)
will succeed or not. This
method will only be called if parent
would accept all children
of child
.
- Specified by:
canMerge
in interface Merger
- Parameters:
parent
- an existing stationchild
- a station that is dragged around and may be dropped onto parent
- Returns:
- whether
Merger.merge(DockStation, DockStation)
will succeed
merge
public void merge(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.
- Specified by:
merge
in interface Merger