planetj.dataengine.test
Class TestHTMLTable

java.lang.Object
  |
  +--planetj.html.HTMLElement
        |
        +--planetj.dataengine.test.TestHTMLTable

public class TestHTMLTable
extends HTMLElement

This class is used for containing the properties of an HTML table into an object. A HTMLTAbleProperties object is used when outputing the HTML code for a table.

Author:
PlanetJ Corporation

Field Summary
static int MULTIPLESELECTION
           
static int NOSELECTION
           
static int SINGLESELECTION
           
 
Fields inherited from class planetj.html.HTMLElement
DISABLED
 
Constructor Summary
TestHTMLTable(String id)
          Creates a new HTMLTable object and sets its table id.
 
Method Summary
 String generate()
          Generates HTML code for this HTML table.
 String generate(RowCollection rows)
          Generates HTML code for this HTML table using the specified rows (RowCollection).
 String generate(RowCollection rows, String[] fldNames)
          Generates HTML code for this HTML table using the specified rows (RowCollection).
 String generate(RowCollection rows, String[] fldNames, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)
          Generates HTML code for this HTML table using the specified rows (RowCollection).
 int getBorder()
          Insert the method's description here.
 int getCellPadding()
          Insert the method's description here.
 int getCellSpacing()
          Insert the method's description here.
 String getEvenRowBGColor()
          Returns the background color for even rows in the table as a String representation of the HTML code for the color.
 String getGridColor()
          Insert the method's description here.
 int getGridWidth()
           
 String getHeaderBGColor()
          Returns the background color for the table header as a String representation of the HTML code for the color.
 String getHeaderTextColor()
          Insert the method's description here.
 String getOddRowBGColor()
          Returns the background color for odd rows in the table as a String representation of the HTML code for the color.
 String getRowBackground()
          Convience method used when creating the table for display.
 RowCollection getRows()
          Returns the rows (RowCollection) to the table has for populating its data.
 int getSelectionType()
          Insert the method's description here.
 String getTextColor()
          Insert the method's description here.
 boolean isMultipleSelection()
           
 boolean isNoSelection()
           
 boolean isSingleSelection()
           
 void setBorder(int newBorder)
          Insert the method's description here.
 void setCellPadding(int newCellPadding)
          Insert the method's description here.
 void setCellSpaceing(int newCellSpaceing)
          Insert the method's description here.
 void setEvenRowBGColor(String evenRowBGColor)
          Sets the background color for even rows in the table as a String representation of the HTML code for the color.
 void setGridColor(String newGridColor)
          Insert the method's description here.
 void setGridWidth(int width)
           
 void setHeaderBGColor(String headerBGColor)
          Sets the background color for the table header as a String representation of the HTML code for the color.
 void setHeaderTextColor(String newHeaderTextColor)
          Insert the method's description here.
 void setOddRowBackgroundColor(String oddRowBGColor)
          Sets the background color for odd rows in the table as a String representation of the HTML code for the color.
 void setOddRowBGColor(String oddRowBGColor)
          Sets the background color for odd rows in the table as a String representation of the HTML code for the color.
 void setRowBackground(String oddRowBGColor, String evenRowBGColor)
          Convience method for setting both odd and even row background colors at the same time.
 void setRows(RowCollection rows)
          Sets the rows (RowCollection) to be used in populating the data for the table.
 void setSelectionType(int newSelectionType)
          Insert the method's description here.
 void setTextColor(String newTextColor)
          Insert the method's description here.
 
Methods inherited from class planetj.html.HTMLElement
appendAttribute, appendAttribute, appendExtractableHiddenField, getId, isDisplayField, setId
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NOSELECTION

public static final int NOSELECTION
See Also:
Constant Field Values

SINGLESELECTION

public static final int SINGLESELECTION
See Also:
Constant Field Values

MULTIPLESELECTION

public static final int MULTIPLESELECTION
See Also:
Constant Field Values
Constructor Detail

TestHTMLTable

public TestHTMLTable(String id)
Creates a new HTMLTable object and sets its table id.

Parameters:
id - String
Method Detail

generate

public String generate()
                throws CMException
Generates HTML code for this HTML table.

Returns:
String
CMException

generate

public String generate(RowCollection rows)
                throws CMException
Generates HTML code for this HTML table using the specified rows (RowCollection).

Parameters:
rows - RowCollection
Returns:
String
CMException

generate

public String generate(RowCollection rows,
                       String[] fldNames)
                throws CMException
Generates HTML code for this HTML table using the specified rows (RowCollection).

Parameters:
rows - RowCollection
fldNames - String[]
Returns:
String
CMException

generate

public String generate(RowCollection rows,
                       String[] fldNames,
                       javax.servlet.http.HttpServletRequest req,
                       javax.servlet.http.HttpServletResponse resp)
                throws CMException
Generates HTML code for this HTML table using the specified rows (RowCollection).

Parameters:
rows - RowCollection
fldNames - String[]
Returns:
String
CMException

getBorder

public int getBorder()
Insert the method's description here. Creation date: (8/19/01 4:30:37 PM)

Returns:
int

getCellPadding

public int getCellPadding()
Insert the method's description here. Creation date: (8/19/01 4:30:37 PM)

Returns:
int

getCellSpacing

public int getCellSpacing()
Insert the method's description here. Creation date: (8/19/01 4:30:37 PM)

Returns:
int

getEvenRowBGColor

public String getEvenRowBGColor()
Returns the background color for even rows in the table as a String representation of the HTML code for the color. (e.g. #ffffff)

Returns:
String

getGridColor

public String getGridColor()
Insert the method's description here. Creation date: (8/19/01 4:30:37 PM)

Returns:
java.lang.String

getGridWidth

public int getGridWidth()

getHeaderBGColor

public String getHeaderBGColor()
Returns the background color for the table header as a String representation of the HTML code for the color. (e.g. #ffffff)

Returns:
String

getHeaderTextColor

public String getHeaderTextColor()
Insert the method's description here. Creation date: (8/19/01 4:30:37 PM)


getOddRowBGColor

public String getOddRowBGColor()
Returns the background color for odd rows in the table as a String representation of the HTML code for the color. (e.g. #ffffff)

Returns:
String

getRowBackground

public String getRowBackground()
Convience method used when creating the table for display. It allows for alternating row background colors. If only one row color was specified, then it is used as both the odd and the even background color. A String representation of an HTML code will be returned (e.g. #fffffff).

Returns:
String

getRows

public RowCollection getRows()
Returns the rows (RowCollection) to the table has for populating its data.

Returns:
RowCollection

getSelectionType

public int getSelectionType()
Insert the method's description here. Creation date: (8/19/01 4:30:37 PM)

Returns:
int

getTextColor

public String getTextColor()
Insert the method's description here. Creation date: (8/19/01 4:30:37 PM)

Returns:
java.lang.String

isMultipleSelection

public boolean isMultipleSelection()

isNoSelection

public boolean isNoSelection()

isSingleSelection

public boolean isSingleSelection()

setBorder

public void setBorder(int newBorder)
Insert the method's description here. Creation date: (8/19/01 4:30:37 PM)

Parameters:
newBorder - int

setCellPadding

public void setCellPadding(int newCellPadding)
Insert the method's description here. Creation date: (8/19/01 4:30:37 PM)

Parameters:
newCellPadding - int

setCellSpaceing

public void setCellSpaceing(int newCellSpaceing)
Insert the method's description here. Creation date: (8/19/01 4:30:37 PM)

Parameters:
newCellSpaceing - int

setEvenRowBGColor

public void setEvenRowBGColor(String evenRowBGColor)
Sets the background color for even rows in the table as a String representation of the HTML code for the color. (e.g. #ffffff)

Returns:
evenRowBGColor String

setGridColor

public void setGridColor(String newGridColor)
Insert the method's description here. Creation date: (8/19/01 4:30:37 PM)

Parameters:
newGridColor - java.lang.String

setGridWidth

public void setGridWidth(int width)

setHeaderBGColor

public void setHeaderBGColor(String headerBGColor)
Sets the background color for the table header as a String representation of the HTML code for the color. (e.g. #ffffff)

Parameters:
headerBGColor - String

setHeaderTextColor

public void setHeaderTextColor(String newHeaderTextColor)
Insert the method's description here. Creation date: (8/19/01 4:30:37 PM)


setOddRowBackgroundColor

public void setOddRowBackgroundColor(String oddRowBGColor)
Sets the background color for odd rows in the table as a String representation of the HTML code for the color. (e.g. #ffffff)

Returns:
oddRowBGColor String

setOddRowBGColor

public void setOddRowBGColor(String oddRowBGColor)
Sets the background color for odd rows in the table as a String representation of the HTML code for the color. (e.g. #ffffff)

Returns:
oddRowBGColor String

setRowBackground

public void setRowBackground(String oddRowBGColor,
                             String evenRowBGColor)
Convience method for setting both odd and even row background colors at the same time. Both Strings are HTML code representations of the colors to use.

Parameters:
oddRowBGColor - String
evenRowBGColor - String

setRows

public void setRows(RowCollection rows)
Sets the rows (RowCollection) to be used in populating the data for the table.

Parameters:
rows - RowCollection

setSelectionType

public void setSelectionType(int newSelectionType)
Insert the method's description here. Creation date: (8/19/01 4:30:37 PM)

Parameters:
newSelectionType - int

setTextColor

public void setTextColor(String newTextColor)
Insert the method's description here. Creation date: (8/19/01 4:30:37 PM)

Parameters:
newTextColor - java.lang.String