com.alee.extended.layout
Class MultiLayout

java.lang.Object
  extended by com.alee.extended.layout.AbstractLayoutManager
      extended by com.alee.extended.layout.MultiLayout
All Implemented Interfaces:
java.awt.LayoutManager, java.awt.LayoutManager2

public class MultiLayout
extends AbstractLayoutManager

Custom layout that allows multiply layout strategies to be applied to single container.

Author:
Mikle Garin

Field Summary
protected  java.util.List<java.awt.LayoutManager> layoutManagers
          Applied layout managers list.
 
Constructor Summary
MultiLayout()
          Constructs new MultiLayout.
 
Method Summary
 void addComponent(java.awt.Component component, java.lang.Object constraints)
          Caled when component added into container with this layout.
 void addLayoutComponent(java.awt.Component comp, java.lang.Object constraints)
          
 void addLayoutComponent(java.lang.String name, java.awt.Component comp)
          
 void addLayoutManager(java.awt.LayoutManager layoutManager)
          Adds applied layout manager.
 java.util.List<java.awt.LayoutManager> getLayoutManagers()
          Returns applied layout managers.
 void invalidateLayout(java.awt.Container parent)
          
 void layoutContainer(java.awt.Container parent)
          
 java.awt.Dimension maximumLayoutSize(java.awt.Container parent)
          
 java.awt.Dimension minimumLayoutSize(java.awt.Container parent)
          
 java.awt.Dimension preferredLayoutSize(java.awt.Container parent)
          
 void removeComponent(java.awt.Component component)
          Called when component removed from container with this layout.
 void removeLayoutComponent(java.awt.Component comp)
          
 void removeLayoutManager(java.awt.LayoutManager layoutManager)
          Removes applied layout manager.
 void setLayoutManagers(java.util.List<java.awt.LayoutManager> layoutManagers)
          Sets applied layout managers.
 
Methods inherited from class com.alee.extended.layout.AbstractLayoutManager
getLayoutAlignmentX, getLayoutAlignmentY
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

layoutManagers

protected java.util.List<java.awt.LayoutManager> layoutManagers
Applied layout managers list.

Constructor Detail

MultiLayout

public MultiLayout()
Constructs new MultiLayout.

Method Detail

getLayoutManagers

public java.util.List<java.awt.LayoutManager> getLayoutManagers()
Returns applied layout managers.

Returns:
applied layout managers

setLayoutManagers

public void setLayoutManagers(java.util.List<java.awt.LayoutManager> layoutManagers)
Sets applied layout managers.

Parameters:
layoutManagers - new applied layout managers

addLayoutManager

public void addLayoutManager(java.awt.LayoutManager layoutManager)
Adds applied layout manager.

Parameters:
layoutManager - applied layout manager to add

removeLayoutManager

public void removeLayoutManager(java.awt.LayoutManager layoutManager)
Removes applied layout manager.

Parameters:
layoutManager - applied layout manager to remove

addLayoutComponent

public void addLayoutComponent(java.awt.Component comp,
                               java.lang.Object constraints)

Specified by:
addLayoutComponent in interface java.awt.LayoutManager2
Overrides:
addLayoutComponent in class AbstractLayoutManager

addLayoutComponent

public void addLayoutComponent(java.lang.String name,
                               java.awt.Component comp)

Specified by:
addLayoutComponent in interface java.awt.LayoutManager
Overrides:
addLayoutComponent in class AbstractLayoutManager

removeLayoutComponent

public void removeLayoutComponent(java.awt.Component comp)

Specified by:
removeLayoutComponent in interface java.awt.LayoutManager
Overrides:
removeLayoutComponent in class AbstractLayoutManager

addComponent

public void addComponent(java.awt.Component component,
                         java.lang.Object constraints)
Caled when component added into container with this layout.

Overrides:
addComponent in class AbstractLayoutManager
Parameters:
component - added component
constraints - component constraints

removeComponent

public void removeComponent(java.awt.Component component)
Called when component removed from container with this layout.

Overrides:
removeComponent in class AbstractLayoutManager
Parameters:
component - removed component

preferredLayoutSize

public java.awt.Dimension preferredLayoutSize(java.awt.Container parent)


minimumLayoutSize

public java.awt.Dimension minimumLayoutSize(java.awt.Container parent)

Specified by:
minimumLayoutSize in interface java.awt.LayoutManager
Overrides:
minimumLayoutSize in class AbstractLayoutManager

maximumLayoutSize

public java.awt.Dimension maximumLayoutSize(java.awt.Container parent)

Specified by:
maximumLayoutSize in interface java.awt.LayoutManager2
Overrides:
maximumLayoutSize in class AbstractLayoutManager

invalidateLayout

public void invalidateLayout(java.awt.Container parent)

Specified by:
invalidateLayout in interface java.awt.LayoutManager2
Overrides:
invalidateLayout in class AbstractLayoutManager

layoutContainer

public void layoutContainer(java.awt.Container parent)