org.zaval.lw
Class LwPercentLayout

java.lang.Object
  |
  +--org.zaval.lw.LwPercentLayout
All Implemented Interfaces:
LwLayout

public class LwPercentLayout
extends java.lang.Object
implements LwLayout


Constructor Summary
LwPercentLayout()
           
LwPercentLayout(int dir, int gap)
           
 
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LwPercentLayout

public LwPercentLayout()

LwPercentLayout

public LwPercentLayout(int dir,
                       int gap)
Method Detail

componentAdded

public void componentAdded(java.lang.Object id,
                           Layoutable lw,
                           int index)
Description copied from interface: LwLayout
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.
Specified by:
componentAdded in interface LwLayout
Following copied from interface: org.zaval.lw.LwLayout
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)
Description copied from interface: LwLayout
Invoked when the specified layoutable component is removed from the layout container, that uses the layout manager.
Specified by:
componentRemoved in interface LwLayout
Following copied from interface: org.zaval.lw.LwLayout
Parameters:
lw - the layoutable component that has been removed.
index - the child component index.

layout

public void layout(LayoutContainer target)
Description copied from interface: LwLayout
Lays out the child layoutable components inside the layout container.
Specified by:
layout in interface LwLayout
Following copied from interface: org.zaval.lw.LwLayout
Parameters:
target - the layout container that needs to be laid out.

calcPreferredSize

public java.awt.Dimension calcPreferredSize(LayoutContainer target)
Description copied from interface: LwLayout
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.
Specified by:
calcPreferredSize in interface LwLayout
Following copied from interface: org.zaval.lw.LwLayout
Parameters:
target - the layout container.
Returns:
a "pure" preferred size.


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