org.displaytag.util
Class Anchor

java.lang.Object
  extended byorg.displaytag.util.Anchor

public class Anchor
extends java.lang.Object

Anchor object used to output an html link (an <a> tag).

Version:
$Revision: 1.10 $ ($Author: fgiust $)
Author:
Fabrizio Giustina

Constructor Summary
Anchor(Href linkHref, java.lang.String linkBody)
          Creates a new Anchor whit the supplied Href and body text.
 
Method Summary
 java.lang.String getCloseTag()
          returns the </a> tag.
 java.lang.String getOpenTag()
          Returns the <a> tag, with rendered href and any html attribute.
 void setClass(java.lang.String cssClass)
          add a "class" attribute to the html link.
 void setHref(Href linkHref)
          setter the anchor Href.
 void setStyle(java.lang.String style)
          add a "style" attribute to the html link.
 void setText(java.lang.String linkBody)
          setter for the link body text.
 void setTitle(java.lang.String title)
          add a "title" attribute to the html link.
 java.lang.String toString()
          returns the full <a href="">body</a>.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Anchor

public Anchor(Href linkHref,
              java.lang.String linkBody)
Creates a new Anchor whit the supplied Href and body text.

Parameters:
linkHref - baseHref
linkBody - String link body
Method Detail

setHref

public void setHref(Href linkHref)
setter the anchor Href.

Parameters:
linkHref - Href

setText

public void setText(java.lang.String linkBody)
setter for the link body text.

Parameters:
linkBody - String

setClass

public void setClass(java.lang.String cssClass)
add a "class" attribute to the html link.

Parameters:
cssClass - String

setStyle

public void setStyle(java.lang.String style)
add a "style" attribute to the html link.

Parameters:
style - String

setTitle

public void setTitle(java.lang.String title)
add a "title" attribute to the html link.

Parameters:
title - String

getOpenTag

public java.lang.String getOpenTag()
Returns the <a> tag, with rendered href and any html attribute.

Returns:
String

getCloseTag

public java.lang.String getCloseTag()
returns the </a> tag.

Returns:
String

toString

public java.lang.String toString()
returns the full <a href="">body</a>.

Returns:
String html link


Copyright © 2002-2005 the Displaytag team. All Rights Reserved.