org.universAAL.ui.handler.gui.swing.defaultLookAndFeel.Layout
Class GridUnitLayout
java.lang.Object
org.universAAL.ui.handler.gui.swing.defaultLookAndFeel.Layout.AbstractUnitLayout
org.universAAL.ui.handler.gui.swing.defaultLookAndFeel.Layout.GridUnitLayout
- All Implemented Interfaces:
- LayoutManager
public class GridUnitLayout
- extends AbstractUnitLayout
- implements LayoutManager
"Initize" container, then apply Grid layout.
the layout will scale units (Jcomponents+their labels) of each cell according to the maximum width of all units in the same column,
and to the maximum height of all units of the same row (preferred in both cases).
Then the proportion is maintained so the grid fills the available spare space.
- Author:
- amedrano
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GridUnitLayout
public GridUnitLayout(int gap,
int cols)
- Parameters:
gap
- cols
- rows
-
preferredLayoutSize
public Dimension preferredLayoutSize(Container parent)
-
- Specified by:
preferredLayoutSize
in interface LayoutManager
- Specified by:
preferredLayoutSize
in class AbstractUnitLayout
layoutContainer
public void layoutContainer(Container parent)
-
- Specified by:
layoutContainer
in interface LayoutManager
- Specified by:
layoutContainer
in class AbstractUnitLayout
minimumLayoutSize
public Dimension minimumLayoutSize(Container parent)
-
- Specified by:
minimumLayoutSize
in interface LayoutManager
- Specified by:
minimumLayoutSize
in class AbstractUnitLayout
removeLayoutComponent
public void removeLayoutComponent(Component comp)
-
- Specified by:
removeLayoutComponent
in interface LayoutManager
- Specified by:
removeLayoutComponent
in class AbstractUnitLayout
addLayoutComponent
public void addLayoutComponent(String name,
Component comp)
-
- Specified by:
addLayoutComponent
in interface LayoutManager
- Specified by:
addLayoutComponent
in class AbstractUnitLayout
Copyright © 2014 universAAL Consortium. All Rights Reserved.