org.zaval.lw
Interface LwLayout
- All Known Implementing Classes:
- J2SEDesktop, LwBorderPan, LwGridLayout, LwListLayout, LwMenu, LwNotebook, LwPercentLayout, LwPopupLayer, LwRasterLayout, LwScroll, LwScrollPan, LwSpin, LwSplitPan, LwBorderLayout, LwFlowLayout, LwWinLayer, LwExtender, LwGrid
- public interface LwLayout
Defines the interface for classes that know how to layout Layoutable components
inside a LayoutContainer container.
|
Method Summary |
java.awt.Dimension |
calcPreferredSize(LayoutContainer target)
Calculates the preferred size dimension for the layout container.
|
void |
componentAdded(java.lang.Object id,
Layoutable lw,
int index)
Invoked when the specified layoutable component was added to the layout container
(that uses the layout manager). |
void |
componentRemoved(Layoutable lw,
int index)
Invoked when the specified layoutable component was removed from the layout
container, that uses the layout manager. |
void |
layout(LayoutContainer target)
Lays out the child layoutable components inside the layout container. |
componentAdded
public void componentAdded(java.lang.Object id,
Layoutable lw,
int index)
- Invoked when the specified layoutable component was added to the layout container
(that uses the layout manager). The specified constraints, layoutable component
and child index are passed as arguments into the method.
- Parameters:
id - the layoutable component constraints.lw - the layoutable component that has been added.index - the child index.
componentRemoved
public void componentRemoved(Layoutable lw,
int index)
- Invoked when the specified layoutable component was removed from the layout
container, that uses the layout manager.
- Parameters:
lw - the layoutable component that has been removed.index - the child component index.
calcPreferredSize
public java.awt.Dimension calcPreferredSize(LayoutContainer target)
- Calculates the preferred size dimension for the layout container.
The method has to calculate "pure" preferred size, it means that container insets
should not be taken into account.
- Parameters:
target - the layout container.- Returns:
- a "pure" preferred size.
layout
public void layout(LayoutContainer target)
- Lays out the child layoutable components inside the layout container.
- Parameters:
target - the layout container.
|