public class OverlayLayout extends Objectimplements LayoutManager2 , Serializable
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 JavaBeans™ has been added to the java.beans package. Please see XMLEncoder.
| Constructor and Description |
|---|
OverlayLayout(Container
Constructs a layout manager that performs overlay arrangement of the children.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addLayoutComponent(Component
Adds the specified component to the layout, using the specified constraint object.
|
void |
addLayoutComponent(String
Adds the specified component to the layout.
|
float |
getLayoutAlignmentX(Container
Returns the alignment along the x axis for the container.
|
float |
getLayoutAlignmentY(Container
Returns the alignment along the y axis for the container.
|
Container |
getTarget()
Returns the container that uses this layout manager.
|
void |
invalidateLayout(Container
Indicates a child has changed its layout related information, which causes any cached calculations to be flushed.
|
void |
layoutContainer(Container
Called by the AWT when the specified container needs to be laid out.
|
Dimension |
maximumLayoutSize(Container
Returns the maximum dimensions needed to lay out the components contained in the specified target container.
|
Dimension |
minimumLayoutSize(Container
Returns the minimum dimensions needed to lay out the components contained in the specified target container.
|
Dimension |
preferredLayoutSize(Container
Returns the preferred dimensions for this layout given the components in the specified target container.
|
void |
removeLayoutComponent(Component
Removes the specified component from the layout.
|
@ConstructorProperties(value="target") public OverlayLayout(Containertarget)
target - the container to do layout against
public final ContainergetTarget()
public void invalidateLayout(Containertarget)
invalidateLayout in interface
LayoutManager2
target - the container
public void addLayoutComponent(Stringname, Component comp)
addLayoutComponent in interface
LayoutManager
name - the name of the component
comp - the the component to be added
public void removeLayoutComponent(Componentcomp)
removeLayoutComponent in interface
LayoutManager
comp - the component to remove
public void addLayoutComponent(Componentcomp, Object constraints)
addLayoutComponent in interface
LayoutManager2
comp - the component to be added
constraints - where/how the component is added to the layout.
public DimensionpreferredLayoutSize(Container target)
preferredLayoutSize in interface
LayoutManager
target - the component which needs to be laid out
minimumLayoutSize(java.awt.Container)
public DimensionminimumLayoutSize(Container target)
minimumLayoutSize in interface
LayoutManager
target - the component which needs to be laid out
preferredLayoutSize(java.awt.Container)
public DimensionmaximumLayoutSize(Container target)
getInset.
maximumLayoutSize in interface
LayoutManager2
target - the component that needs to be laid out
Dimension object containing the maximum dimensions
preferredLayoutSize(java.awt.Container)
public float getLayoutAlignmentX(Containertarget)
getLayoutAlignmentX in interface
LayoutManager2
target - the container
public float getLayoutAlignmentY(Containertarget)
getLayoutAlignmentY in interface
LayoutManager2
target - the container
public void layoutContainer(Containertarget)
layoutContainer in interface
LayoutManager
target - the container to lay out
AWTError - if the target isn't the container specified to the constructor