All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class dtai.gwt.GadgetBorderLayout

java.lang.Object
   |
   +----dtai.gwt.GadgetBorderLayout

public class GadgetBorderLayout
extends Object
implements GadgetLayoutManager
A TNT style border bag layout. It will layout a container using members named "North", "South", "East", "West" and "Center". The "North", "South", "East" and "West" components get layed out according to their preferred sizes and the constraints of the container's size. The "Center" component will get any space left over.


Constructor Index

 o GadgetBorderLayout()
Constructs a new BorderLayout.
 o GadgetBorderLayout(int, int)
Constructs a BorderLayout with the specified gaps.

Method Index

 o addLayoutGadget(String, Gadget)
Adds the specified named component to the layout.
 o childrenCanOverlap()
returns true if children can overlap each other.
 o layoutContainerGadget(ContainerGadget)
Lays out the specified container.
 o minimumLayoutSize(ContainerGadget)
Returns the minimum dimensions needed to layout the components contained in the specified target container.
 o preferredLayoutSize(ContainerGadget)
Returns the preferred dimensions for this layout given the components in the specified target container.
 o removeLayoutGadget(Gadget)
Removes the specified component from the layout.

Constructors

 o GadgetBorderLayout
 public GadgetBorderLayout()
Constructs a new BorderLayout.

 o GadgetBorderLayout
 public GadgetBorderLayout(int hgap,
                           int vgap)
Constructs a BorderLayout with the specified gaps.

Parameters:
hgap - the horizontal gap
vgap - the vertical gap

Methods

 o childrenCanOverlap
 public boolean childrenCanOverlap()
returns true if children can overlap each other.

Returns:
false
 o addLayoutGadget
 public void addLayoutGadget(String name,
                             Gadget gadget)
Adds the specified named component to the layout.

Parameters:
name - the String name
gadget - the component to be added
 o removeLayoutGadget
 public void removeLayoutGadget(Gadget gadget)
Removes the specified component from the layout.

Parameters:
gadget - the component to be removed
 o minimumLayoutSize
 public Dimension minimumLayoutSize(ContainerGadget target)
Returns the minimum dimensions needed to layout the components contained in the specified target container.

Parameters:
target - the ContainerGadget on which to do the layout
Returns:
Dimension
See Also:
ContainerGadget, preferredLayoutSize
 o preferredLayoutSize
 public Dimension preferredLayoutSize(ContainerGadget target)
Returns the preferred dimensions for this layout given the components in the specified target container.

Parameters:
target - the component which needs to be laid out
Returns:
Dimension
See Also:
ContainerGadget, minimumLayoutSize
 o layoutContainerGadget
 public void layoutContainerGadget(ContainerGadget target)
Lays out the specified container. This method will actually setBounds the components in the specified target container in order to satisfy the constraints of the BorderLayout object.

Parameters:
target - the component being laid out
See Also:
ContainerGadget

All Packages  Class Hierarchy  This Package  Previous  Next  Index