de.erichseifert.gral.graphics.layout
Class StackedLayout
- java.lang.Object
-
- de.erichseifert.gral.graphics.layout.AbstractLayout
-
- de.erichseifert.gral.graphics.layout.AbstractOrientedLayout
-
- de.erichseifert.gral.graphics.layout.StackedLayout
-
- All Implemented Interfaces:
- Layout, OrientedLayout, java.io.Serializable
public class StackedLayout extends AbstractOrientedLayout
Class that represents a layout manager which arranges its components as horizontal or vertical stacks.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static classStackedLayout.Constraints
-
Constructor Summary
Constructors Constructor and Description StackedLayout(Orientation orientation)Creates a new StackedLayout object with the specified orientation and default gap between the components.StackedLayout(Orientation orientation, double gapX, double gapY)Creates a new StackedLayout object with the specified orientation and gap between the components.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description java.awt.geom.Dimension2DgetPreferredSize(Container container)Returns the preferred size of the specified container using this layout.voidlayout(Container container)Arranges the components of the specified container according to this layout.-
Methods inherited from class de.erichseifert.gral.graphics.layout.AbstractOrientedLayout
getOrientation, setOrientation
-
Methods inherited from class de.erichseifert.gral.graphics.layout.AbstractLayout
getGapX, getGapY, setGapX, setGapY
-
-
-
-
Constructor Detail
-
StackedLayout
public StackedLayout(Orientation orientation)
Creates a new StackedLayout object with the specified orientation and default gap between the components.- Parameters:
orientation- Orientation in which components are stacked.
-
StackedLayout
public StackedLayout(Orientation orientation, double gapX, double gapY)
Creates a new StackedLayout object with the specified orientation and gap between the components.- Parameters:
orientation- Orientation in which components are stacked.gapX- Horizontal gap between the components.gapY- Vertical gap between the components.
-
-
Method Detail
-
layout
public void layout(Container container)
Arranges the components of the specified container according to this layout.- Parameters:
container- Container to be laid out.
-
getPreferredSize
public java.awt.geom.Dimension2D getPreferredSize(Container container)
Returns the preferred size of the specified container using this layout.- Parameters:
container- Container whose preferred size is to be returned.- Returns:
- Preferred extent of the specified container.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG