java.awt.LayoutManager, java.awt.LayoutManager2, Serializablepublic class OverlayLayout extends Object implements java.awt.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 | Description |
|---|---|
OverlayLayout(java.awt.Container target) |
Constructs a layout manager that performs overlay
arrangement of the children.
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
addLayoutComponent(java.awt.Component comp,
Object constraints) |
Adds the specified component to the layout, using the specified
constraint object.
|
void |
addLayoutComponent(String name,
java.awt.Component comp) |
Adds the specified component to the layout.
|
float |
getLayoutAlignmentX(java.awt.Container target) |
Returns the alignment along the x axis for the container.
|
float |
getLayoutAlignmentY(java.awt.Container target) |
Returns the alignment along the y axis for the container.
|
java.awt.Container |
getTarget() |
Returns the container that uses this layout manager.
|
void |
invalidateLayout(java.awt.Container target) |
Indicates a child has changed its layout related information,
which causes any cached calculations to be flushed.
|
void |
layoutContainer(java.awt.Container target) |
Called by the AWT when the specified container needs to be laid out.
|
java.awt.Dimension |
maximumLayoutSize(java.awt.Container target) |
Returns the maximum dimensions needed to lay out the components
contained in the specified target container.
|
java.awt.Dimension |
minimumLayoutSize(java.awt.Container target) |
Returns the minimum dimensions needed to lay out the components
contained in the specified target container.
|
java.awt.Dimension |
preferredLayoutSize(java.awt.Container target) |
Returns the preferred dimensions for this layout given the components
in the specified target container.
|
void |
removeLayoutComponent(java.awt.Component comp) |
Removes the specified component from the layout.
|
@ConstructorProperties("target") public OverlayLayout(java.awt.Container target)
target - the container to do layout againstpublic final java.awt.Container getTarget()
public void invalidateLayout(java.awt.Container target)
invalidateLayout in interface java.awt.LayoutManager2target - the containerpublic void addLayoutComponent(String name, java.awt.Component comp)
addLayoutComponent in interface java.awt.LayoutManagername - the name of the componentcomp - the component to be addedpublic void removeLayoutComponent(java.awt.Component comp)
removeLayoutComponent in interface java.awt.LayoutManagercomp - the component to removepublic void addLayoutComponent(java.awt.Component comp,
Object constraints)
addLayoutComponent in interface java.awt.LayoutManager2comp - the component to be addedconstraints - where/how the component is added to the layout.public java.awt.Dimension preferredLayoutSize(java.awt.Container target)
preferredLayoutSize in interface java.awt.LayoutManagertarget - the component which needs to be laid outminimumLayoutSize(java.awt.Container)public java.awt.Dimension minimumLayoutSize(java.awt.Container target)
minimumLayoutSize in interface java.awt.LayoutManagertarget - the component which needs to be laid outpreferredLayoutSize(java.awt.Container)public java.awt.Dimension maximumLayoutSize(java.awt.Container target)
getInset.maximumLayoutSize in interface java.awt.LayoutManager2target - the component that needs to be laid outDimension object containing the maximum
dimensionspreferredLayoutSize(java.awt.Container)public float getLayoutAlignmentX(java.awt.Container target)
getLayoutAlignmentX in interface java.awt.LayoutManager2target - the containerpublic float getLayoutAlignmentY(java.awt.Container target)
getLayoutAlignmentY in interface java.awt.LayoutManager2target - the containerpublic void layoutContainer(java.awt.Container target)
layoutContainer in interface java.awt.LayoutManagertarget - the container to lay outjava.awt.AWTError - if the target isn't the container specified to the
constructor Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2017, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.
DRAFT 9-internal+0-adhoc.abuild.jdk9-71a766d4c180