public final class OverlayLayout
extends java.lang.Object
implements java.awt.LayoutManager
This layout manager acts similar to the card layout, but all children of the parent band have the same size and all children can be visible at the same time.
Modifier and Type | Field and Description |
---|---|
private boolean |
ignoreInvisible
A flag that defines, whether invisible components should be ignored when
computing the layout.
|
Constructor and Description |
---|
OverlayLayout()
DefaultConstructor.
|
OverlayLayout(boolean ignoreInvisible)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
addLayoutComponent(java.lang.String name,
java.awt.Component comp)
If the layout manager uses a per-component string,
adds the component
comp to the layout,
associating it
with the string specified by name . |
void |
layoutContainer(java.awt.Container parent)
Lays out the specified container.
|
java.awt.Dimension |
minimumLayoutSize(java.awt.Container parent)
Calculates the minimum size dimensions for the specified
container, given the components it contains.
|
java.awt.Dimension |
preferredLayoutSize(java.awt.Container parent)
Calculates the preferred size dimensions for the specified
container, given the components it contains.
|
void |
removeLayoutComponent(java.awt.Component comp)
Removes the specified component from the layout.
|
private boolean ignoreInvisible
public OverlayLayout(boolean ignoreInvisible)
ignoreInvisible
- whether to ignore invisible components when computing the layout.public OverlayLayout()
public void addLayoutComponent(java.lang.String name, java.awt.Component comp)
comp
to the layout,
associating it
with the string specified by name
.addLayoutComponent
in interface java.awt.LayoutManager
name
- the string to be associated with the componentcomp
- the component to be addedpublic void removeLayoutComponent(java.awt.Component comp)
removeLayoutComponent
in interface java.awt.LayoutManager
comp
- the component to be removedpublic void layoutContainer(java.awt.Container parent)
layoutContainer
in interface java.awt.LayoutManager
parent
- the container to be laid outpublic java.awt.Dimension minimumLayoutSize(java.awt.Container parent)
minimumLayoutSize
in interface java.awt.LayoutManager
parent
- the component to be laid outpreferredLayoutSize(java.awt.Container)
public java.awt.Dimension preferredLayoutSize(java.awt.Container parent)
preferredLayoutSize
in interface java.awt.LayoutManager
parent
- the container to be laid outminimumLayoutSize(java.awt.Container)