Class TextFrameLayout

java.lang.Object
   |
   +----ButtonLayout
           |
           +----TextFrameLayout

public class TextFrameLayout
extends ButtonLayout
implements LayoutManager
Handles the layout of the a frame with a large text box and optional buttons at the bottom.

Author:
Peter Sagerson, petersag@wpi.edu

Variable Index

 o bottomButtons
 o box
The TextArea component.
 o boxheight
 o boxtop
 o boxwidth
 o MIN_BOX_HEIGHT
 o MIN_BOX_WIDTH
 o topButtons

Constructor Index

 o TextFrameLayout(int, int)

Method Index

 o addLayoutComponent(String, Component)
 o calcDimensions(Container)
Calculates the dimensions for the window margins and info box.
 o layoutContainer(Container)
Lays out the components in the frame.
 o minimumLayoutSize(Container)
Returns the minimum frame dimensions.
 o preferredLayoutSize(Container)
Returns the preferred dimensions for the support frame: 450x300.
 o removeLayoutComponent(Component)

Variables

 o MIN_BOX_HEIGHT
 private static final int MIN_BOX_HEIGHT
 o MIN_BOX_WIDTH
 private static final int MIN_BOX_WIDTH
 o box
 Component box
The TextArea component.

 o boxtop
 int boxtop
 o boxwidth
 int boxwidth
 o boxheight
 int boxheight
 o topButtons
 boolean topButtons
 o bottomButtons
 boolean bottomButtons

Constructors

 o TextFrameLayout
 TextFrameLayout(int top,
                 int bottom)
Parameters:
numButtons - the number of buttons that will be added.

Methods

 o addLayoutComponent
 public void addLayoutComponent(String name,
                                Component c)
 o removeLayoutComponent
 public void removeLayoutComponent(Component c)
 o calcDimensions
 protected void calcDimensions(Container parent)
Calculates the dimensions for the window margins and info box.

Overrides:
calcDimensions in class ButtonLayout
 o preferredLayoutSize
 public Dimension preferredLayoutSize(Container parent)
Returns the preferred dimensions for the support frame: 450x300.

 o minimumLayoutSize
 public Dimension minimumLayoutSize(Container parent)
Returns the minimum frame dimensions.

 o layoutContainer
 public void layoutContainer(Container parent)
Lays out the components in the frame.