kirk.gui.layout
Class LargestLineLayout
java.lang.Object
|
+--kirk.gui.layout.LineLayout
|
+--kirk.gui.layout.LargestLineLayout
- All Implemented Interfaces:
- LayoutManager
- public class LargestLineLayout
- extends LineLayout
LargestLineLayout extends LineLayout
, and each line has
the same height. This height is determined by the largest preferred height under
all the Component
s.
This class was an accident... I accidentally made it while writing
GridLineLayout
.
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
,
GridLineLayout
Fields inherited from class kirk.gui.layout.LineLayout |
|
Constructor Summary |
LargestLineLayout()
Construct a new LargestLineLayout with the default gap values. |
LargestLineLayout(int verticalgap)
Construct a new LargestLineLayout with the default horizontal
gap value and the specified vertical gap value. |
LargestLineLayout(int horizontalgap,
int verticalgap)
Construct a new LargestLineLayout the specified gap values. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LargestLineLayout
public LargestLineLayout(int horizontalgap,
int verticalgap)
- Construct a new
LargestLineLayout
the specified gap values.
LargestLineLayout
public LargestLineLayout(int verticalgap)
- Construct a new
LargestLineLayout
with the default horizontal
gap value and the specified vertical gap value.
LargestLineLayout
public LargestLineLayout()
- Construct a new
LargestLineLayout
with the default gap values.
preferredLayoutSize
public Dimension preferredLayoutSize(Container parent)
- Returns the preferred size of the container if it get's layed out by this
LayoutManager
.
- Specified by:
preferredLayoutSize
in interface 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 Dimension minimumLayoutSize(Container parent)
- Returns the minimum size of the container if it get's layed out by this
LayoutManager
.
- Specified by:
minimumLayoutSize
in interface 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(Container parent)
- Lays out the given
Container
.
- Specified by:
layoutContainer
in interface 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(Container parent)
- Returns the largest preferred height among the visible components in
parent
.
- Parameters:
parent
- The Container
of which the visible
Component
s are checked.
- Returns:
- The largest preferred height among the visible
Component
s
in parent
.
getLargestMinimumHeight
public int getLargestMinimumHeight(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
Component
s
in parent
.