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
-
BOTH
-
-
HORIZONTAL
-
-
LEFT
-
-
NONE
-
-
RIGHT
-
-
VERTICAL
-
-
PercentLayout()
-
-
PercentLayout(int)
-
-
PercentLayout(int, int)
-
-
PercentLayout(int, int, int)
-
-
PercentLayout(int, int, int, int)
-
-
addLayoutComponent(Component, double)
-
-
addLayoutComponent(Component, Object)
- Adds the specified component to the layout, using the specified
constraint object.
-
addLayoutComponent(String, Component)
- Adds the specified component with the specified name to
the layout.
-
getConstraints(Component)
-
-
getLayoutAlignmentX(Container)
- Returns the alignment along the x axis.
-
getLayoutAlignmentY(Container)
- Returns the alignment along the y axis.
-
invalidateLayout(Container)
- Invalidates the layout, indicating that if the layout manager
has cached information it should be discarded.
-
layoutContainer(Container)
-
Lays out the container in the specified panel.
-
maximumLayoutSize(Container)
-
Returns the maximum size of this component.
-
minimumLayoutSize(Container)
-
Calculates the minimum size dimensions for the specified
panel given the components in the specified parent container.
-
preferredLayoutSize(Container)
- Calculates the preferred size dimensions for the specified
panel given the components in the specified parent container.
-
removeLayoutComponent(Component)
- Removes the specified component from the layout.
-
setConstraints(Component, double)
-
HORIZONTAL
public static final int HORIZONTAL
VERTICAL
public static final int VERTICAL
NONE
public static final int NONE
BOTH
public static final int BOTH
LEFT
public static final int LEFT
RIGHT
public static final int RIGHT
PercentLayout
public PercentLayout()
PercentLayout
public PercentLayout(int direction)
PercentLayout
public PercentLayout(int direction,
int align)
PercentLayout
public PercentLayout(int direction,
int align,
int gap)
PercentLayout
public PercentLayout(int direction,
int align,
int gap,
int fill)
addLayoutComponent
public void addLayoutComponent(Component comp,
double constraints)
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.
setConstraints
public void setConstraints(Component c,
double constraints)
getConstraints
public double getConstraints(Component c)
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.
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.
invalidateLayout
public void invalidateLayout(Container target)
- Invalidates the layout, indicating that if the layout manager
has cached information it should be discarded.
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
removeLayoutComponent
public void removeLayoutComponent(Component comp)
- Removes the specified component from the layout.
- Parameters:
- comp - the component ot be removed
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
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
maximumLayoutSize
public Dimension maximumLayoutSize(Container parent)
- Returns the maximum size of this component.
- See Also:
- getMinimumSize, getPreferredSize, LayoutManager
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