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
-
bottomButtons
-
-
box
- The
TextArea component.
-
boxheight
-
-
boxtop
-
-
boxwidth
-
-
MIN_BOX_HEIGHT
-
-
MIN_BOX_WIDTH
-
-
topButtons
-
-
TextFrameLayout(int, int)
-
-
addLayoutComponent(String, Component)
-
-
calcDimensions(Container)
- Calculates the dimensions for the window margins and info box.
-
layoutContainer(Container)
- Lays out the components in the frame.
-
minimumLayoutSize(Container)
- Returns the minimum frame dimensions.
-
preferredLayoutSize(Container)
- Returns the preferred dimensions for the support frame: 450x300.
-
removeLayoutComponent(Component)
-
MIN_BOX_HEIGHT
private static final int MIN_BOX_HEIGHT
MIN_BOX_WIDTH
private static final int MIN_BOX_WIDTH
box
Component box
- The
TextArea component.
boxtop
int boxtop
boxwidth
int boxwidth
boxheight
int boxheight
topButtons
boolean topButtons
bottomButtons
boolean bottomButtons
TextFrameLayout
TextFrameLayout(int top,
int bottom)
- Parameters:
- numButtons - the number of buttons that will be added.
addLayoutComponent
public void addLayoutComponent(String name,
Component c)
removeLayoutComponent
public void removeLayoutComponent(Component c)
calcDimensions
protected void calcDimensions(Container parent)
- Calculates the dimensions for the window margins and info box.
- Overrides:
- calcDimensions in class ButtonLayout
preferredLayoutSize
public Dimension preferredLayoutSize(Container parent)
- Returns the preferred dimensions for the support frame: 450x300.
minimumLayoutSize
public Dimension minimumLayoutSize(Container parent)
- Returns the minimum frame dimensions.
layoutContainer
public void layoutContainer(Container parent)
- Lays out the components in the frame.