com.jmex.bui.layout
Class BLayoutManager

java.lang.Object
  extended by com.jmex.bui.layout.BLayoutManager
Direct Known Subclasses:
AbsoluteLayout, BorderLayout, GroupLayout, TableLayout

public abstract class BLayoutManager
extends Object

Layout managers implement a policy for laying out the children in a container. They must provide routines for computing the preferred size of a target container and for actually laying out its children.


Constructor Summary
BLayoutManager()
           
 
Method Summary
 void addLayoutComponent(BComponent comp, Object constraints)
          Components added to a container will result in a call to this method, informing the layout manager of said constraints.
abstract  Dimension computePreferredSize(BContainer target, int whint, int hhint)
          Computes the preferred size for the supplied container, based on the preferred sizes of its children and the layout policy implemented by this manager.
abstract  void layoutContainer(BContainer target)
          Effects the layout policy of this manager on the supplied target, adjusting the size and position of its children based on the size and position of the target at the time of this call.
 void removeLayoutComponent(BComponent comp)
          Components removed to a container for which a layout manager has been configured will result in a call to this method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BLayoutManager

public BLayoutManager()
Method Detail

addLayoutComponent

public void addLayoutComponent(BComponent comp,
                               Object constraints)
Components added to a container will result in a call to this method, informing the layout manager of said constraints. The default implementation does nothing.


removeLayoutComponent

public void removeLayoutComponent(BComponent comp)
Components removed to a container for which a layout manager has been configured will result in a call to this method. The default implementation does nothing.


computePreferredSize

public abstract Dimension computePreferredSize(BContainer target,
                                               int whint,
                                               int hhint)
Computes the preferred size for the supplied container, based on the preferred sizes of its children and the layout policy implemented by this manager. Note: it is not necessary to add the container's insets to the returned preferred size.


layoutContainer

public abstract void layoutContainer(BContainer target)
Effects the layout policy of this manager on the supplied target, adjusting the size and position of its children based on the size and position of the target at the time of this call. Note: the target's insets must be accounted for when laying out the children.



Copyright © 2008 Michael Bayne. All Rights Reserved.