LayoutManager
BasicSplitPaneUI.BasicHorizontalLayoutManager
, BasicSplitPaneUI.BasicVerticalLayoutManager
, BorderLayout
, BoxLayout
, CardLayout
, DefaultMenuLayout
, GridBagLayout
, GroupLayout
, JRootPane.RootLayout
, OverlayLayout
, SpringLayout
public interface LayoutManager2 extends LayoutManager
This minimal extension to LayoutManager is intended for tool providers who wish to the creation of constraint-based layouts. It does not yet provide full, general support for custom constraint-based layout managers.
LayoutManager
,
Container
Modifier and Type | Method | Description |
---|---|---|
void |
addLayoutComponent(Component comp,
Object constraints) |
Adds the specified component to the layout, using the specified
constraint object.
|
float |
getLayoutAlignmentX(Container target) |
Returns the alignment along the x axis.
|
float |
getLayoutAlignmentY(Container target) |
Returns the alignment along the y axis.
|
void |
invalidateLayout(Container target) |
Invalidates the layout, indicating that if the layout manager
has cached information it should be discarded.
|
Dimension |
maximumLayoutSize(Container target) |
Calculates the maximum size dimensions for the specified container,
given the components it contains.
|
addLayoutComponent, layoutContainer, minimumLayoutSize, preferredLayoutSize, removeLayoutComponent
void addLayoutComponent(Component comp, Object constraints)
comp
- the component to be addedconstraints
- where/how the component is added to the layout.Dimension maximumLayoutSize(Container target)
target
- the target containerComponent.getMaximumSize()
,
LayoutManager
float getLayoutAlignmentX(Container target)
target
- the target containerfloat getLayoutAlignmentY(Container target)
target
- the target containervoid invalidateLayout(Container target)
target
- the target container 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.mlchung.jdk9-jdeps