gov.nist.antd.java.awt
Class XYLayout

java.lang.Object
  |
  +--gov.nist.antd.java.awt.XYLayout
All Implemented Interfaces:
java.awt.LayoutManager, java.awt.LayoutManager2, java.io.Serializable

public class XYLayout
extends java.lang.Object
implements java.awt.LayoutManager, java.awt.LayoutManager2, java.io.Serializable

This Layout provides directly positioning of gui's in a container.

This software was produced by the National Institute of Standards and
Technology (NIST), an agency of the U.S. government, and by statute
is not subject to copyright in the United States. RECIPIENTS OF THIS
SOFTWARE ASSUME ALL RESPONSIBILITY ASSOCIATED WITH ITS OPERATION,
MODIFICATION, MAINTENANCE, AND SUBSEQUENT RE-DISTRIBUTION.

Author:
Oliver Borchert
See Also:
Serialized Form

Constructor Summary
XYLayout()
          Constructs a new XY Layout.
 
Method Summary
 void addLayoutComponent(java.awt.Component comp, java.lang.Object constraints)
          This method sets the preffered size of the components.
 void addLayoutComponent(java.lang.String name, java.awt.Component comp)
          This method calls addLayoutComponent (comp, null)
 float getLayoutAlignmentX(java.awt.Container target)
          Not used by this class.
 float getLayoutAlignmentY(java.awt.Container target)
          Not used by this class.
 void invalidateLayout(java.awt.Container target)
          Not used by this class.
 void layoutContainer(java.awt.Container target)
          Lays out the container.
 java.awt.Dimension maximumLayoutSize(java.awt.Container target)
          Returns the minimum dimensions needed to layout the components contained in the specified target container.
 java.awt.Dimension minimumLayoutSize(java.awt.Container target)
          Returns the minimum dimensions needed to layout the components contained in the specified target container.
 java.awt.Dimension preferredLayoutSize(java.awt.Container target)
          Returns the preferred dimensions for this layout calculated by the dimension of all components in the specified target container.
 void removeLayoutComponent(java.awt.Component comp)
          Not used by this class.
 java.lang.String toString()
          Returns a string representation of this XYLayout object and its values.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

XYLayout

public XYLayout()
Constructs a new XY Layout.

Method Detail

addLayoutComponent

public void addLayoutComponent(java.lang.String name,
                               java.awt.Component comp)
This method calls addLayoutComponent (comp, null)

Specified by:
addLayoutComponent in interface java.awt.LayoutManager
Parameters:
name - the name of the component
comp - the component to be added
See Also:
addLayoutComponent(Component,Object)

removeLayoutComponent

public void removeLayoutComponent(java.awt.Component comp)
Not used by this class.

Specified by:
removeLayoutComponent in interface java.awt.LayoutManager
Parameters:
comp - the component to remove
See Also:
Container.removeAll()

preferredLayoutSize

public java.awt.Dimension preferredLayoutSize(java.awt.Container target)
Returns the preferred dimensions for this layout calculated by the dimension of all components in the specified target container.

Specified by:
preferredLayoutSize in interface java.awt.LayoutManager
Parameters:
target - the component which needs to be laid out
Returns:
Dimension the preferred dimension to lay out the subcomponents of the specified container.
See Also:
Container, minimumLayoutSize(java.awt.Container), Container.getPreferredSize()

minimumLayoutSize

public java.awt.Dimension minimumLayoutSize(java.awt.Container target)
Returns the minimum dimensions needed to layout the components contained in the specified target container.

Specified by:
minimumLayoutSize in interface java.awt.LayoutManager
Parameters:
target - the component which needs to be laid out
Returns:
the minimum dimensions to lay out the subcomponents of the specified container.
See Also:
preferredLayoutSize(java.awt.Container), Container, Container.doLayout()

layoutContainer

public void layoutContainer(java.awt.Container target)
Lays out the container.

Specified by:
layoutContainer in interface java.awt.LayoutManager
Parameters:
target - the specified component being laid out.
See Also:
Container, Container.doLayout()

toString

public java.lang.String toString()
Returns a string representation of this XYLayout object and its values.

Overrides:
toString in class java.lang.Object
Returns:
a string representation of this layout.

addLayoutComponent

public void addLayoutComponent(java.awt.Component comp,
                               java.lang.Object constraints)
This method sets the preffered size of the components.

Specified by:
addLayoutComponent in interface java.awt.LayoutManager2
Parameters:
comp - the component to be added
constraints - the constraint must be a Rectangle

maximumLayoutSize

public java.awt.Dimension maximumLayoutSize(java.awt.Container target)
Returns the minimum dimensions needed to layout the components contained in the specified target container.

Specified by:
maximumLayoutSize in interface java.awt.LayoutManager2
Parameters:
target - the component which needs to be laid out
Returns:
the minimum dimensions to lay out the subcomponents of the specified container.
See Also:
preferredLayoutSize(java.awt.Container), Container, Container.doLayout()

getLayoutAlignmentX

public float getLayoutAlignmentX(java.awt.Container target)
Not used by this class.

Specified by:
getLayoutAlignmentX in interface java.awt.LayoutManager2
Parameters:
target - some container.
Returns:
float 0.0f

getLayoutAlignmentY

public float getLayoutAlignmentY(java.awt.Container target)
Not used by this class.

Specified by:
getLayoutAlignmentY in interface java.awt.LayoutManager2
Parameters:
target - some container.
Returns:
float 0.0f

invalidateLayout

public void invalidateLayout(java.awt.Container target)
Not used by this class.

Specified by:
invalidateLayout in interface java.awt.LayoutManager2
Parameters:
target - some container.