public class StackedLayout extends java.lang.Object implements Layout
Constructor and Description |
---|
StackedLayout(Orientation orientation)
Creates a new StackedLayout object with the specified orientation
and default gap between the components.
|
StackedLayout(Orientation orientation,
java.awt.geom.Dimension2D gap)
Creates a new StackedLayout object with the specified orientation
gap between the components.
|
Modifier and Type | Method and Description |
---|---|
java.awt.geom.Dimension2D |
getGap()
Returns the minimal space between components.
|
Orientation |
getOrientation()
Returns whether the components will be laid out horizontally or
vertically.
|
java.awt.geom.Dimension2D |
getPreferredSize(Container container)
Returns the preferred size of the specified container using this layout.
|
void |
layout(Container container)
Arranges the components of the specified container according to this
layout.
|
public StackedLayout(Orientation orientation)
orientation
- Orientation in which components are stacked.public StackedLayout(Orientation orientation, java.awt.geom.Dimension2D gap)
orientation
- Orientation in which components are stacked.gap
- Gap between the components.public void layout(Container container)
public java.awt.geom.Dimension2D getPreferredSize(Container container)
getPreferredSize
in interface Layout
container
- Container whose preferred size is to be returned.public Orientation getOrientation()
public java.awt.geom.Dimension2D getGap()