com.ge.research.html
Class TableElement

java.lang.Object
  extended bycom.ge.research.html.HTMLTag
      extended bycom.ge.research.html.TableElement
Direct Known Subclasses:
TableDimensionTag, TableRowTag, TableTag

public abstract class TableElement
extends HTMLTag

Abstract class that defines an HTML table "widget" (cell, row, table). Encapsulates all the attributes of such elements, their accessors, validations, and default values.

Version:
$Revision: 1.1 $ $Date: 2006/08/11 00:17:33 $
Author:
garbiras
Created on:
Sep 9, 2002

Field Summary
 
Fields inherited from class com.ge.research.html.HTMLTag
HORIZONTAL_LINE, LINEBREAK, reconstructTag, tag, WHITESPACE
 
Constructor Summary
protected TableElement(java.lang.String tagName)
          Default constructor.
 
Method Summary
 java.lang.String getAlign()
          Returns the value of the HTML Tag ALIGN attribute.
 java.lang.String getBackground()
          Returns the value of the HTML Tag BACKGROUND attribute.
 java.lang.String getBgColor()
          Returns the value of the HTML Tag BACKGROUND COLOR attribute.
 int getBorder()
          Returns the value of the HTML Tag BORDER WIDTH attribute.
 java.lang.String getBorderColor()
          Returns the value of the HTML Tag BORDERCOLOR attribute.
 java.lang.String getBorderColorDark()
          Returns the value of the HTML Tag BORDERCOLORDARK attribute.
 java.lang.String getBorderColorLight()
          Returns the value of the HTML Tag BORDERCOLORLIGHT attribute.
 int getCellPadding()
          Returns the value of the HTML Tag CELLPADDING attribute.
 int getCellSpacing()
          Returns the value of the HTML Tag CELLSPACING attribute.
 int getColspan()
          Returns the value of the HTML Tag COLSPAN attribute.
 java.lang.String getFrame()
          Returns the value of the HTML Tag FRAME attribute.
 java.lang.String getHeight()
          Returns the value of the HTML Tag HEIGHT attribute.
 boolean getNowrap()
          Returns the value of the HTML Tag NOWRAP attribute.
 int getRowspan()
          Returns the value of the HTML Tag ROWSPAN attribute.
 java.lang.String getRules()
          Returns the value of the HTML Tag RULES attribute.
 java.lang.String getVAlign()
          Returns the value of the HTML Tag VALIGN attribute.
 java.lang.String getWidth()
          Returns the value of the HTML Tag WIDTH attribute.
protected  void resetTagSpecificInformation()
          Resets the tag attributes and content of the HTML Tag to their default values.
 void setAlign(java.lang.String attribute)
          Sets the align attribute and validates its value.
 void setBackground(java.lang.String attribute)
          Sets the HTML Tag BACKGROUND attribute.
 void setBgColor(java.lang.String attribute)
          Sets the HTML Tag BACKGROUND COLOR attribute.
 void setBorder(int attribute)
          Sets the HTML Tag BORDER WIDTH attribute.
 void setBorderColor(java.lang.String attribute)
          Sets the HTML Tag BORDER COLOR attribute.
 void setBorderColorDark(java.lang.String attribute)
          Sets the HTML Tag BORDERCOLORDARK attribute.
 void setBorderColorLight(java.lang.String attribute)
          Sets the HTML Tag BORDERCOLORLIGHT attribute.
 void setCellPadding(int attribute)
          Sets the HTML Tag CELLPADDING attribute.
 void setCellSpacing(int attribute)
          Sets the HTML Tag CELLSPACING attribute.
 void setColspan(int attribute)
          Sets the HTML Tag COLSPAN attribute.
 void setFrame(java.lang.String attribute)
          Sets the FRAME attribute and validates its value.
 void setHeight(int attribute, boolean asPercent)
          Sets the HTML Tag HEIGHT attribute.
 void setNowrap(boolean attribute)
          Sets the HTML Tag NOWRAP attribute.
 void setRowspan(int attribute)
          Sets the HTML Tag ROWSPAN attribute.
 void setRules(java.lang.String attribute)
          Sets the RULES attribute and validates its value.
 void setVAlign(java.lang.String attribute)
          Sets the VALIGN attribute and validates its value.
 void setWidth(int attribute, boolean asPercent)
          Sets the HTML Tag WIDTH attribute.
protected  void writeTagSpecificAttributes()
          Adds the tag specific attribute information to the HTML Tag.
 
Methods inherited from class com.ge.research.html.HTMLTag
addAttribute, addAttribute, getId, getOnClick, getOnContextMenu, getOnDblClick, getOnDrag, getOnDragEnd, getOnDragStart, getOnFocus, getOnFocusOut, getOnKeyDown, getOnKeyPress, getOnKeyUp, getOnMouseDown, getOnMouseMove, getOnMouseOut, getOnMouseOver, getOnMouseUp, getOnMoveEnd, getOnMoveStart, getStyle, getStyleClass, getTitle, removeAttribute, reset, setId, setOnClick, setOnContextMenu, setOnDblClick, setOnDrag, setOnDragEnd, setOnDragStart, setOnFocus, setOnFocusOut, setOnKeyDown, setOnKeyPress, setOnKeyUp, setOnMouseDown, setOnMouseMove, setOnMouseOut, setOnMouseOver, setOnMouseUp, setOnMoveEnd, setOnMoveStart, setStyle, setStyleClass, setTitle, toString, writeAttribute, writeAttribute, writeAttribute, writeAttribute, writeAttribute, writeAttribute, writeTagSpecificData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TableElement

protected TableElement(java.lang.String tagName)
Default constructor. Calls super(tagName).

Parameters:
tagName - the HTML type of this tag
Method Detail

getAlign

public java.lang.String getAlign()
Returns the value of the HTML Tag ALIGN attribute.

Returns:
The current value of the HTML Tag ALIGN attribute

getBackground

public java.lang.String getBackground()
Returns the value of the HTML Tag BACKGROUND attribute.

Returns:
The current value of the HTML Tag BACKGROUND attribute

getBgColor

public java.lang.String getBgColor()
Returns the value of the HTML Tag BACKGROUND COLOR attribute.

Returns:
The current value of the HTML Tag BACKGROUND COLOR attribute

getBorder

public int getBorder()
Returns the value of the HTML Tag BORDER WIDTH attribute.

Returns:
The current value of the HTML Tag BORDER WIDTH attribute

getBorderColor

public java.lang.String getBorderColor()
Returns the value of the HTML Tag BORDERCOLOR attribute.

Returns:
The current value of the HTML Tag BORDERCOLOR attribute

getBorderColorLight

public java.lang.String getBorderColorLight()
Returns the value of the HTML Tag BORDERCOLORLIGHT attribute.

Returns:
The current value of the HTML Tag BORDERCOLORLIGHT attribute

getBorderColorDark

public java.lang.String getBorderColorDark()
Returns the value of the HTML Tag BORDERCOLORDARK attribute.

Returns:
The current value of the HTML Tag BORDERCOLORDARK attribute

getCellPadding

public int getCellPadding()
Returns the value of the HTML Tag CELLPADDING attribute.

Returns:
The current value of the HTML Tag CELLPADDING attribute

getCellSpacing

public int getCellSpacing()
Returns the value of the HTML Tag CELLSPACING attribute.

Returns:
The current value of the HTML Tag CELLSPACING attribute

getColspan

public int getColspan()
Returns the value of the HTML Tag COLSPAN attribute.

Returns:
The current value of the HTML Tag COLSPAN attribute

getFrame

public java.lang.String getFrame()
Returns the value of the HTML Tag FRAME attribute.

Returns:
The current value of the HTML Tag FRAME attribute

getHeight

public java.lang.String getHeight()
Returns the value of the HTML Tag HEIGHT attribute.

Returns:
The current value of the HTML Tag HEIGHT attribute

getNowrap

public boolean getNowrap()
Returns the value of the HTML Tag NOWRAP attribute.

Returns:
true if the contents of the tag do not word wrap; false if the contents of the tag should word wrap

getRowspan

public int getRowspan()
Returns the value of the HTML Tag ROWSPAN attribute.

Returns:
The current value of the HTML Tag ROWSPAN attribute

getRules

public java.lang.String getRules()
Returns the value of the HTML Tag RULES attribute.

Returns:
The current value of the HTML Tag RULES attribute

getVAlign

public java.lang.String getVAlign()
Returns the value of the HTML Tag VALIGN attribute.

Returns:
The current value of the HTML Tag VALIGN attribute

getWidth

public java.lang.String getWidth()
Returns the value of the HTML Tag WIDTH attribute.

Returns:
The current value of the HTML Tag WIDTH attribute

setAlign

public void setAlign(java.lang.String attribute)
Sets the align attribute and validates its value. If the new value is not an acceptable value, then the align attribute is set to null. Sets the HTMLTag.reconstructTag value to true.

Parameters:
attribute - the new align value
See Also:
TagPropertyConstants.isAlignType(java.lang.String), HTMLTag.reconstructTag

setBackground

public void setBackground(java.lang.String attribute)
Sets the HTML Tag BACKGROUND attribute. Sets the value of the HTMLTag.reconstructTag to true.

Parameters:
attribute - the new value for the HTML Tag BACKGROUND attribute
See Also:
HTMLTag.reconstructTag

setBgColor

public void setBgColor(java.lang.String attribute)
Sets the HTML Tag BACKGROUND COLOR attribute. Sets the value of the HTMLTag.reconstructTag to true.

Parameters:
attribute - the new value for the HTML Tag BACKGROUND COLOR attribute
See Also:
HTMLTag.reconstructTag

setBorder

public void setBorder(int attribute)
Sets the HTML Tag BORDER WIDTH attribute. Sets the value of the HTMLTag.reconstructTag to true.

Parameters:
attribute - the new value for the HTML Tag BORDER WIDTH attribute
See Also:
HTMLTag.reconstructTag

setBorderColor

public void setBorderColor(java.lang.String attribute)
Sets the HTML Tag BORDER COLOR attribute. Sets the value of the HTMLTag.reconstructTag to true.

Parameters:
attribute - the new value for the HTML Tag BORDER COLOR attribute
See Also:
HTMLTag.reconstructTag

setBorderColorLight

public void setBorderColorLight(java.lang.String attribute)
Sets the HTML Tag BORDERCOLORLIGHT attribute. Sets the value of the HTMLTag.reconstructTag to true.

Parameters:
attribute - the new value for the HTML Tag BORDERCOLORLIGHT attribute
See Also:
HTMLTag.reconstructTag

setBorderColorDark

public void setBorderColorDark(java.lang.String attribute)
Sets the HTML Tag BORDERCOLORDARK attribute. Sets the value of the HTMLTag.reconstructTag to true.

Parameters:
attribute - the new value for the HTML Tag BORDERCOLORDARK attribute
See Also:
HTMLTag.reconstructTag

setCellPadding

public void setCellPadding(int attribute)
Sets the HTML Tag CELLPADDING attribute. Sets the value of the HTMLTag.reconstructTag to true.

Parameters:
attribute - the new value for the HTML Tag CELLPADDING attribute
See Also:
HTMLTag.reconstructTag

setCellSpacing

public void setCellSpacing(int attribute)
Sets the HTML Tag CELLSPACING attribute. Sets the value of the HTMLTag.reconstructTag to true.

Parameters:
attribute - the new value for the HTML Tag CELLSPACING attribute
See Also:
HTMLTag.reconstructTag

setColspan

public void setColspan(int attribute)
Sets the HTML Tag COLSPAN attribute. Sets the value of the HTMLTag.reconstructTag to true.

Parameters:
attribute - the new value for the HTML Tag COLSPAN attribute
See Also:
HTMLTag.reconstructTag

setFrame

public void setFrame(java.lang.String attribute)
Sets the FRAME attribute and validates its value. If the new value is not an acceptable value, then the FRAME attribute is set to null. Sets the HTMLTag.reconstructTag value to true.

Parameters:
attribute - the new FRAME value
See Also:
TagPropertyConstants.isFrameType(java.lang.String), HTMLTag.reconstructTag

setHeight

public void setHeight(int attribute,
                      boolean asPercent)
Sets the HTML Tag HEIGHT attribute. Sets the value of the HTMLTag.reconstructTag to true.

Parameters:
attribute - the new height value
asPercent - true if the value of attribute should be treated as a percentage, and thus append a percent sign after the height value; false if the value should be treated as an absolute pixel specification, and written as is
See Also:
HTMLTag.reconstructTag

setNowrap

public void setNowrap(boolean attribute)
Sets the HTML Tag NOWRAP attribute. Sets the value of the HTMLTag.reconstructTag to true.

Parameters:
attribute - true if this HTML Tag contents should not be word wrapped; false if this HTML Tag contents should be word wrapped.
See Also:
HTMLTag.reconstructTag

setRowspan

public void setRowspan(int attribute)
Sets the HTML Tag ROWSPAN attribute. Sets the value of the HTMLTag.reconstructTag to true.

Parameters:
attribute - the new value for the HTML Tag ROWSPAN attribute
See Also:
HTMLTag.reconstructTag

setRules

public void setRules(java.lang.String attribute)
Sets the RULES attribute and validates its value. If the new value is not an acceptable value, then the RULES attribute is set to null. Sets the HTMLTag.reconstructTag value to true.

Parameters:
attribute - the new RULES value
See Also:
TagPropertyConstants.isRulesType(java.lang.String), HTMLTag.reconstructTag

setVAlign

public void setVAlign(java.lang.String attribute)
Sets the VALIGN attribute and validates its value. If the new value is not an acceptable value, then the VALIGN attribute is set to null. Sets the HTMLTag.reconstructTag value to true.

Parameters:
attribute - the new VALIGN value
See Also:
TagPropertyConstants.isAlignType(java.lang.String), HTMLTag.reconstructTag

setWidth

public void setWidth(int attribute,
                     boolean asPercent)
Sets the HTML Tag WIDTH attribute. Sets the value of the HTMLTag.reconstructTag to true.

Parameters:
attribute - the new width value
asPercent - true if the value of attribute should be treated as a percentage, and thus append a percent sign after the width value; false if the value should be treated as an absolute pixel specification, and written as is
See Also:
HTMLTag.reconstructTag

resetTagSpecificInformation

protected void resetTagSpecificInformation()
Description copied from class: HTMLTag
Resets the tag attributes and content of the HTML Tag to their default values. Called by HTMLTag.reset(). This method is not implemented in HTMLTag. Subclasses that contain tag content information should implement this method to set their information to their default values.

Overrides:
resetTagSpecificInformation in class HTMLTag
See Also:
HTMLTag.reset()

writeTagSpecificAttributes

protected void writeTagSpecificAttributes()
Description copied from class: HTMLTag
Adds the tag specific attribute information to the HTML Tag. Called by HTMLTag.toString(). This method is not implemented in HTMLTag. Subclasses that contain additional attribute information should implement this method to write those attributes in the inline tag.

Overrides:
writeTagSpecificAttributes in class HTMLTag
See Also:
HTMLTag.toString()