bibliothek.gui.dock.station.toolbar
Class ToolbarContainerDropInfo

java.lang.Object
  extended by bibliothek.gui.dock.station.toolbar.ToolbarContainerDropInfo
All Implemented Interfaces:
bibliothek.gui.dock.station.StationDropOperation

public abstract class ToolbarContainerDropInfo
extends Object
implements bibliothek.gui.dock.station.StationDropOperation

This class contains and computes information about a drag and drop action. Especially, where the Dockable should be inserted into which ToolbarContainerDockStation

Author:
Herve Guillaume

Constructor Summary
ToolbarContainerDropInfo(bibliothek.gui.Dockable dockable, ToolbarContainerDockStation stationHost, bibliothek.gui.dock.station.support.DockablePlaceholderList<bibliothek.gui.dock.station.StationChildHandle> associateToolbars, int mouseX, int mouseY)
          Constructs a new info to know where drop a dockable
 
Method Summary
 bibliothek.gui.dock.station.support.CombinerTarget getCombination()
           
 bibliothek.gui.dock.displayer.DisplayerCombinerTarget getDisplayerCombination()
           
 bibliothek.gui.Dockable getDockableBeneathMouse()
          Gets the index of the component beneath the mouse
abstract  int getIndex()
          Gets the index of getDockableBeneathMouse() in the parent DockStation.
 bibliothek.gui.Dockable getItem()
           
 Position getItemPositionVSBeneathDockable()
          Gets the relative position of drag dockable with the closest dockable above the mouse.
 Position getSideDockableBeneathMouse()
          Gets the closest side of the component beneath the mouse.
 bibliothek.gui.DockStation getTarget()
           
 boolean isMove()
           
 String toString()
           
 String toSummaryString()
          Return a string describing field values
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface bibliothek.gui.dock.station.StationDropOperation
destroy, draw, execute
 

Constructor Detail

ToolbarContainerDropInfo

public ToolbarContainerDropInfo(bibliothek.gui.Dockable dockable,
                                ToolbarContainerDockStation stationHost,
                                bibliothek.gui.dock.station.support.DockablePlaceholderList<bibliothek.gui.dock.station.StationChildHandle> associateToolbars,
                                int mouseX,
                                int mouseY)
Constructs a new info to know where drop a dockable

Parameters:
dockable - the dockable to drop
stationHost - the station where drop the dockable
associateToolbars - the other dockables in the station
mouseX - the mouse position on X axis
mouseY - the mouse position on Y axis
Method Detail

getItem

public bibliothek.gui.Dockable getItem()
Specified by:
getItem in interface bibliothek.gui.dock.station.StationDropOperation

getTarget

public bibliothek.gui.DockStation getTarget()
Specified by:
getTarget in interface bibliothek.gui.dock.station.StationDropOperation

getCombination

public bibliothek.gui.dock.station.support.CombinerTarget getCombination()
Specified by:
getCombination in interface bibliothek.gui.dock.station.StationDropOperation

getDisplayerCombination

public bibliothek.gui.dock.displayer.DisplayerCombinerTarget getDisplayerCombination()
Specified by:
getDisplayerCombination in interface bibliothek.gui.dock.station.StationDropOperation

isMove

public boolean isMove()
Specified by:
isMove in interface bibliothek.gui.dock.station.StationDropOperation

getIndex

public abstract int getIndex()
Gets the index of getDockableBeneathMouse() in the parent DockStation.

Returns:
the index or -1 if not available

getDockableBeneathMouse

public bibliothek.gui.Dockable getDockableBeneathMouse()
Gets the index of the component beneath the mouse

Returns:
the index

getSideDockableBeneathMouse

public Position getSideDockableBeneathMouse()
Gets the closest side of the component beneath the mouse. Example: if the mouse is over a button, near the top of the button, this return NORTH position

Returns:
the side

getItemPositionVSBeneathDockable

public Position getItemPositionVSBeneathDockable()
Gets the relative position of drag dockable with the closest dockable above the mouse.

Returns:
the position

toString

public String toString()
Overrides:
toString in class Object

toSummaryString

public String toSummaryString()
Return a string describing field values

Returns:
string describing fields