uk.co.ist.mwt
Class TightPackedRCLayout

java.lang.Object
  |
  +--uk.co.ist.mwt.MarginLayoutManager
        |
        +--uk.co.ist.mwt.RowColLayout
              |
              +--uk.co.ist.mwt.TightPackedRCLayout

public class TightPackedRCLayout
extends RowColLayout

This layout manager (when attached to a Container) mimics the behaviour of a Motif XmRowColumn with XmNpacking set to XmPACK_TIGHT.

Irritatingly enough, a Motif XmRowColumn does with packing set to XmPACK_TIGHT does not quite map to a FlowLayout. Firstly, it can lay components out horizontally or vertically, and secondly, it can adjust the last column (row if horizontal) to fill all of the extra space horizontally (vertically).

See Also:
Serialized Form

Fields inherited from class uk.co.ist.mwt.RowColLayout
adjustLast, vertical
 
Fields inherited from class uk.co.ist.mwt.MarginLayoutManager
marginHeight, marginWidth
 
Constructor Summary
TightPackedRCLayout()
           
 
Method Summary
 void layoutContainer(java.awt.Container parent)
          Lays out the container.
protected  java.awt.Dimension layoutSize(java.awt.Container parent, boolean minimum)
          Method to find out the size of a parent container with this layout
 
Methods inherited from class uk.co.ist.mwt.RowColLayout
addLayoutComponent, getAdjustLast, getVertical, minimumLayoutSize, preferredLayoutSize, removeLayoutComponent, setAdjustLast, setVertical
 
Methods inherited from class uk.co.ist.mwt.MarginLayoutManager
getMarginHeight, getMarginWidth, setMarginHeight, setMarginWidth, sizeOfComponent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TightPackedRCLayout

public TightPackedRCLayout()
Method Detail

layoutContainer

public void layoutContainer(java.awt.Container parent)
Lays out the container.
Overrides:
layoutContainer in class MarginLayoutManager
Parameters:
parent - the component which needs to be laid out

layoutSize

protected java.awt.Dimension layoutSize(java.awt.Container parent,
                                        boolean minimum)
Method to find out the size of a parent container with this layout
Overrides:
layoutSize in class RowColLayout
Parameters:
parent - the parent container
minimum - true if we want the minimum size, false if we want the preferred size
See Also:
RowColLayout.minimumLayoutSize(java.awt.Container), RowColLayout.preferredLayoutSize(java.awt.Container)