Class | Tree | Deprecated | Index | Help
PREV CLASS | NEXT CLASS FRAMES  | NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD

Class uk.co.ist.mwt.PanedWindowLayout

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

public class PanedWindowLayout
extends MarginLayoutManager
A PanedWindowLayout splits itself vertically, with each of its children taking up the whole width of the parent container, and a portion of its height. The children are separated by separators. The height of each child can be dynamically changed by the user. Each child's position and other details can be specified in a PanedWindowConstraints object using layout.constrain(); if this is not called, ot a null constrains is used, a default set of constraints are used.


Method Summary
void addLayoutComponent(java.lang.String name, java.awt.Component comp)
          Add a component to the layout manager's records.
void constrain(java.awt.Component comp, PanedWindowConstraints constr)
          Add a set of constraints to one of the children in the layout; if the child has not yet been added, throw the constraints away (as the child must have been added to the container before we can safely add it here.
void doLayout(java.awt.Container parent)
          Wrapper for the doLayout with more parameters; calculates the missing parameters from the parent.
boolean getSeparatorsOn()
          Finds out whether or not this layout puts separators between the components it is laying out.
void layoutContainer(java.awt.Container parent)
          Lays out the container.
java.awt.Dimension minimumLayoutSize(java.awt.Container parent)
          Finds out the minimum size this layout needs in the given parent
java.awt.Dimension preferredLayoutSize(java.awt.Container parent)
          Finds out the preferred size this layout wants in the given parent
void removeLayoutComponent(java.awt.Component comp)
          Remove a component from the layout manager's records.
void setSeparatorsOnIf(boolean whether)
          Sets whether or not this layout puts separators between the components it is laying out.
Sorter sortedChildren(java.awt.Container parent)
          Sorts the children into the order of their position indices
 
Methods inherited from class uk.co.ist.mwt.MarginLayoutManager
addLayoutComponent, getMarginHeight, getMarginWidth, layoutContainer, minimumLayoutSize, preferredLayoutSize, removeLayoutComponent, setMarginHeight, setMarginWidth
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notifyAll, notify, toString, wait, wait, wait
 

Method Detail

constrain

public void constrain(java.awt.Component comp,
                      PanedWindowConstraints constr)
Add a set of constraints to one of the children in the layout; if the child has not yet been added, throw the constraints away (as the child must have been added to the container before we can safely add it here.

sortedChildren

public Sorter sortedChildren(java.awt.Container parent)
Sorts the children into the order of their position indices
Parameters:
parent - the container of these children

doLayout

public void doLayout(java.awt.Container parent)
Wrapper for the doLayout with more parameters; calculates the missing parameters from the parent.

layoutContainer

public void layoutContainer(java.awt.Container parent)
Lays out the container.
Overrides:
layoutContainer in class MarginLayoutManager

minimumLayoutSize

public java.awt.Dimension minimumLayoutSize(java.awt.Container parent)
Finds out the minimum size this layout needs in the given parent
Overrides:
minimumLayoutSize in class MarginLayoutManager

preferredLayoutSize

public java.awt.Dimension preferredLayoutSize(java.awt.Container parent)
Finds out the preferred size this layout wants in the given parent
Overrides:
preferredLayoutSize in class MarginLayoutManager

removeLayoutComponent

public void removeLayoutComponent(java.awt.Component comp)
Remove a component from the layout manager's records. Because we do not associate any extra contraints-type information with a component, its name included, we do not keep an internal list of the components we are meant to be laying out; instead, like the Flow- and GridLayout classes, we construct a new list of Components to lay out each time we are asked to do so. So, removeLayoutComponent is not used.
Parameters:
comp - would be the component to remove.
Overrides:
removeLayoutComponent in class MarginLayoutManager
See Also:
addLayoutComponent

addLayoutComponent

public void addLayoutComponent(java.lang.String name,
                               java.awt.Component comp)
Add a component to the layout manager's records. Because we do not associate any extra contraints-type information with a component, its name included, we do not keep an internal list of the components we are meant to be laying out; instead, like the Flow- and GridLayout classes, we construct a new list of Components to lay out each time we are asked to do so. So, addLayoutComponent is not used.
Parameters:
comp - would be the component to add.
name - would be the name with which to add the component.
Overrides:
addLayoutComponent in class MarginLayoutManager
See Also:
removeLayoutComponent

setSeparatorsOnIf

public void setSeparatorsOnIf(boolean whether)
Sets whether or not this layout puts separators between the components it is laying out.

getSeparatorsOn

public boolean getSeparatorsOn()
Finds out whether or not this layout puts separators between the components it is laying out.

Class | Tree | Deprecated | Index | Help
PREV CLASS | NEXT CLASS FRAMES  | NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD