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. The information is collected by the station itself.

Author:
Benjamin Sigg

Nested Class Summary
static class PutInfo.Put
          Information where the mouse is.
 
Field Summary
private  double divider
          The location of the divider if the dockable is put aside the node
private  Dockable dockable
          The Dockable which will be dropped
private  boolean draw
          true if some lines should be painted onto the station
private  SplitNode node
          The node which is the anchor for put
private  int oldSize
          The old size of dockable
private  PutInfo.Put put
          The location of the mouse in respect to node
 
Constructor Summary
PutInfo(SplitNode node, PutInfo.Put put)
          Creates a new PutInfo.
 
Method Summary
 double getDivider()
          Gets the preferred location of the divider.
 Dockable getDockable()
          Gets the Dockable which will be added to the station.
 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 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 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
 

Field Detail

node

private SplitNode node
The node which is the anchor for put


put

private PutInfo.Put put
The location of the mouse in respect to node


draw

private boolean draw
true if some lines should be painted onto the station


dockable

private Dockable dockable
The Dockable which will be dropped


divider

private double divider
The location of the divider if the dockable is put aside the node


oldSize

private int oldSize
The old size of dockable

Constructor Detail

PutInfo

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

Parameters:
node - the node to which put belongs
put - where to put the Dockable in respect to node
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)