java.lang.Object | +--javax.swing.OverlayLayout
Safe: 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 applications running
the same version of Swing. As of 1.4, support for long term storage
of all JavaBeansTM
has been added to the java.beans package.
Please see java.beans.XMLEncoder.
OverlayLayout(Container target)
void
addLayoutComponent(Component comp,
Object constraints)
void
addLayoutComponent(String name,
Component comp)
float
getLayoutAlignmentX(Container target)
float
getLayoutAlignmentY(Container target)
void
invalidateLayout(Container target)
void
layoutContainer(Container target)
Dimension
maximumLayoutSize(Container target)
Dimension
minimumLayoutSize(Container target)
Dimension
preferredLayoutSize(Container target)
void
removeLayoutComponent(Component comp)
private Container target
private SizeRequirements[] xChildren
private SizeRequirements[] yChildren
private SizeRequirements xTotal
private SizeRequirements yTotal
public OverlayLayout(Container target)
target - the container to do layout againstpublic void invalidateLayout(Container target)
invalidateLayout in interface LayoutManager2target - the containerpublic void addLayoutComponent(String name, Component comp)
addLayoutComponent in interface LayoutManagername - the name of the componentcomp - the the component to be addedpublic void removeLayoutComponent(Component comp)
removeLayoutComponent in interface LayoutManagercomp - the component to removepublic void addLayoutComponent(Component comp, Object constraints)
addLayoutComponent in interface LayoutManager2comp - the component to be addedconstraints - where/how the component is added to the layout.public Dimension preferredLayoutSize(Container target)
preferredLayoutSize in interface LayoutManagertarget - the component which needs to be laid out
minimumLayoutSize(java.awt.Container)public Dimension minimumLayoutSize(Container target)
minimumLayoutSize in interface LayoutManagertarget - the component which needs to be laid out
preferredLayoutSize(java.awt.Container)public Dimension maximumLayoutSize(Container target)
maximumLayoutSize in interface LayoutManager2target - the component which needs to be laid out
preferredLayoutSize(java.awt.Container)public float getLayoutAlignmentX(Container target)
getLayoutAlignmentX in interface LayoutManager2target - the container
public float getLayoutAlignmentY(Container target)
getLayoutAlignmentY in interface LayoutManager2target - the container
public void layoutContainer(Container target)
layoutContainer in interface LayoutManagertarget - the container to lay outvoid checkContainer(Container target)
void checkRequests()