Class JRootPane.RootLayout

All Implemented Interfaces:
LayoutManager, LayoutManager2, Serializable
Enclosing class:
JRootPane
protected class JRootPane.RootLayout
extends Object
implements LayoutManager2, Serializable

A custom layout manager that is responsible for the layout of layeredPane, glassPane, and menuBar.

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.

See Also:
Serialized Form

Constructors

Modifier Constructor Description
protected RootLayout()

Methods

Modifier and Type Method Description
void layoutContainer​(Container parent)

Instructs the layout manager to perform the layout for the specified container.

Dimension maximumLayoutSize​(Container target)

Returns the maximum amount of space the layout can use.

Dimension minimumLayoutSize​(Container parent)

Returns the minimum amount of space the layout needs.

Dimension preferredLayoutSize​(Container parent)

Returns the amount of space the layout would like to have.

Methods declared in class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Methods declared in interface java.awt.LayoutManager

addLayoutComponent, removeLayoutComponent

Methods declared in interface java.awt.LayoutManager2

addLayoutComponent, getLayoutAlignmentX, getLayoutAlignmentY, invalidateLayout

Constructors

RootLayout

protected RootLayout()

Methods

preferredLayoutSize

public Dimension preferredLayoutSize(Container parent)

Returns the amount of space the layout would like to have.

Specified by:
preferredLayoutSize in interface LayoutManager
Parameters:
parent - the Container for which this layout manager is being used
Returns:
a Dimension object containing the layout's preferred size
See Also:
LayoutManager.minimumLayoutSize(java.awt.Container)

minimumLayoutSize

public Dimension minimumLayoutSize(Container parent)

Returns the minimum amount of space the layout needs.

Specified by:
minimumLayoutSize in interface LayoutManager
Parameters:
parent - the Container for which this layout manager is being used
Returns:
a Dimension object containing the layout's minimum size
See Also:
LayoutManager.preferredLayoutSize(java.awt.Container)

maximumLayoutSize

public Dimension maximumLayoutSize(Container target)

Returns the maximum amount of space the layout can use.

Specified by:
maximumLayoutSize in interface LayoutManager2
Parameters:
target - the Container for which this layout manager is being used
Returns:
a Dimension object containing the layout's maximum size
See Also:
Component.getMaximumSize(), LayoutManager

layoutContainer

public void layoutContainer(Container parent)

Instructs the layout manager to perform the layout for the specified container.

Specified by:
layoutContainer in interface LayoutManager
Parameters:
parent - the Container for which this layout manager is being used

© 1993, 2020, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
https://docs.oracle.com/en/java/javase/11/docs/api/java.desktop/javax/swing/JRootPane.RootLayout.html