All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class fr.l2f.gui.PercentLayout

java.lang.Object
   |
   +----fr.l2f.gui.PercentLayout

public class PercentLayout
extends Object
implements LayoutManager2

Variable Index

 o BOTH
 o HORIZONTAL
 o LEFT
 o NONE
 o RIGHT
 o VERTICAL

Constructor Index

 o PercentLayout()
 o PercentLayout(int)
 o PercentLayout(int, int)
 o PercentLayout(int, int, int)
 o PercentLayout(int, int, int, int)

Method Index

 o addLayoutComponent(Component, double)
 o addLayoutComponent(Component, Object)
Adds the specified component to the layout, using the specified constraint object.
 o addLayoutComponent(String, Component)
Adds the specified component with the specified name to the layout.
 o getConstraints(Component)
 o getLayoutAlignmentX(Container)
Returns the alignment along the x axis.
 o getLayoutAlignmentY(Container)
Returns the alignment along the y axis.
 o invalidateLayout(Container)
Invalidates the layout, indicating that if the layout manager has cached information it should be discarded.
 o layoutContainer(Container)
Lays out the container in the specified panel.
 o maximumLayoutSize(Container)
Returns the maximum size of this component.
 o minimumLayoutSize(Container)
Calculates the minimum size dimensions for the specified panel given the components in the specified parent container.
 o preferredLayoutSize(Container)
Calculates the preferred size dimensions for the specified panel given the components in the specified parent container.
 o removeLayoutComponent(Component)
Removes the specified component from the layout.
 o setConstraints(Component, double)

Variables

 o HORIZONTAL
 public static final int HORIZONTAL
 o VERTICAL
 public static final int VERTICAL
 o NONE
 public static final int NONE
 o BOTH
 public static final int BOTH
 o LEFT
 public static final int LEFT
 o RIGHT
 public static final int RIGHT

Constructors

 o PercentLayout
 public PercentLayout()
 o PercentLayout
 public PercentLayout(int direction)
 o PercentLayout
 public PercentLayout(int direction,
                      int align)
 o PercentLayout
 public PercentLayout(int direction,
                      int align,
                      int gap)
 o PercentLayout
 public PercentLayout(int direction,
                      int align,
                      int gap,
                      int fill)

Methods

 o addLayoutComponent
 public void addLayoutComponent(Component comp,
                                double constraints)
 o addLayoutComponent
 public void addLayoutComponent(Component comp,
                                Object constraints)
Adds the specified component to the layout, using the specified constraint object.

Parameters:
comp - the component to be added
constraints - where/how the component is added to the layout.
 o setConstraints
 public void setConstraints(Component c,
                            double constraints)
 o getConstraints
 public double getConstraints(Component c)
 o getLayoutAlignmentX
 public float getLayoutAlignmentX(Container target)
Returns the alignment along the x axis. This specifies how the component would like to be aligned relative to other components. The value should be a number between 0 and 1 where 0 represents alignment along the origin, 1 is aligned the furthest away from the origin, 0.5 is centered, etc.

 o getLayoutAlignmentY
 public float getLayoutAlignmentY(Container target)
Returns the alignment along the y axis. This specifies how the component would like to be aligned relative to other components. The value should be a number between 0 and 1 where 0 represents alignment along the origin, 1 is aligned the furthest away from the origin, 0.5 is centered, etc.

 o invalidateLayout
 public void invalidateLayout(Container target)
Invalidates the layout, indicating that if the layout manager has cached information it should be discarded.

 o addLayoutComponent
 public void addLayoutComponent(String name,
                                Component comp)
Adds the specified component with the specified name to the layout.

Parameters:
name - the component name
comp - the component to be added
 o removeLayoutComponent
 public void removeLayoutComponent(Component comp)
Removes the specified component from the layout.

Parameters:
comp - the component ot be removed
 o preferredLayoutSize
 public Dimension preferredLayoutSize(Container parent)
Calculates the preferred size dimensions for the specified panel given the components in the specified parent container.

Parameters:
parent - the component to be laid out
See Also:
minimumLayoutSize
 o minimumLayoutSize
 public Dimension minimumLayoutSize(Container parent)
Calculates the minimum size dimensions for the specified panel given the components in the specified parent container.

Parameters:
parent - the component to be laid out
See Also:
preferredLayoutSize
 o maximumLayoutSize
 public Dimension maximumLayoutSize(Container parent)
Returns the maximum size of this component.

See Also:
getMinimumSize, getPreferredSize, LayoutManager
 o layoutContainer
 public void layoutContainer(Container parent)
Lays out the container in the specified panel.

Parameters:
parent - the component which needs to be laid out

All Packages  Class Hierarchy  This Package  Previous  Next  Index