bibliothek.gui.dock.station.support
Interface CombinerSource

All Known Implementing Classes:
CombinerSourceWrapper, FlapDropInfo, SplitDockCombinerSource

public interface CombinerSource

A set of information intended for a Combiner. This set of data allows the Combiner to merge the two Dockables old and new.
Some clients of Combiner extend this interface to provide more information to the Combiner.

Author:
Benjamin Sigg

Method Summary
 java.awt.Point getMousePosition()
          Gets the position of the mouse.
 Dockable getNew()
          Gets the new Dockable, the one Dockable which is currently dragged around by the user and which is about to be dropped over old.
 Dockable getOld()
          Gets the old Dockable, the one Dockable which is already a child of the future parent.
 DockStation getParent()
          Gets the station which will be the new parent station of the combined Dockable.
 PlaceholderMap getPlaceholders()
          Gets a map of placeholders which are to be used for creating the combined Dockable.
 java.awt.Dimension getSize()
          Gets the estimated size of the combined Dockable.
 boolean isMouseOverTitle()
          Tells whether the mouse currently is over the title of the old Dockable.
 

Method Detail

getOld

Dockable getOld()
Gets the old Dockable, the one Dockable which is already a child of the future parent.

Returns:
the old Dockable, never null

getNew

Dockable getNew()
Gets the new Dockable, the one Dockable which is currently dragged around by the user and which is about to be dropped over old. The parent of this Dockable may or may not be the old ones parent

Returns:
the new Dockable, never null

getParent

DockStation getParent()
Gets the station which will be the new parent station of the combined Dockable.

Returns:
the parent station, never null

getSize

java.awt.Dimension getSize()
Gets the estimated size of the combined Dockable. In most cases the size will be equal to the current size of the old Dockable.
If the size is unknown, then null is returned. A value of null also means that the mouse is currently not over the old dockable.

Returns:
the estimated size, can be null

getMousePosition

java.awt.Point getMousePosition()
Gets the position of the mouse. A value of 0/0 indicates that the mouse is at the top left edge of the old Dockable, a value equal to the estimated size means that the mouse is at the lower right edge of the old dockable. The mouse may be outside the of these boundaries.
A value of null indicates that the mouse position should not be used for deciding of how to combine the two Dockables. This can happen for example if the mouse hovers directly over the title of the old Dockable.

Returns:
the position of the mouse, may be null

getPlaceholders

PlaceholderMap getPlaceholders()
Gets a map of placeholders which are to be used for creating the combined Dockable. These placeholders have been created by a DockStation that was removed because its children count dropped to one.

Returns:
existing placeholders, may be null

isMouseOverTitle

boolean isMouseOverTitle()
Tells whether the mouse currently is over the title of the old Dockable.

Returns:
true if the mouse hovers over the title, false otherwise