All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class htmllayout.HtmlLayout

java.lang.Object
   |
   +----htmllayout.HtmlLayout

public class HtmlLayout
extends Object
implements LayoutManager
HtmlLayout uses a string containing HTML like table tags to layout components.
Ex:
 <table rows=2 cols=2>
  <tr>
   <td> A label
   <td component=someName>
  <tr>
   <td component=anotherName vert=max>
   <td component="some other name" horz=max>
 

Tags and their options

Table

TR

TD

Author:
Paul Buchheit

Constructor Index

 o HtmlLayout(String)
Creates an HtmlLayout with the specified "HTML" string.

Method Index

 o addLabels(Container)
If this layout includes any automatic lables (text within a TD) this will add them to container parent.
 o addLayoutComponent(String, Component)
 o layoutContainer(Container)
 o minimumLayoutSize(Container)
 o preferredLayoutSize(Container)
 o removeLayoutComponent(Component)
 o toString()
Returns a string representation of the object.

Constructors

 o HtmlLayout
 public HtmlLayout(String html)
Creates an HtmlLayout with the specified "HTML" string.

Parameters:
html The - "HTML" which specifies the layout, if this is not valid table-html a BadTableHtmlException will be thrown. Html can be tested ahead of time using HtmlLayoutTest.
See Also:
BadTableHtmlException, HtmlLayoutTest

Methods

 o addLabels
 public void addLabels(Container parent)
If this layout includes any automatic lables (text within a TD) this will add them to container parent. It is not always necessary to call this, if you don't it will automatically be called when the container is first sized or layed out. Ordinarily this is ok but not always, such as when using CardLayout. Calling addLabels manually at the same time as the other components are added will never be a problem.

 o addLayoutComponent
 public void addLayoutComponent(String name,
                                Component comp)
See Also:
addLayoutComponent
 o removeLayoutComponent
 public void removeLayoutComponent(Component comp)
See Also:
removeLayoutComponent
 o preferredLayoutSize
 public Dimension preferredLayoutSize(Container parent)
See Also:
preferredLayoutSize
 o minimumLayoutSize
 public Dimension minimumLayoutSize(Container parent)
See Also:
minimumLayoutSize
 o layoutContainer
 public void layoutContainer(Container parent)
See Also:
layoutContainer
 o toString
 public String toString()
Returns a string representation of the object.

Overrides:
toString in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index