bibliothek.gui.dock.station.flap
Class FlapDropInfo

java.lang.Object
  extended by bibliothek.gui.dock.station.flap.FlapDropInfo
All Implemented Interfaces:
CombinerSource

public abstract class FlapDropInfo
extends java.lang.Object
implements CombinerSource

Information where to insert a Dockable into a FlapDockStation.

Author:
Benjamin Sigg

Constructor Summary
FlapDropInfo(FlapDockStation station, Dockable dockable)
          Constructs a new info.
 
Method Summary
 CombinerTarget getCombineTarget()
          Tells how to combine getDockable() with the existing Dockable.
 Dockable getDockable()
          Gets the Dockable which will be dropped or moved on the station.
 int getIndex()
          Gets the index property.
 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.
 DockStation getParent()
          Gets the station which will be the new parent station of the combined Dockable.
 boolean isDraw()
          Gets the draw property
 void setCombineTarget(CombinerTarget combineTarget)
          Sets how to combine getDockable() with the existing Dockable.
 void setDraw(boolean draw)
          Sets the draw property.
 void setIndex(int index)
          Sets the location where the Dockable will be inserted in respect to the list of buttons.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface bibliothek.gui.dock.station.support.CombinerSource
getMousePosition, getOld, getPlaceholders, getSize, isMouseOverTitle
 

Constructor Detail

FlapDropInfo

public FlapDropInfo(FlapDockStation station,
                    Dockable dockable)
Constructs a new info.

Parameters:
station - the owner of this info
dockable - the Dockable which will be inserted
Method Detail

getCombineTarget

public CombinerTarget getCombineTarget()
Tells how to combine getDockable() with the existing Dockable.

Returns:
the combination, can be null

setCombineTarget

public void setCombineTarget(CombinerTarget combineTarget)
Sets how to combine getDockable() with the existing Dockable.

Parameters:
combineTarget - the combination, can be null

getDockable

public Dockable getDockable()
Gets the Dockable which will be dropped or moved on the station.

Returns:
the source

isDraw

public boolean isDraw()
Gets the draw property

Returns:
the property
See Also:
setDraw(boolean)

setDraw

public void setDraw(boolean draw)
Sets the draw property. If this property is true, the station will paint some information where the Dockable will be inserted. This information is only a help to the user.

Parameters:
draw - true if the station should paint something

getIndex

public int getIndex()
Gets the index property.

Returns:
the property
See Also:
setIndex(int)

setIndex

public void setIndex(int index)
Sets the location where the Dockable will be inserted in respect to the list of buttons.

Parameters:
index - the location

getNew

public Dockable getNew()
Description copied from interface: CombinerSource
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

Specified by:
getNew in interface CombinerSource
Returns:
the new Dockable, never null

getParent

public DockStation getParent()
Description copied from interface: CombinerSource
Gets the station which will be the new parent station of the combined Dockable.

Specified by:
getParent in interface CombinerSource
Returns:
the parent station, never null