org.rosuda.JGR.layout
Class AnchorLayout

java.lang.Object
  extended by org.rosuda.JGR.layout.AnchorLayout
All Implemented Interfaces:
java.awt.LayoutManager, java.awt.LayoutManager2

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

Lays out components, using a combination of their "bounds" property and their AnchorConstraints layout constraint objects.

Sides of the components can be anchored either absolutely (eg, if the right side is anchored absolutely then it will always be a fixed number of pixels from the right side of it's parent container) or relatively (ie, if any side is anchored relatively then it will always occur a fixed fraction of the way along it's parent's side). Or they can be not anchored, at all in which case they will occur at places determined by their component's "bounds" property and the anchoring of the component's other sides.


Constructor Summary
AnchorLayout()
           
 
Method Summary
 void addLayoutComponent(java.awt.Component comp, java.lang.Object constraints)
           
 void addLayoutComponent(java.lang.String name, java.awt.Component comp)
           
 float getLayoutAlignmentX(java.awt.Container target)
           
 float getLayoutAlignmentY(java.awt.Container target)
           
 void invalidateLayout(java.awt.Container target)
           
 void layoutContainer(java.awt.Container container)
           
 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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnchorLayout

public AnchorLayout()
Method Detail

layoutContainer

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

addLayoutComponent

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

removeLayoutComponent

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

preferredLayoutSize

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

minimumLayoutSize

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

addLayoutComponent

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

maximumLayoutSize

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

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