com.plumtree.xpshared.htmlelements
Class HTMLAnchor

java.lang.Object
  extended by com.plumtree.xpshared.htmlelements.HTMLElement
      extended by com.plumtree.xpshared.htmlelements.HTMLAnchor
All Implemented Interfaces:
TabableHTMLElement, java.lang.Cloneable

public class HTMLAnchor
extends HTMLElement
implements TabableHTMLElement

This class can be used to display an HTML anchor element.

Spec


Nested Class Summary
 
Nested classes/interfaces inherited from class com.plumtree.xpshared.htmlelements.HTMLElement
HTMLElement.ValidationLevel
 
Field Summary
static boolean bEnforceTitle
           
 
Fields inherited from class com.plumtree.xpshared.htmlelements.HTMLElement
aNewLine, bAllowEvents, bAllowSetStyleClassWithString, bCheckNestedStringForHTML, bDisplayDidPause, bEnforceMaxTableDepth, bForceFormattingOff, bForceFormattingOn, bPauseAfterDisplay, bPrintComments, bResumingAndChildFinished, bResumingAndChildInMidRender, bShowLang, iMaxTableDepth, sLangLocal, sNewLine, sTab
 
Constructor Summary
HTMLAnchor(java.lang.String sAnchorHRef)
          Creates a new HTMLAnchor object.
 
Method Summary
protected  void AppendBeginningOfOpeningTag(boolean bFormat, XPStringBuilder sb, IXPResponse response)
          Draw the beginning of the anchor tag.
protected  void AppendClosingTag(boolean bFormat, XPStringBuilder sb, IXPResponse response)
          Append the closing anchor tag
 void ClearTabIndex()
          Call this method to remove the tab index from this HTMLElement.
 java.lang.String GetAccessKey()
          Call this method to get the value of the accesskey attribute.
 java.lang.String GetHRef()
          Get the value of the href attribute
 java.lang.String GetOnContextMenu(java.lang.String s)
           
 java.lang.String GetTabIndex()
          Call this method to get the value of the tabindex attribute.
 java.lang.String GetTarget()
          Get the value of the target attribute.
 java.lang.String GetTitle()
          Get the value of the title attribute.
protected  void InternalWrite(boolean bFormat, XPStringBuilder sbLocal, IXPResponse response)
          This method contains the bulk of the logic for writting an HTMLElement.
protected  boolean ProvidesClosingTag()
          Used to determine whether or not to display a closing tag for this concret subclass of HTMLElement.
 void SetAccessKey(java.lang.String s)
          Call this method to set the value of the accesskey attribute.
 void SetAllowNullHRef(boolean b)
          Call this method with true to allow for the absence of an href attribute.
 void SetHRef(java.lang.String sAnchorHRef)
          Use this method to set the value of the href attribute.
 void SetOnContextMenu(java.lang.String s)
           
 void SetTabIndex(java.lang.String s)
          Call this method to set the value of the tabindex attribute.
 void SetTarget(java.lang.String s)
          Set the value of the target attribute.
 void SetTitle(java.lang.String s)
          Set the value of the title attribute.
 
Methods inherited from class com.plumtree.xpshared.htmlelements.HTMLElement
AddInnerHTMLElement, AddInnerHTMLEncodedString, AddInnerHTMLString, AppendClosingLineBreak, CleanupHTMLSubtreeAfterRendering, ClearInnerHTMLElements, clone, Display, Display, ForceFormattingOff, GetChildInMidRender, GetClone, GetDisabled, GetDisplayDidPause, GetDisplayOptions, GetDisplayString, GetDisplayString, GetDisplayString, GetDo508Checking, GetDoFormat, GetElementName, GetForceLineBreaksAfterSafeElements, GetHTMLElementReadOnly, GetID, GetImgBaseUrl, GetInnerHTML, GetInnerHTML, GetInnerHTMLDisplayString, GetInnerHTMLElements, GetInnerHTMLElementsAsArrayList, GetIsNetscape, GetLang, GetLastChildFullyRendered, GetName, GetOnClick, GetOnKeyDown, GetOnKeyPress, GetOnKeyUp, GetOnMouseOut, GetOnMouseOver, GetPauseAfterDisplay, GetPostComment, GetPreComment, GetStringBuilder, GetStyle, GetStyleClass, GetStyleClassPrefix, GetValidationLevel, InsertInnerHTMLElement, SaveToTempFile, SaveToTempFile, SetChildInMidRender, SetDisabled, SetDisplayOptions, SetDo508Checking, SetDoFormat, SetElementName, SetFlushAfterDisplay, SetForceLineBreaksAfterSafeElements, SetHTMLElementReadOnly, SetID, SetImgBaseUrl, SetInner, SetIsNetscape, SetLangGlobal, SetLangLocal, SetLastChildFullyRendered, SetName, SetOnClick, SetOnKeyDown, SetOnKeyPress, SetOnKeyUp, SetOnMouseOut, SetOnMouseOver, SetPauseAfterDisplay, SetPostComment, SetPreComment, SetStyle, SetStyleClass, SetStyleClass, SetStyleClassPrefix, SetValidationLevel, ToByteArray, VerifyWritability, WriteNugget, WriteNugget
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

bEnforceTitle

public static boolean bEnforceTitle
Constructor Detail

HTMLAnchor

public HTMLAnchor(java.lang.String sAnchorHRef)
Creates a new HTMLAnchor object.

Parameters:
sAnchorHRef - Pass the value of the href parameter.
Method Detail

GetAccessKey

public java.lang.String GetAccessKey()
Call this method to get the value of the accesskey attribute.

Returns:
The String value of the accesskey attribute.

GetHRef

public java.lang.String GetHRef()
Get the value of the href attribute

Returns:
The String value of the href attribute.

GetTabIndex

public java.lang.String GetTabIndex()
Call this method to get the value of the tabindex attribute.

Specified by:
GetTabIndex in interface TabableHTMLElement
Returns:
The String value of the tabindex attribute.

GetTarget

public java.lang.String GetTarget()
Get the value of the target attribute.

Returns:
The String value of the target attribute.

GetTitle

public java.lang.String GetTitle()
Get the value of the title attribute.

Overrides:
GetTitle in class HTMLElement
Returns:
The String value of the title attribute.

SetAccessKey

public void SetAccessKey(java.lang.String s)
Call this method to set the value of the accesskey attribute.

Parameters:
s - Pass the String value.

SetAllowNullHRef

public void SetAllowNullHRef(boolean b)
Call this method with true to allow for the absence of an href attribute. By default, a null href value causes the anchor to not display at all, and only display nested HTMLElement objects.

Parameters:
b -

SetHRef

public void SetHRef(java.lang.String sAnchorHRef)
Use this method to set the value of the href attribute.

Parameters:
sAnchorHRef - Pass the value of the href attribute.

GetOnContextMenu

public java.lang.String GetOnContextMenu(java.lang.String s)
Parameters:
s -

SetOnContextMenu

public void SetOnContextMenu(java.lang.String s)
Parameters:
s -

SetTabIndex

public void SetTabIndex(java.lang.String s)
Call this method to set the value of the tabindex attribute.

Specified by:
SetTabIndex in interface TabableHTMLElement
Parameters:
s - Pass the String value.

SetTarget

public void SetTarget(java.lang.String s)
Set the value of the target attribute.

Parameters:
s - The String value of the target attribute.

SetTitle

public void SetTitle(java.lang.String s)
Set the value of the title attribute.

Overrides:
SetTitle in class HTMLElement
Parameters:
s - The String value of the title attribute.

ClearTabIndex

public void ClearTabIndex()
Call this method to remove the tab index from this HTMLElement.

Specified by:
ClearTabIndex in interface TabableHTMLElement

InternalWrite

protected void InternalWrite(boolean bFormat,
                             XPStringBuilder sbLocal,
                             IXPResponse response)
This method contains the bulk of the logic for writting an HTMLElement. For subclasses needing to modify their display behavior, this is the primary method to override.

Overrides:
InternalWrite in class HTMLElement
Parameters:
bFormat - Pass a boolean indicating whether or not to format the output.
sbLocal - Pass an XPStringBuilder to which you wish the String appended. Pass null if you do not wish the string appended to an XPStringBuilder.
response - Pass an IXPResponse to which you wish the String written. Pass null if you do not wish the string written to an IXPResponse.
Throws:
HTMLException

AppendBeginningOfOpeningTag

protected void AppendBeginningOfOpeningTag(boolean bFormat,
                                           XPStringBuilder sb,
                                           IXPResponse response)
Draw the beginning of the anchor tag.

Specified by:
AppendBeginningOfOpeningTag in class HTMLElement
Parameters:
bFormat - boolean indicating whether or not to format.
sb - XPStringBuilder
response - IXPResponse

AppendClosingTag

protected void AppendClosingTag(boolean bFormat,
                                XPStringBuilder sb,
                                IXPResponse response)
Append the closing anchor tag

Specified by:
AppendClosingTag in class HTMLElement
Parameters:
bFormat - boolean indicating whether or not to format.
sb - XPStringBuilder
response - IXPResponse

ProvidesClosingTag

protected boolean ProvidesClosingTag()
Used to determine whether or not to display a closing tag for this concret subclass of HTMLElement.

Specified by:
ProvidesClosingTag in class HTMLElement
Returns:
boolean true.



Copyright © 2002,2003,2004,2005 Plumtree Software, Inc., All Rights Reserved.