kirk.gui.layout
Class GridLineLayout
java.lang.Object
|
+--kirk.gui.layout.LineLayout
|
+--kirk.gui.layout.GridLineLayout
- All Implemented Interfaces:
- java.awt.LayoutManager
- public class GridLineLayout
- extends LineLayout
GridLineLayout
extends LineLayout
, and each line is
vertically treated like with GridLayout
: The size is proportional to
the maximum size of the Container using this
LayoutManager
, depending on how many lines there are.
Use this class if you want to line up multiple LineLayouts
in a
resizable Window
where the Component
s are relatively
placed. Or something.
Note that Component
s will have their preferred height, but with a
maximum of the line height. They will also be vertically centered in their line.
- Version:
- 1
- Author:
- Berend "Kirk" Wouda
- See Also:
LineLayout
,
VariableLineLayout
,
FixedLineLayout
,
LargestLineLayout
Fields inherited from class kirk.gui.layout.LineLayout |
|
Constructor Summary |
GridLineLayout()
Construct a new GridLineLayout with the default gap values. |
GridLineLayout(int verticalgap)
Construct a new GridLineLayout with the default horizontal gap
value and the specified vertical gap value. |
GridLineLayout(int horizontalgap,
int verticalgap)
Construct a new GridLineLayout with the specified gap values. |
Method Summary |
int |
getLargestMinimumHeight(java.awt.Container parent)
Returns the largest minimum height among the visible Component s
in parent . |
int |
getLargestPreferredHeight(java.awt.Container parent)
Returns the largest preferred height among the visible Component s
in parent . |
void |
layoutContainer(java.awt.Container parent)
Lays out the given Container. |
java.awt.Dimension |
minimumLayoutSize(java.awt.Container parent)
Returns the minimum size of the Container if it get's layed out
by this LayoutManager . |
java.awt.Dimension |
preferredLayoutSize(java.awt.Container parent)
Returns the preferred size of the Container if it get's layed out
by this LayoutManager . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GridLineLayout
public GridLineLayout(int horizontalgap,
int verticalgap)
- Construct a new
GridLineLayout
with the specified gap values.
GridLineLayout
public GridLineLayout(int verticalgap)
- Construct a new
GridLineLayout
with the default horizontal gap
value and the specified vertical gap value.
GridLineLayout
public GridLineLayout()
- Construct a new
GridLineLayout
with the default gap values.
preferredLayoutSize
public java.awt.Dimension preferredLayoutSize(java.awt.Container parent)
- Returns the preferred size of the
Container
if it get's layed out
by this LayoutManager
.
- Specified by:
preferredLayoutSize
in interface java.awt.LayoutManager
- Specified by:
preferredLayoutSize
in class LineLayout
- Parameters:
parent
- The Container
that the preferred size is wanted of.- See Also:
LineLayout.preferredLayoutSize(java.awt.Container)
,
LayoutManager.preferredLayoutSize(java.awt.Container)
minimumLayoutSize
public java.awt.Dimension minimumLayoutSize(java.awt.Container parent)
- Returns the minimum size of the
Container
if it get's layed out
by this LayoutManager
.
- Specified by:
minimumLayoutSize
in interface java.awt.LayoutManager
- Specified by:
minimumLayoutSize
in class LineLayout
- Parameters:
parent
- The Container
that the minimum size is wanted of.- See Also:
LineLayout.minimumLayoutSize(java.awt.Container)
,
LayoutManager.minimumLayoutSize(java.awt.Container)
layoutContainer
public void layoutContainer(java.awt.Container parent)
- Lays out the given
Container.
- Specified by:
layoutContainer
in interface java.awt.LayoutManager
- Specified by:
layoutContainer
in class LineLayout
- Parameters:
parent
- The Container
to be layed out.- See Also:
LineLayout.layoutContainer(java.awt.Container)
,
LayoutManager.layoutContainer(java.awt.Container)
getLargestPreferredHeight
public int getLargestPreferredHeight(java.awt.Container parent)
- Returns the largest preferred height among the visible
Component
s
in parent
.
- Parameters:
parent
- The Container
of which the visible
Component
s are checked.
- Returns:
- The largest preferred height among the visible
Components
in parent
.
getLargestMinimumHeight
public int getLargestMinimumHeight(java.awt.Container parent)
- Returns the largest minimum height among the visible
Component
s
in parent
.
- Parameters:
parent
- The Container
of which the visible
Component
s are checked.
- Returns:
- The largest minimum height among the visible
Components
in parent
.