org.zaval.lw
Interface LwLayout

All Known Implementing Classes:
LwBorderPan, LwGridLayout, LwListLayout, LwNotebook, LwPercentLayout, LwRasterLayout, LwRoot, LwScrollPan, LwSpin, LwSplitPan, LwBorderLayout, LwFlowLayout, LwWinLayer, 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 is added to the layout container (that uses the layout manager).
 void componentRemoved(Layoutable lw, int index)
          Invoked when the specified layoutable component is removed from the layout container, that uses the layout manager.
 void layout(LayoutContainer target)
          Lays out the child layoutable components inside the layout container.
 

Method Detail

componentAdded

public void componentAdded(java.lang.Object id,
                           Layoutable lw,
                           int index)
Invoked when the specified layoutable component is 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 is 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 an insets of the container should not be considered.
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 that needs to be laid out.


Copyright © Zaval Creative Engineering Group, 2000-2005.
http://www.zaval.org