uk.co.ist.mwt
Class RowColLayout

java.lang.Object
  |
  +--uk.co.ist.mwt.MarginLayoutManager
        |
        +--uk.co.ist.mwt.RowColLayout
Direct Known Subclasses:
ColumnPackedRCLayout, TightPackedRCLayout

public abstract class RowColLayout
extends MarginLayoutManager

This layout manager is the base class for both types of RowColumn emulation; the tightly-packed one, TightPackedRCLayout, and the column-packed one, ColumnPackedRCLayout.

See Also:
Serialized Form

Field Summary
protected  boolean adjustLast
          Should we adjust the last column (row if horizontal) to fit whatever space is left after having placed all of the other columns/rows?
protected  boolean vertical
          Is this layout meant to be vertical? Or horizontal?
 
Fields inherited from class uk.co.ist.mwt.MarginLayoutManager
marginHeight, marginWidth
 
Constructor Summary
RowColLayout()
           
 
Method Summary
 void addLayoutComponent(java.lang.String name, java.awt.Component comp)
          Add a component to the layout manager's records.
 boolean getAdjustLast()
          Get accessor for the 'adjust last' flag, which determines whether the last column (row if horizontal) is resized in width (height) to take advantage of any extra space remaining when the other columns (rows) have been laid out
 boolean getVertical()
          Get accessor for the 'vertical' flag.
protected abstract  java.awt.Dimension layoutSize(java.awt.Container parent, boolean minimum)
          Method to find out the size of a parent container with this layout
 java.awt.Dimension minimumLayoutSize(java.awt.Container parent)
          Method to find the minimum size of the parent container with this layout.
 java.awt.Dimension preferredLayoutSize(java.awt.Container parent)
          Method to find the preferred size of the parent container with this layout.
 void removeLayoutComponent(java.awt.Component comp)
          Remove a component from the layout manager's records.
 void setAdjustLast(boolean adjust)
          Set accessor for the 'adjust last' flag, which determines whether the last column (row if horizontal) is resized in width (height) to take advantage of any extra space remaining when the other columns (rows) have been laid out
 void setVertical(boolean vert)
          Set accessor for the 'vertical' flag.
 
Methods inherited from class uk.co.ist.mwt.MarginLayoutManager
getMarginHeight, getMarginWidth, layoutContainer, setMarginHeight, setMarginWidth, sizeOfComponent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

adjustLast

protected boolean adjustLast
Should we adjust the last column (row if horizontal) to fit whatever space is left after having placed all of the other columns/rows?

vertical

protected boolean vertical
Is this layout meant to be vertical? Or horizontal?
Constructor Detail

RowColLayout

public RowColLayout()
Method Detail

setAdjustLast

public void setAdjustLast(boolean adjust)
Set accessor for the 'adjust last' flag, which determines whether the last column (row if horizontal) is resized in width (height) to take advantage of any extra space remaining when the other columns (rows) have been laid out
Parameters:
adjust - the new value for the flag
See Also:
getAdjustLast(), setVertical(boolean)

getAdjustLast

public boolean getAdjustLast()
Get accessor for the 'adjust last' flag, which determines whether the last column (row if horizontal) is resized in width (height) to take advantage of any extra space remaining when the other columns (rows) have been laid out
See Also:
setAdjustLast(boolean), setVertical(boolean)

setVertical

public void setVertical(boolean vert)
Set accessor for the 'vertical' flag. If a layout is told to make itself vertical, the numColumns attribute refers to the number of columns desired; if it is told to be horizontal, it refers to the number of rows. Many other attributes (qv.) rely on this.
Parameters:
vert - true if the new layout should be vertical, false if it should be horizontal
See Also:
getVertical()

getVertical

public boolean getVertical()
Get accessor for the 'vertical' flag. If a layout is told to make itself vertical, the numColumns attribute refers to the number of columns desired; if it is told to be horizontal, it refers to the number of rows. Many other attributes (qv.) rely on this.
See Also:
setVertical(boolean)

layoutSize

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

minimumLayoutSize

public java.awt.Dimension minimumLayoutSize(java.awt.Container parent)
Method to find the minimum size of the parent container with this layout. Identical to preferredLayoutSize apart from the size for which it asks the children.
Overrides:
minimumLayoutSize in class MarginLayoutManager
Parameters:
parent - the component to be laid out
See Also:
preferredLayoutSize(java.awt.Container), layoutSize(java.awt.Container, boolean)

preferredLayoutSize

public java.awt.Dimension preferredLayoutSize(java.awt.Container parent)
Method to find the preferred size of the parent container with this layout. Identical to minimumLayoutSize apart from the size for which it asks the children.
Overrides:
preferredLayoutSize in class MarginLayoutManager
Parameters:
parent - the component to be laid out
See Also:
minimumLayoutSize(java.awt.Container), layoutSize(java.awt.Container, boolean)

removeLayoutComponent

public void removeLayoutComponent(java.awt.Component comp)
Remove a component from the layout manager's records. This is unused by RowColumns, so is implemented empty here.
Overrides:
removeLayoutComponent in class MarginLayoutManager
Parameters:
comp - would be the component to remove.
See Also:
addLayoutComponent(java.lang.String, java.awt.Component)

addLayoutComponent

public void addLayoutComponent(java.lang.String name,
                               java.awt.Component comp)
Add a component to the layout manager's records. This is unused by RowColumns, so is implemented empty here.
Overrides:
addLayoutComponent in class MarginLayoutManager
Parameters:
comp - would be the component to add.
name - would be the name with which to add the component.
See Also:
removeLayoutComponent(java.awt.Component)