: Download: FAQ: Licensing: Support: Contact ME
LwVCL Home
Introduction
Overview
Screen Shots
On-line Demos
Requirements
Further Plans
Docs
Tutorial
How-to (PDF)
API
FAQ
Download
Latest version

Home > J2SE > API

Overview  Package   Class  Tree  Deprecated  Index  Help 

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

This is layout manager to place child components according to its percentage constraints.


Constructor Summary
LwPercentLayout()
          Constructs the layout manager.
LwPercentLayout(int dir, int gap)
          Constructs the layout manager with the specified orientation and the given 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 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LwPercentLayout

public LwPercentLayout()
Constructs the layout manager. The LwToolkit.HORIZONTAL orientation will be used. as default.

LwPercentLayout

public LwPercentLayout(int dir,
                       int gap)
Constructs the layout manager with the specified orientation and the given gap. Use one of the following values as the orientation: LwToolkit.HORIZONTAL or LwToolkit.VERTICAL.
Parameters:
dir - the specified orientation.
gap - the specified 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 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.
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 was 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.

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 container insets should not be taken into account.
Specified by:
calcPreferredSize in interface LwLayout
Following copied from interface: org.zaval.lw.LwLayout
Parameters:
target - the layout container.
Returns:
a "pure" preferred size.


: up