org.xulux.guilayer.swing.layouts
Class AutoSizeLayoutManager

java.lang.Object
  extended by org.xulux.guilayer.swing.layouts.SwingLayoutAbstract
      extended by org.xulux.guilayer.swing.layouts.AutoSizeLayoutManager
All Implemented Interfaces:
java.awt.LayoutManager, java.awt.LayoutManager2, org.xulux.api.gui.IXuluxLayout

public class AutoSizeLayoutManager
extends SwingLayoutAbstract
implements java.awt.LayoutManager2

The autosize layoutmanager autosizes the components based on the preferred size. It also makes sure when resizing the component can stay on the specified position (eg LEFT means, stay left, do not center).

Version:
$Id: AutoSizeLayoutManager.java,v 1.2 2004/10/20 00:00:02 mvdb Exp $
Author:
Martin van den Bemt

Field Summary
 
Fields inherited from class org.xulux.guilayer.swing.layouts.SwingLayoutAbstract
parentWidget
 
Constructor Summary
AutoSizeLayoutManager()
           
AutoSizeLayoutManager(org.xulux.api.gui.IWidget parent)
          The constructor that imidiately sets the parent
 
Method Summary
 void addLayoutComponent(java.awt.Component comp, java.lang.Object constraints)
           
 void addLayoutComponent(java.lang.String name, java.awt.Component comp)
           
 void addWidget(org.xulux.api.gui.IWidget widget)
           
 void destroy()
           
 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)
           
 void removeWidget(org.xulux.api.gui.IWidget widget)
           
 
Methods inherited from class org.xulux.guilayer.swing.layouts.SwingLayoutAbstract
getParent, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AutoSizeLayoutManager

public AutoSizeLayoutManager()

AutoSizeLayoutManager

public AutoSizeLayoutManager(org.xulux.api.gui.IWidget parent)
The constructor that imidiately sets the parent

Parameters:
parent - the parent widget.
Method Detail

getLayoutAlignmentX

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

getLayoutAlignmentY

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

invalidateLayout

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

maximumLayoutSize

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

addLayoutComponent

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

removeLayoutComponent

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

layoutContainer

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

addLayoutComponent

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

minimumLayoutSize

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

preferredLayoutSize

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

addWidget

public void addWidget(org.xulux.api.gui.IWidget widget)
Specified by:
addWidget in interface org.xulux.api.gui.IXuluxLayout
See Also:
IXuluxLayout.addWidget(org.xulux.api.gui.IWidget)

removeWidget

public void removeWidget(org.xulux.api.gui.IWidget widget)
Specified by:
removeWidget in interface org.xulux.api.gui.IXuluxLayout
See Also:
IXuluxLayout.removeWidget(org.xulux.api.gui.IWidget)

destroy

public void destroy()
Specified by:
destroy in interface org.xulux.api.gui.IXuluxLayout
Specified by:
destroy in class SwingLayoutAbstract
See Also:
IXuluxLayout.destroy()


Copyright © 2002-2007 Martin van den Bemt. All Rights Reserved.