EchoPoint
1.0

echopoint.ui.util
Class HtmlTable

java.lang.Object
  extended byechopoint.ui.util.HtmlTable

public class HtmlTable
extends java.lang.Object

The HtmlTable class is a helper for creating HTML TABLE elements, TR element and TD elements in less code that usual. It auto creates TR and TD elements since a table cannot have content without TR and TD elements.


Constructor Summary
HtmlTable()
          Constructs a HtmlTable with a zero sized border, cellpadding and cellspacing.
HtmlTable(boolean whiteSpaceRelevant)
          Constructs a HtmlTable with a zero sized border, cellpadding and cellspacing and the specified whitespacerelevant rule.
HtmlTable(boolean whiteSpaceRelevant, int border, int cellspacing, int cellpadding)
          Constructs a HtmlTable with the specified border, cellpadding and cellspacing.
HtmlTable(int cellspacing, int cellpadding)
          Constructs a HtmlTable with a zero sized border, and the specified cellpadding and cellspacing.
HtmlTable(int border, int cellspacing, int cellpadding)
          Constructs a HtmlTable with the specified border, cellpadding and cellspacing.
 
Method Summary
 nextapp.echoservlet.html.Element getTABLE()
           
 nextapp.echoservlet.html.Element getTD()
           
 nextapp.echoservlet.html.Element getTR()
           
 boolean isWhiteSpaceRelevant()
           
 nextapp.echoservlet.html.Element newTD()
          Adds a new TD element to the current TR and returns the new TD element.
 nextapp.echoservlet.html.Element newTD(boolean whiteSpaceRelevant)
          Adds a new TD element to the current TR and returns the new TD element.
 nextapp.echoservlet.html.Element newTR()
          Adds a new TR element to the TABLE and returns the new TR element.
 nextapp.echoservlet.html.Element newTR(boolean whiteSpaceRelevant)
          Adds a new TR element to the TABLE and returns the new TR element.
 void setWhiteSpaceRelevant(boolean b)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HtmlTable

public HtmlTable()
Constructs a HtmlTable with a zero sized border, cellpadding and cellspacing. A TR and TD are also created.


HtmlTable

public HtmlTable(boolean whiteSpaceRelevant)
Constructs a HtmlTable with a zero sized border, cellpadding and cellspacing and the specified whitespacerelevant rule. A TR and TD are also created.


HtmlTable

public HtmlTable(int cellspacing,
                 int cellpadding)
Constructs a HtmlTable with a zero sized border, and the specified cellpadding and cellspacing. A TR and TD are also created.

Parameters:
cellspacing -
cellpadding -

HtmlTable

public HtmlTable(int border,
                 int cellspacing,
                 int cellpadding)
Constructs a HtmlTable with the specified border, cellpadding and cellspacing. A TR and TD are also created.

Parameters:
border -
cellspacing -
cellpadding -

HtmlTable

public HtmlTable(boolean whiteSpaceRelevant,
                 int border,
                 int cellspacing,
                 int cellpadding)
Constructs a HtmlTable with the specified border, cellpadding and cellspacing. A TR and TD are also created.

Parameters:
border -
cellspacing -
cellpadding -
Method Detail

getTABLE

public nextapp.echoservlet.html.Element getTABLE()
Returns:
the TABLE element

getTD

public nextapp.echoservlet.html.Element getTD()
Returns:
the current TD element

getTR

public nextapp.echoservlet.html.Element getTR()
Returns:
the current TR element

isWhiteSpaceRelevant

public boolean isWhiteSpaceRelevant()
See Also:
Element.setWhitespaceRelevant(boolean)

newTD

public nextapp.echoservlet.html.Element newTD()
Adds a new TD element to the current TR and returns the new TD element. The current TD becomes this new TD element. The default HtmlTable white space rules are used for the new element.

Returns:
a new TD element

newTD

public nextapp.echoservlet.html.Element newTD(boolean whiteSpaceRelevant)
Adds a new TD element to the current TR and returns the new TD element. The current TD becomes this new TD element.

Returns:
a new TD element

newTR

public nextapp.echoservlet.html.Element newTR()
Adds a new TR element to the TABLE and returns the new TR element. It also adds a new TD element to this TR. The current TR becomes this new TR element. The default HtmlTable white space rules are used for the new element.

Returns:
a new TR element

newTR

public nextapp.echoservlet.html.Element newTR(boolean whiteSpaceRelevant)
Adds a new TR element to the TABLE and returns the new TR element. It also adds a new TD element to this TR. The current TR becomes this new TR element.

Returns:
a new TR element

setWhiteSpaceRelevant

public void setWhiteSpaceRelevant(boolean b)
Parameters:
b -

EchoPoint
1.0