Class java.awt.swing.OverlayLayout
java.lang.Object
|
+----java.awt.swing.OverlayLayout
- public class OverlayLayout
- extends Object
- implements LayoutManager2, Serializable
A layout manager to arrange components over the top
of each other. The requested size of the container
will be the largest requested size of the children,
taking alignment needs into consideration.
The alignment is based upon what is needed to properly
fit the children in the allocation area. The children
will be placed such that their alignment points are all
on top of each other.
Warning: serialized objects of this class will not be compatible with
future swing releases. The current serialization support is appropriate
for short term storage or RMI between Swing1.0 applications. It will
not be possible to load serialized Swing1.0 objects with future releases
of Swing. The JDK1.2 release of Swing will be the compatibility
baseline for the serialized form of Swing objects.
Constructor Summary
|
OverlayLayout(Container target)
Construct a layout manager that performs overlay
arrangment of the children.
|
Methods inherited from class java.lang.Object
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OverlayLayout
public OverlayLayout(Container target)
- Construct a layout manager that performs overlay
arrangment of the children. The layout manager
created is dedicated to the given container.
- Parameters:
target
- The container to do layout against.
invalidateLayout
public void invalidateLayout(Container target)
- Indicates a child has changed it's layout related information
which causes any cached calculations to be flushed.
- Implements:
- invalidateLayout in interface LayoutManager2
addLayoutComponent
public void addLayoutComponent(String name,
Component comp)
- Adds the specified component to the layout. Not used by this class.
- Implements:
- addLayoutComponent in interface LayoutManager2
- Parameters:
name
- the name of the component
comp
- the the component to be added
removeLayoutComponent
public void removeLayoutComponent(Component comp)
- Removes the specified component from the layout. Not used by
this class.
- Parameters:
comp
- the component to remove
addLayoutComponent
public void addLayoutComponent(Component comp,
Object constraints)
- Adds the specified component to the layout, using the specified
constraint object.
- Implements:
- addLayoutComponent in interface LayoutManager2
- Parameters:
comp
- the component to be added
constraints
- where/how the component is added to the layout.
preferredLayoutSize
public Dimension preferredLayoutSize(Container target)
- Returns the preferred dimensions for this layout given the components
in the specified target container.
- Parameters:
target
- the component which needs to be laid out
- See Also:
- Container, minimumLayoutSize
minimumLayoutSize
public Dimension minimumLayoutSize(Container target)
- Returns the minimum dimensions needed to layout the components
contained in the specified target container.
- Parameters:
target
- the component which needs to be laid out
- See Also:
- preferredLayoutSize
maximumLayoutSize
public Dimension maximumLayoutSize(Container target)
- Returns the minimum dimensions needed to layout the components
contained in the specified target container.
- Implements:
- maximumLayoutSize in interface LayoutManager2
- Parameters:
target
- the component which needs to be laid out
- See Also:
- preferredLayoutSize
getLayoutAlignmentX
public float getLayoutAlignmentX(Container target)
- Returns the alignment along the x axis for the container.
If the major axis of the box is the x axis the default
alignment will be returned, otherwise the alignment needed
to place the children along the x axis will be returned.
- Implements:
- getLayoutAlignmentX in interface LayoutManager2
getLayoutAlignmentY
public float getLayoutAlignmentY(Container target)
- Returns the alignment along the y axis for the container.
If the major axis of the box is the y axis the default
alignment will be returned, otherwise the alignment needed
to place the children along the y axis will be returned.
- Implements:
- getLayoutAlignmentY in interface LayoutManager2
layoutContainer
public void layoutContainer(Container target)
Submit a bug or feature
Submit comments/suggestions about new javadoc look.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-1998 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.