uk.co.ist.mwt
Class SelectionBoxLayout

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

public class SelectionBoxLayout
extends MarginLayoutManager

The XmSelectionBox and derived widgets have an unusual kind of layout behaviour; all components resize to fill the full width of the container, and one designated component (the list box, in most cases) takes up any extra vertical space.

See Also:
Serialized Form

Fields inherited from class uk.co.ist.mwt.MarginLayoutManager
marginHeight, marginWidth
 
Constructor Summary
SelectionBoxLayout()
           
 
Method Summary
 void addLayoutComponent(java.lang.String name, java.awt.Component comp)
          Add a component to the layout manager's records.
 java.awt.Component getResizingComponent()
          Accessor to get the component which gets the extra space on resize vertically
 void layoutContainer(java.awt.Container parent)
          Lays out the container.
 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 setResizingComponent(java.awt.Component c)
          Accessor to set the component which gets the extra space on resize vertically
 
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

SelectionBoxLayout

public SelectionBoxLayout()
Method Detail

setResizingComponent

public void setResizingComponent(java.awt.Component c)
Accessor to set the component which gets the extra space on resize vertically

getResizingComponent

public java.awt.Component getResizingComponent()
Accessor to get the component which gets the extra space on resize vertically

layoutContainer

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

minimumLayoutSize

public java.awt.Dimension minimumLayoutSize(java.awt.Container parent)
Method to find the minimum size of the parent container with this layout
Overrides:
minimumLayoutSize in class MarginLayoutManager
Tags copied from class: MarginLayoutManager
Parameters:
parent - the component to be laid out
See Also:
MarginLayoutManager.preferredLayoutSize(java.awt.Container)

preferredLayoutSize

public java.awt.Dimension preferredLayoutSize(java.awt.Container parent)
Method to find the preferred size of the parent container with this layout
Overrides:
preferredLayoutSize in class MarginLayoutManager
Tags copied from class: MarginLayoutManager
Parameters:
parent - the component to be laid out
See Also:
MarginLayoutManager.minimumLayoutSize(java.awt.Container)

removeLayoutComponent

public void removeLayoutComponent(java.awt.Component comp)
Remove a component from the layout manager's records.
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.
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)