bibliothek.gui.dock.control.relocator
Interface RelocateOperation

All Known Implementing Classes:
DropOperation, MergeOperation

public interface RelocateOperation

Describes the action that a DefaultDockRelocator will execute.

Author:
Benjamin Sigg

Method Summary
 void destroy(RelocateOperation next)
          Informs this operation that it will never be used (again) and that it should release any resources it has acquired.
 boolean execute(Dockable selection, VetoableDockRelocatorListener listener)
          Executes this operation.
 Dockable[] getImplicit(Dockable selection)
          Gets the Dockables whose parent will change due to this operation.
 StationDropOperation getOperation()
          Gets the operation that would be executed by the dock station.
 DockStation getStation()
          Gets the station which is the target of this operation
 

Method Detail

getStation

DockStation getStation()
Gets the station which is the target of this operation

Returns:
the target, not null

getOperation

StationDropOperation getOperation()
Gets the operation that would be executed by the dock station.

Returns:
the operation, not null

destroy

void destroy(RelocateOperation next)
Informs this operation that it will never be used (again) and that it should release any resources it has acquired.

Parameters:
next - the operation that will be executed next, can be null

getImplicit

Dockable[] getImplicit(Dockable selection)
Gets the Dockables whose parent will change due to this operation.

Parameters:
selection - the element that is moved around
Returns:
the items, must not be null but can be empty

execute

boolean execute(Dockable selection,
                VetoableDockRelocatorListener listener)
Executes this operation. This method must only call the methods dragging and dragged of listener, all other methods will throw an IllegalStateException.

Parameters:
selection - the element that is moved around
listener - a listener to be informed about events happening because of this operation
Returns:
true if the operation was a success, false if the operation was canceled