de.hedenus.mobilegui
Class CenterLayout
java.lang.Object
de.hedenus.mobilegui.CenterLayout
- All Implemented Interfaces:
- java.awt.LayoutManager
public class CenterLayout
- extends java.lang.Object
- implements java.awt.LayoutManager
Centers all components in the middle of the parent container. The components will
be sized to their preferred size.
If the containers has more than one child, the children are painted on top of each other.
This layout manager is especially useful for centering a panel within other panel.
- Author:
- Michael Hedenus
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CenterLayout
public CenterLayout()
addLayoutComponent
public void addLayoutComponent(java.lang.String constraint,
java.awt.Component comp)
- Specified by:
addLayoutComponent
in interface java.awt.LayoutManager
layoutContainer
public void layoutContainer(java.awt.Container parent)
- Specified by:
layoutContainer
in interface java.awt.LayoutManager
minimumLayoutSize
public java.awt.Dimension minimumLayoutSize(java.awt.Container parent)
- Specified by:
minimumLayoutSize
in interface java.awt.LayoutManager
preferredLayoutSize
public java.awt.Dimension preferredLayoutSize(java.awt.Container parent)
- Specified by:
preferredLayoutSize
in interface java.awt.LayoutManager
removeLayoutComponent
public void removeLayoutComponent(java.awt.Component comp)
- Specified by:
removeLayoutComponent
in interface java.awt.LayoutManager