public final class AspectLayout extends Object implements LayoutManager
| Constructor and Description |
|---|
AspectLayout(double aspect)
Creates a new AspectLayout for the given aspect.
|
AspectLayout(double aspect,
double alignment)
Creates a new AspectLayout for the given aspect and alignment.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addLayoutComponent(String name,
Component comp) |
void |
layoutContainer(Container parent) |
Dimension |
minimumLayoutSize(Container parent) |
Dimension |
preferredLayoutSize(Container parent) |
void |
removeLayoutComponent(Component comp) |
String |
toString() |
public AspectLayout(double aspect)
AspectLayout(double, double)
with an alignment of 0.5.aspect - The aspect for the contained componentpublic AspectLayout(double aspect,
double alignment)
aspect - The aspect for the contained componentalignment - The alignment for the contained componentpublic void layoutContainer(Container parent)
layoutContainer in interface LayoutManagerpublic Dimension minimumLayoutSize(Container parent)
minimumLayoutSize in interface LayoutManagerpublic Dimension preferredLayoutSize(Container parent)
preferredLayoutSize in interface LayoutManagerpublic void addLayoutComponent(String name, Component comp)
addLayoutComponent in interface LayoutManagerpublic void removeLayoutComponent(Component comp)
removeLayoutComponent in interface LayoutManagerCopyright © 2022. All rights reserved.