net.xoetrope.builder.w3c.html
Class XHtmlFormLayout

java.lang.Object
  extended by net.xoetrope.builder.w3c.html.XHtmlFormLayout
All Implemented Interfaces:
java.awt.LayoutManager

public class XHtmlFormLayout
extends java.lang.Object
implements java.awt.LayoutManager

A layout manager for html forms. Components flow along rows till a break element is encountered abd then they flow to the next row along the page length

Copyright (c) Xoetrope Ltd., 2002-2006

$Revision: 1.2 $

License: see License.txt


Field Summary
protected  XHtmlBuilder builder
           
static int FILL
           
static int PREFERRED
           
 
Constructor Summary
XHtmlFormLayout(XHtmlBuilder htmlBuilder)
          Creates a layout manager that will lay out components along the y axis.
 
Method Summary
 void addLayoutComponent(java.lang.String name, java.awt.Component comp)
          If the layout manager uses a per-component string, adds the component comp to the layout, associating it with the string specified by name.
 void layoutContainer(java.awt.Container parent)
          Lays out the specified container.
 java.awt.Dimension minimumLayoutSize(java.awt.Container parent)
          Calculates the minimum size dimensions for the specified container, given the components it contains.
 java.awt.Dimension preferredLayoutSize(java.awt.Container parent)
          Calculates the preferred size dimensions for the specified container, given the components it contains.
 void removeLayoutComponent(java.awt.Component comp)
          Removes the specified component from the layout.
 void setAlignment(java.lang.String alignment)
          Set the horizontal alignment
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PREFERRED

public static final int PREFERRED
See Also:
Constant Field Values

FILL

public static final int FILL
See Also:
Constant Field Values

builder

protected XHtmlBuilder builder
Constructor Detail

XHtmlFormLayout

public XHtmlFormLayout(XHtmlBuilder htmlBuilder)
Creates a layout manager that will lay out components along the y axis.

Parameters:
target - the container that needs to be laid out
Method Detail

setAlignment

public void setAlignment(java.lang.String alignment)
Set the horizontal alignment

Parameters:
alignment - the alignment string - left|right|center

addLayoutComponent

public void addLayoutComponent(java.lang.String name,
                               java.awt.Component comp)
If the layout manager uses a per-component string, adds the component comp to the layout, associating it with the string specified by name.

Specified by:
addLayoutComponent in interface java.awt.LayoutManager
Parameters:
name - the string to be associated with the component
comp - the component to be added

removeLayoutComponent

public void removeLayoutComponent(java.awt.Component comp)
Removes the specified component from the layout.

Specified by:
removeLayoutComponent in interface java.awt.LayoutManager
Parameters:
comp - the component to be removed

preferredLayoutSize

public java.awt.Dimension preferredLayoutSize(java.awt.Container parent)
Calculates the preferred size dimensions for the specified container, given the components it contains.

Specified by:
preferredLayoutSize in interface java.awt.LayoutManager
Parameters:
parent - the container to be laid out
See Also:
minimumLayoutSize(java.awt.Container)

minimumLayoutSize

public java.awt.Dimension minimumLayoutSize(java.awt.Container parent)
Calculates the minimum size dimensions for the specified container, given the components it contains.

Specified by:
minimumLayoutSize in interface java.awt.LayoutManager
Parameters:
parent - the component to be laid out
See Also:
preferredLayoutSize(java.awt.Container)

layoutContainer

public void layoutContainer(java.awt.Container parent)
Lays out the specified container.

Specified by:
layoutContainer in interface java.awt.LayoutManager
Parameters:
parent - the container to be laid out