com.ge.research.html
Class OptionTag

java.lang.Object
  extended bycom.ge.research.html.HTMLTag
      extended bycom.ge.research.html.OptionTag

public class OptionTag
extends HTMLTag

Encapsulates all the attributes of an HTML "OPTION" element, its accessors, validations, and default values.

Version:
$Revision: 1.1 $ $Date: 2006/08/11 00:17:31 $
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
OptionTag()
          Default constructor.
 
Method Summary
 boolean getSelected()
          Returns true if this HTML Tag has a SELECTED attribute; false if this HTML Tag does not have a SELECTED attribute.
 java.lang.String getText()
          Returns the contents of the HTML Tag.
 java.lang.String getValue()
          Returns the value of the HTML Tag VALUE attribute.
protected  void resetTagSpecificInformation()
          Resets the tag attributes and content of the HTML Tag to their default values.
 void setSelected(boolean attribute)
          Sets the HTML Tag SELECTED attribute.
 void setText(java.lang.String text)
          Sets the contents of this tag.
 void setValue(java.lang.String attribute)
          Sets the HTML Tag VALUE attribute.
protected  void writeTagSpecificAttributes()
          Adds the tag specific attribute information to the HTML Tag.
protected  void writeTagSpecificData()
          Adds the tag content 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OptionTag

public OptionTag()
Default constructor. Calls super(TagPropertyConstants.OPTION_TAG).

See Also:
TagPropertyConstants.OPTION_TAG
Method Detail

getSelected

public boolean getSelected()
Returns true if this HTML Tag has a SELECTED attribute; false if this HTML Tag does not have a SELECTED attribute.

Returns:
true if this HTML Tag has a SELECTED attribute; false if this HTML Tag does not have a SELECTED attribute.

getText

public java.lang.String getText()
Returns the contents of the HTML Tag.

Returns:
The current contents of the HTML Tag

getValue

public java.lang.String getValue()
Returns the value of the HTML Tag VALUE attribute.

Returns:
The current value of the HTML Tag VALUE attribute

setSelected

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

Parameters:
attribute - true if this HTML Tag should have a SELECTED attribute; false if this HTML Tag should not have a SELECTED attribute.
See Also:
HTMLTag.reconstructTag

setText

public void setText(java.lang.String text)
Sets the contents of this tag. Sets the HTMLTag.reconstructTag value to true.

Parameters:
text - the content for this tag
See Also:
HTMLTag.reconstructTag

setValue

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

Parameters:
attribute - the new value for the HTML Tag VALUE attribute
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()

writeTagSpecificData

protected void writeTagSpecificData()
Description copied from class: HTMLTag
Adds the tag content to the HTML Tag. Called by HTMLTag.toString(). This method is not implemented in HTMLTag. Subclasses that contain tag content information should implement this method to writeout that content in between the opening and closing tags.

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