org.freehep.swing.layout
Class PercentLayout
java.lang.Object
org.freehep.swing.layout.PercentLayout
- All Implemented Interfaces:
- LayoutManager, LayoutManager2
public class PercentLayout
- extends Object
- implements LayoutManager2
Lays out components within a Container such that each component takes a fixed percentage of the size.
Each Component added to the Container must have a Constraint object that specifies what proportion
of the container it will fill. The Component will be stretched to fill exactly that percentage.
- See Also:
PercentLayout.Constraint
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PercentLayout
public PercentLayout()
getLayoutAlignmentX
public float getLayoutAlignmentX(Container p1)
- Specified by:
getLayoutAlignmentX
in interface LayoutManager2
getLayoutAlignmentY
public float getLayoutAlignmentY(Container p1)
- Specified by:
getLayoutAlignmentY
in interface LayoutManager2
addLayoutComponent
public void addLayoutComponent(Component component,
Object constraint)
- Specified by:
addLayoutComponent
in interface LayoutManager2
addLayoutComponent
public void addLayoutComponent(String constraint,
Component comp)
- Specified by:
addLayoutComponent
in interface LayoutManager
invalidateLayout
public void invalidateLayout(Container p1)
- Specified by:
invalidateLayout
in interface LayoutManager2
layoutContainer
public void layoutContainer(Container p1)
- Specified by:
layoutContainer
in interface LayoutManager
maximumLayoutSize
public Dimension maximumLayoutSize(Container p1)
- Specified by:
maximumLayoutSize
in interface LayoutManager2
minimumLayoutSize
public Dimension minimumLayoutSize(Container p1)
- Specified by:
minimumLayoutSize
in interface LayoutManager
preferredLayoutSize
public Dimension preferredLayoutSize(Container p1)
- Specified by:
preferredLayoutSize
in interface LayoutManager
removeLayoutComponent
public void removeLayoutComponent(Component component)
- Specified by:
removeLayoutComponent
in interface LayoutManager
getConstraintFor
public PercentLayout.Constraint getConstraintFor(Component component)
Copyright © 2000-2007 FreeHEP. All Rights Reserved.