com.ge.research.html
Class AnchorTag

java.lang.Object
  extended bycom.ge.research.html.HTMLTag
      extended bycom.ge.research.html.ContentWrapperTag
          extended bycom.ge.research.html.AnchorTag
All Implemented Interfaces:
ContentWrapper

public class AnchorTag
extends ContentWrapperTag

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

Version:
$Revision: 1.2 $ $Date: 2007/03/08 16:14:13 $
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
AnchorTag()
          Default constructor.
AnchorTag(java.lang.Object contents)
          Calls the default constructor.
 
Method Summary
 java.lang.String getAlt()
          Returns the value of the HTML Tag ALT attribute.
 java.lang.String getHref()
          Returns the value of the HTML Tag HREF attribute.
 java.lang.String getName()
          Returns the value of the HTML Tag NAME attribute.
 java.lang.String getTarget()
          Returns the value of the HTML Tag TARGET attribute.
protected  void resetTagSpecificInformation()
          Resets the tag attributes and content of the HTML Tag to their default values.
 void setAlt(java.lang.String attribute)
          Sets the HTML Tag ALT attribute.
 void setHref(java.lang.String attribute)
          Sets the HTML Tag HREF attribute.
 void setName(java.lang.String attribute)
          Sets the HTML Tag NAME attribute.
 void setTarget(java.lang.String attribute)
          Sets the HTML Tag TARGET attribute and validates its value.
protected  void writeTagSpecificAttributes()
          Adds the tag specific attribute information to the HTML Tag.
 
Methods inherited from class com.ge.research.html.ContentWrapperTag
getContentEditable, getContents, getNowrap, setContentEditable, setContents, setNowrap, writeTagSpecificData
 
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

AnchorTag

public AnchorTag()
Default constructor. Calls super(TagPropertyConstants.ANCHOR_TAG).

See Also:
TagPropertyConstants.ANCHOR_TAG

AnchorTag

public AnchorTag(java.lang.Object contents)
Calls the default constructor. Sets the tag contents.

See Also:
ContentWrapper.setContents(java.lang.Object)
Method Detail

getAlt

public java.lang.String getAlt()
Returns the value of the HTML Tag ALT attribute.

Returns:
The current value of the HTML Tag ALT attribute

getHref

public java.lang.String getHref()
Returns the value of the HTML Tag HREF attribute.

Returns:
The current value of the HTML Tag HREF attribute

getName

public java.lang.String getName()
Returns the value of the HTML Tag NAME attribute.

Returns:
The current value of the HTML Tag NAME attribute

getTarget

public java.lang.String getTarget()
Returns the value of the HTML Tag TARGET attribute.

Returns:
The current value of the HTML Tag TARGET attribute

setAlt

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

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

setHref

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

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

setName

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

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

setTarget

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

Parameters:
attribute - the new value for the HTML Tag TARGET attribute
See Also:
TagPropertyConstants.isAnchorTarget(java.lang.String), 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 ContentWrapperTag

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 ContentWrapperTag