com.partnersoft.gui
Class DelegatingLayoutManager

java.lang.Object
  extended by com.partnersoft.gui.DelegatingLayoutManager
All Implemented Interfaces:
java.awt.LayoutManager, java.awt.LayoutManager2
Direct Known Subclasses:
FormLayout

public class DelegatingLayoutManager
extends java.lang.Object
implements java.awt.LayoutManager2

This is a starting point for delegation-based layout managers. By default, it refers all methods to the provided delegate. You can then override it however you like to achieve custom behavior. It's probably not very useful by itself, however it is not declared abstract.

Copyright 2008 Partner Software, Inc.

Version:
$Id$
Author:
Paul Reavis

Constructor Summary
protected DelegatingLayoutManager()
          No-arg constructor for subclasses.
  DelegatingLayoutManager(java.awt.LayoutManager2 delegate)
          Creates a delegating layout manager, delegating to the given...
 
Method Summary
 void addLayoutComponent(java.awt.Component comp, java.lang.Object constraints)
           
 void addLayoutComponent(java.lang.String name, java.awt.Component comp)
           
protected  java.awt.LayoutManager2 getDelegate()
           
 float getLayoutAlignmentX(java.awt.Container target)
           
 float getLayoutAlignmentY(java.awt.Container target)
           
 void invalidateLayout(java.awt.Container target)
           
 void layoutContainer(java.awt.Container parent)
           
 java.awt.Dimension maximumLayoutSize(java.awt.Container target)
           
 java.awt.Dimension minimumLayoutSize(java.awt.Container parent)
           
 java.awt.Dimension preferredLayoutSize(java.awt.Container parent)
           
 void removeLayoutComponent(java.awt.Component comp)
           
protected  void setDelegate(java.awt.LayoutManager2 newDelegate)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DelegatingLayoutManager

public DelegatingLayoutManager(java.awt.LayoutManager2 delegate)
Creates a delegating layout manager, delegating to the given... delegate.


DelegatingLayoutManager

protected DelegatingLayoutManager()
No-arg constructor for subclasses. You must set the delegate somehow using setDelegate().

Method Detail

addLayoutComponent

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

addLayoutComponent

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

getLayoutAlignmentX

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

getLayoutAlignmentY

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

invalidateLayout

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

layoutContainer

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

maximumLayoutSize

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

minimumLayoutSize

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

preferredLayoutSize

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

removeLayoutComponent

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

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getDelegate

protected java.awt.LayoutManager2 getDelegate()

setDelegate

protected void setDelegate(java.awt.LayoutManager2 newDelegate)