public class ProportionalLayout
extends java.lang.Object
implements java.awt.LayoutManager2
| Modifier and Type | Class and Description |
|---|---|
static class |
ProportionalLayout.Constraints
The two locations where components managed by a
ProportionalLayout instance can be placed. |
| Constructor and Description |
|---|
ProportionalLayout()
Creates a layout manager which layouts its component
with a default gap of 5 pixels between them.
|
ProportionalLayout(int gap)
Creates a layout manager which layouts its component
with a given
gap between them. |
| Modifier and Type | Method and Description |
|---|---|
void |
addLayoutComponent(java.awt.Component component,
java.lang.Object constraints)
Records a given
component in this layout manager as the component at
Constraints.TOP or at Constraints.BOTTOM of its container. |
void |
addLayoutComponent(java.lang.String name,
java.awt.Component comp)
Do not use.
|
float |
getLayoutAlignmentX(java.awt.Container target)
Returns 0.5.
|
float |
getLayoutAlignmentY(java.awt.Container target)
Return 0.
|
void |
invalidateLayout(java.awt.Container target)
Invalidates layout.
|
void |
layoutContainer(java.awt.Container parent)
Layouts the container.
|
java.awt.Dimension |
maximumLayoutSize(java.awt.Container parent)
Returns the largest maximum width of the components managed by this layout manager,
and the sum of their maximum heights.
|
java.awt.Dimension |
minimumLayoutSize(java.awt.Container parent)
Returns the largest minimum width of the components managed by this layout manager,
and the sum of their minimum heights.
|
java.awt.Dimension |
preferredLayoutSize(java.awt.Container parent)
Returns the largest preferred width of the components managed by this layout manager,
and the sum of their preferred heights.
|
void |
removeLayoutComponent(java.awt.Component component)
Removes the given
component from the ones managed by this layout manager. |
public ProportionalLayout()
public ProportionalLayout(int gap)
gap between them.public void addLayoutComponent(java.awt.Component component,
java.lang.Object constraints)
component in this layout manager as the component at
Constraints.TOP or at Constraints.BOTTOM of its container.addLayoutComponent in interface java.awt.LayoutManager2public void addLayoutComponent(java.lang.String name,
java.awt.Component comp)
addLayoutComponent in interface java.awt.LayoutManagerpublic void removeLayoutComponent(java.awt.Component component)
component from the ones managed by this layout manager.removeLayoutComponent in interface java.awt.LayoutManagerpublic float getLayoutAlignmentX(java.awt.Container target)
getLayoutAlignmentX in interface java.awt.LayoutManager2public float getLayoutAlignmentY(java.awt.Container target)
getLayoutAlignmentY in interface java.awt.LayoutManager2public void invalidateLayout(java.awt.Container target)
invalidateLayout in interface java.awt.LayoutManager2public void layoutContainer(java.awt.Container parent)
layoutContainer in interface java.awt.LayoutManagerpublic java.awt.Dimension minimumLayoutSize(java.awt.Container parent)
minimumLayoutSize in interface java.awt.LayoutManagerpublic java.awt.Dimension maximumLayoutSize(java.awt.Container parent)
maximumLayoutSize in interface java.awt.LayoutManager2public java.awt.Dimension preferredLayoutSize(java.awt.Container parent)
preferredLayoutSize in interface java.awt.LayoutManager

© Copyright 2024 Space Mushrooms
Distributed under GNU General Public License