bibliothek.gui.dock.station.toolbar
Class ToolbarContainerLayoutManager

java.lang.Object
  extended by bibliothek.gui.dock.station.toolbar.ToolbarContainerLayoutManager
All Implemented Interfaces:
LayoutManager, LayoutManager2

public class ToolbarContainerLayoutManager
extends Object
implements LayoutManager2

The LayoutManager2 used by a ToolbarContainerDockStation, this LayoutManager2 uses the current SpanFactory to add gaps between Components if necessary.

Author:
Benjamin Sigg

Constructor Summary
ToolbarContainerLayoutManager(JComponent parent, ToolbarContainerDockStation station)
          Creates a new layout manager
 
Method Summary
 void addLayoutComponent(Component comp, Object constraints)
           
 void addLayoutComponent(String name, Component comp)
           
 float getLayoutAlignmentX(Container target)
           
 float getLayoutAlignmentY(Container target)
           
 void invalidateLayout(Container target)
           
 void layoutContainer(Container parent)
           
 Dimension maximumLayoutSize(Container target)
           
 Dimension minimumLayoutSize(Container parent)
           
 Dimension preferredLayoutSize(Container parent)
           
 void removeLayoutComponent(Component comp)
           
 void setController(bibliothek.gui.DockController controller)
          Sets the DockController in whose realm this layout manager is used.
 void setDrawing(ToolbarContainerDropInfo info)
          Tells this layout manager which Spans have to mutate.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ToolbarContainerLayoutManager

public ToolbarContainerLayoutManager(JComponent parent,
                                     ToolbarContainerDockStation station)
Creates a new layout manager

Parameters:
parent - the panel using this layout manager
station - the station showing panel
Method Detail

setController

public void setController(bibliothek.gui.DockController controller)
Sets the DockController in whose realm this layout manager is used.

Parameters:
controller - the controller, can be null

setDrawing

public void setDrawing(ToolbarContainerDropInfo info)
Tells this layout manager which Spans have to mutate.

Parameters:
info - information about the item that is currently dropped

addLayoutComponent

public void addLayoutComponent(String name,
                               Component comp)
Specified by:
addLayoutComponent in interface LayoutManager

removeLayoutComponent

public void removeLayoutComponent(Component comp)
Specified by:
removeLayoutComponent in interface LayoutManager

maximumLayoutSize

public Dimension maximumLayoutSize(Container target)
Specified by:
maximumLayoutSize in interface LayoutManager2

preferredLayoutSize

public Dimension preferredLayoutSize(Container parent)
Specified by:
preferredLayoutSize in interface LayoutManager

layoutContainer

public void layoutContainer(Container parent)
Specified by:
layoutContainer in interface LayoutManager

minimumLayoutSize

public Dimension minimumLayoutSize(Container parent)
Specified by:
minimumLayoutSize in interface LayoutManager

addLayoutComponent

public void addLayoutComponent(Component comp,
                               Object constraints)
Specified by:
addLayoutComponent in interface LayoutManager2

getLayoutAlignmentX

public float getLayoutAlignmentX(Container target)
Specified by:
getLayoutAlignmentX in interface LayoutManager2

getLayoutAlignmentY

public float getLayoutAlignmentY(Container target)
Specified by:
getLayoutAlignmentY in interface LayoutManager2

invalidateLayout

public void invalidateLayout(Container target)
Specified by:
invalidateLayout in interface LayoutManager2