bibliothek.gui.dock.control.relocator
Interface Inserter

All Known Implementing Classes:
MultiInserter

public interface Inserter

The Inserter is used by the DockRelocator to build and execute StationDropOperations independent from the involved DockStations and Dockables. The Inserter is a very powerful interface, as it can completely override any decision that was made by a DockStation.
An Inserter does not have access to the internas of a DockStation, nor does any DockStation know of the existence of the Inserter. Some station may however offer special methods to create fitting StationDropOperations.

Author:
Benjamin Sigg

Method Summary
 StationDropOperation after(InserterSource source)
          This method is called after DockStation.prepareDrop(bibliothek.gui.dock.station.StationDropItem) was executed, the method is called in any case independent of whether prepareDrop returned a StationDropOperation or not.
 StationDropOperation before(InserterSource source)
          This method is called if DockStationDropLayer.contains(int, int) confirmed that a point belongs to the layer, but before DockStation.prepareDrop(bibliothek.gui.dock.station.StationDropItem) was invoked.
 

Method Detail

before

StationDropOperation before(InserterSource source)
This method is called if DockStationDropLayer.contains(int, int) confirmed that a point belongs to the layer, but before DockStation.prepareDrop(bibliothek.gui.dock.station.StationDropItem) was invoked.

Parameters:
source - information about the current position of the mouse, the invoked DockElements and other things related to a drag and drop operation.
Returns:
a value of null if this Inserter is not interested in the event, a value not null will override DockStation.prepareDrop(bibliothek.gui.dock.station.StationDropItem) (the method will never be called), in this case after(InserterSource) is not called either.

after

StationDropOperation after(InserterSource source)
This method is called after DockStation.prepareDrop(bibliothek.gui.dock.station.StationDropItem) was executed, the method is called in any case independent of whether prepareDrop returned a StationDropOperation or not.

Parameters:
source - information about the current position of the mouse, the invoked DockElements and other things related to a drag and drop operation.
Returns:
a value of null if this Inserter is not interested in the event, a value not null will override the result of DockStation.prepareDrop(bibliothek.gui.dock.station.StationDropItem)