de.erichseifert.gral.graphics.layout
Class TableLayout
- java.lang.Object
-
- de.erichseifert.gral.graphics.layout.AbstractLayout
-
- de.erichseifert.gral.graphics.layout.TableLayout
-
- All Implemented Interfaces:
- Layout, java.io.Serializable
public class TableLayout extends AbstractLayout
Implementation of Layout that arranges aContainer's components according to a tabular grid with a fixed number of columns. This is similar to Java'sGridLayout, but the cells in the grid may have different dimensions.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description TableLayout(int cols)Initializes a layout manager object with the specified number of columns and no gap between the components.TableLayout(int cols, double gapH, double gapV)Initializes a layout manager object with the specified number of columns and the distances between the components.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description intgetColumns()Returns the number of desired columns.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.AbstractLayout
getGapX, getGapY, setGapX, setGapY
-
-
-
-
Constructor Detail
-
TableLayout
public TableLayout(int cols, double gapH, double gapV)Initializes a layout manager object with the specified number of columns and the distances between the components.- Parameters:
cols- Number of columnsgapH- Horizontal gap.gapV- Vertical gap.
-
TableLayout
public TableLayout(int cols)
Initializes a layout manager object with the specified number of columns and no gap between the components.- Parameters:
cols- Number of columns.
-
-
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.
-
getColumns
public int getColumns()
Returns the number of desired columns.- Returns:
- Number of desired columns.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG