bibliothek.gui.dock.station.stack
Class DefaultDndAutoSelectStrategyRequest

java.lang.Object
  extended by bibliothek.gui.dock.station.stack.DefaultDndAutoSelectStrategyRequest
All Implemented Interfaces:
DndAutoSelectStrategyRequest

public class DefaultDndAutoSelectStrategyRequest
extends Object
implements DndAutoSelectStrategyRequest

Default implementation of a DndAutoSelectStrategy, it is based on TransferHandler.TransferSupport.

Author:
Benjamin Sigg

Constructor Summary
DefaultDndAutoSelectStrategyRequest(StackDockStation station, Dockable dockable, TransferHandler.TransferSupport transferSupport)
          Creates a new request object.
 
Method Summary
 DataFlavor[] getDataFlavors()
          Returns the data flavors for this transfer.
 Dockable getDockable()
          Gets the Dockable over whose tab the mouse currently hovers.
 StackDockStation getStation()
          Gets the station which detected the event.
 Transferable getTransferable()
          Returns the Transferable associated with this transfer.
 void toFront()
          Selects the Dockable beneath the mouse, moves it to the front and tries to focus it.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultDndAutoSelectStrategyRequest

public DefaultDndAutoSelectStrategyRequest(StackDockStation station,
                                           Dockable dockable,
                                           TransferHandler.TransferSupport transferSupport)
Creates a new request object.

Parameters:
station - the source of the event
dockable - the dockable beneath the mouse
transferSupport - additional information about the event
Method Detail

getStation

public StackDockStation getStation()
Description copied from interface: DndAutoSelectStrategyRequest
Gets the station which detected the event.

Specified by:
getStation in interface DndAutoSelectStrategyRequest
Returns:
the source of the event, never null

getDockable

public Dockable getDockable()
Description copied from interface: DndAutoSelectStrategyRequest
Gets the Dockable over whose tab the mouse currently hovers.

Specified by:
getDockable in interface DndAutoSelectStrategyRequest
Returns:
the tab beneath the mouse, never null

getDataFlavors

public DataFlavor[] getDataFlavors()
Description copied from interface: DndAutoSelectStrategyRequest
Returns the data flavors for this transfer.

Specified by:
getDataFlavors in interface DndAutoSelectStrategyRequest
Returns:
the data flavors for this transfer

getTransferable

public Transferable getTransferable()
Description copied from interface: DndAutoSelectStrategyRequest
Returns the Transferable associated with this transfer.

Specified by:
getTransferable in interface DndAutoSelectStrategyRequest
Returns:
the Transferable associated with this transfer

toFront

public void toFront()
Description copied from interface: DndAutoSelectStrategyRequest
Selects the Dockable beneath the mouse, moves it to the front and tries to focus it.

Specified by:
toFront in interface DndAutoSelectStrategyRequest