bibliothek.gui.dock.station.split
Class PutInfo

java.lang.Object
  extended by bibliothek.gui.dock.station.split.PutInfo

public class PutInfo
extends java.lang.Object

Carries information where to put a Dockable onto a SplitDockStation.

Author:
Benjamin Sigg

Nested Class Summary
static class PutInfo.Put
          Information where the mouse is.
 
Constructor Summary
PutInfo(SplitNode node, PutInfo.Put put, Dockable dockable)
          Creates a new PutInfo.
 
Method Summary
 CombinerSource getCombinerSource()
          Gets information about the two Dockables that are going to be merged.
 CombinerTarget getCombinerTarget()
          Gets information about how to merge the two Dockables.
 double getDivider()
          Gets the preferred location of the divider.
 Dockable getDockable()
          Gets the Dockable which will be added to the station.
 Leaf getLeaf()
          Gets the leaf which contains dockable
 SplitNode getNode()
          Gets the future neighbor or parent.
 int getOldSize()
          Gets the old size of the dockable.
 PutInfo.Put getPut()
          Gets the location of the mouse.
 boolean isDraw()
          Tells whether the station should paint some lines.
 void setCombination(CombinerSource source, CombinerTarget target)
          Sets combination information that can be used for Combiner.combine(CombinerSource, CombinerTarget).
 void setDivider(double divider)
          Sets the preferred location that a divider should have if the dockable will have a neighbor.
 void setDockable(Dockable dockable)
          Sets the Dockable which will be added to the station.
 void setDraw(boolean draw)
          Sets whether the station should paint some lines to indicate where the dockable will be added, or not.
 void setLeaf(Leaf leaf)
          Sets the leaf which contains dockable
 void setNode(SplitNode node)
          Sets the node which might become neighbor or parent of the new child.
 void setOldSize(int oldSize)
          Sets the size that the dockable had before it was dragged around.
 void setPut(PutInfo.Put put)
          Tells where the mouse is, in respect to node.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PutInfo

public PutInfo(SplitNode node,
               PutInfo.Put put,
               Dockable dockable)
Creates a new PutInfo.

Parameters:
node - the node to which put belongs
put - where to put the Dockable in respect to node
dockable - the element that will be dropped
Method Detail

setDockable

public void setDockable(Dockable dockable)
Sets the Dockable which will be added to the station.

Parameters:
dockable - the Dockable or null

getDockable

public Dockable getDockable()
Gets the Dockable which will be added to the station.

Returns:
the Dockable or null

setNode

public void setNode(SplitNode node)
Sets the node which might become neighbor or parent of the new child.

Parameters:
node - the node or null

getNode

public SplitNode getNode()
Gets the future neighbor or parent.

Returns:
the node or null

setPut

public void setPut(PutInfo.Put put)
Tells where the mouse is, in respect to node.

Parameters:
put - the location of the mouse or null

getPut

public PutInfo.Put getPut()
Gets the location of the mouse.

Returns:
the location or null

setDivider

public void setDivider(double divider)
Sets the preferred location that a divider should have if the dockable will have a neighbor.

Parameters:
divider - the location of the divider

getDivider

public double getDivider()
Gets the preferred location of the divider.

Returns:
the location

setDraw

public void setDraw(boolean draw)
Sets whether the station should paint some lines to indicate where the dockable will be added, or not.

Parameters:
draw - true if the station should paint something

isDraw

public boolean isDraw()
Tells whether the station should paint some lines.

Returns:
true if the station should paint
See Also:
setDraw(boolean)

setOldSize

public void setOldSize(int oldSize)
Sets the size that the dockable had before it was dragged around.

Parameters:
oldSize - the size (width or height, the interpretation depends on the value of put)

getOldSize

public int getOldSize()
Gets the old size of the dockable.

Returns:
the size
See Also:
setOldSize(int)

setLeaf

public void setLeaf(Leaf leaf)
Sets the leaf which contains dockable

Parameters:
leaf - the leaf

getLeaf

public Leaf getLeaf()
Gets the leaf which contains dockable

Returns:
the leaf or null

setCombination

public void setCombination(CombinerSource source,
                           CombinerTarget target)
Sets combination information that can be used for Combiner.combine(CombinerSource, CombinerTarget).

Parameters:
source - information about the two Dockables to merge
target - information about how to merge the Dockables

getCombinerSource

public CombinerSource getCombinerSource()
Gets information about the two Dockables that are going to be merged.

Returns:
the merge information, can be null

getCombinerTarget

public CombinerTarget getCombinerTarget()
Gets information about how to merge the two Dockables.

Returns:
the merge information, can be null