bibliothek.gui.dock.control.relocator
Class DefaultInserterSource

java.lang.Object
  extended by bibliothek.gui.dock.control.relocator.DefaultInserterSource
All Implemented Interfaces:
InserterSource

public class DefaultInserterSource
extends Object
implements InserterSource

Default implementation of InserterSource.

Author:
Benjamin Sigg

Constructor Summary
DefaultInserterSource(DockStation parent, StationDropItem item)
          Creates a new InserterSource.
 
Method Summary
 StationDropItem getItem()
          Gets information about the item that is dropped.
 StationDropOperation getOperation()
          Gets the StationDropOperation that was created by DockStation.prepareDrop(StationDropItem), this might be null if the station was not yet asked or if the station does not accept the new child.
 DockStation getParent()
          Gets the DockStation which might be the next parent of InserterSource.getItem().
 void setOperation(StationDropOperation operation)
          Sets the result of getOperation().
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultInserterSource

public DefaultInserterSource(DockStation parent,
                             StationDropItem item)
Creates a new InserterSource.

Parameters:
parent - the future parent
item - detailed information about the dropping child
Method Detail

getParent

public DockStation getParent()
Description copied from interface: InserterSource
Gets the DockStation which might be the next parent of InserterSource.getItem().

Specified by:
getParent in interface InserterSource
Returns:
the future parent, never null

getItem

public StationDropItem getItem()
Description copied from interface: InserterSource
Gets information about the item that is dropped.

Specified by:
getItem in interface InserterSource
Returns:
detailed information about the dropping Dockable

setOperation

public void setOperation(StationDropOperation operation)
Sets the result of getOperation().

Parameters:
operation - the operation that might be executed, can be null

getOperation

public StationDropOperation getOperation()
Description copied from interface: InserterSource
Gets the StationDropOperation that was created by DockStation.prepareDrop(StationDropItem), this might be null if the station was not yet asked or if the station does not accept the new child.

Specified by:
getOperation in interface InserterSource
Returns:
the pending operation, can be null