bibliothek.gui.dock.control.relocator
Interface Merger

All Known Implementing Classes:
MultiMerger, StackMerger

public interface Merger

An algorithm used during drag and drop to merge two DockStations.

Author:
Benjamin Sigg

Method Summary
 boolean canMerge(DockStation parent, DockStation child)
          Checks whether merge(DockStation, DockStation) will succeed or not.
 void merge(DockStation parent, DockStation child)
          Moves all children of child to parent, leaving child empty.
 

Method Detail

canMerge

boolean canMerge(DockStation parent,
                 DockStation child)
Checks whether merge(DockStation, DockStation) will succeed or not. This method will only be called if parent would accept all children of child.

Parameters:
parent - an existing station
child - a station that is dragged around and may be dropped onto parent
Returns:
whether merge(DockStation, DockStation) will succeed

merge

void merge(DockStation parent,
           DockStation child)
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.

Parameters:
parent -
child -