de.erichseifert.gral
Class EdgeLayout

java.lang.Object
  extended by de.erichseifert.gral.EdgeLayout
All Implemented Interfaces:
Layout

public class EdgeLayout
extends Object
implements Layout

Implementation of Layout that arranges a Container's components according to a certain grid. This is similar to java's BorderLayout, but also allows components to be placed in each of the corners.


Constructor Summary
EdgeLayout(double hgap, double vgap)
          Creates an EdgeLayout with the specified distances between the components.
 
Method Summary
 Dimension2D getPreferredSize(Container container)
          Returns the preferred size of the specified Container using this Layout.
 void layout(Container container)
          Arranges the components of this Container according to this Layout.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EdgeLayout

public EdgeLayout(double hgap,
                  double vgap)
Creates an EdgeLayout with the specified distances between the components.

Parameters:
hgap - Horizontal gap.
vgap - Vertical gap.
Method Detail

layout

public void layout(Container container)
Description copied from interface: Layout
Arranges the components of this Container according to this Layout.

Specified by:
layout in interface Layout
Parameters:
container - Container to be laid out.

getPreferredSize

public Dimension2D getPreferredSize(Container container)
Description copied from interface: Layout
Returns the preferred size of the specified Container using this Layout.

Specified by:
getPreferredSize in interface Layout
Parameters:
container - Container whose preferred size is to be returned.
Returns:
Preferred extent of the specified Container.


Copyright © 2009-2010. All Rights Reserved.