org.apache.wicket.markup
Class HtmlSpecialTag

java.lang.Object
  extended by org.apache.wicket.markup.MarkupElement
      extended by org.apache.wicket.markup.HtmlSpecialTag

public class HtmlSpecialTag
extends MarkupElement

Author:
Juergen Donnerstag

Field Summary
protected  XmlTag xmlTag
          The underlying xml tag
 
Constructor Summary
HtmlSpecialTag(XmlTag tag, IXmlPullParser.HttpTagType httpTagType)
          Construct.
 
Method Summary
 boolean equalTo(MarkupElement element)
          This is not an implementation of equals because we don't care about hashCodes for MarkupElements yet.
 boolean getFlag(int flag)
          THIS METHOD IS NOT PART OF THE WICKET PUBLIC API.
 IXmlPullParser.HttpTagType getHttpTagType()
          Gets httpTagType.
 int getLength()
          Gets the length of the tag in characters.
 int getPos()
           
 XmlTag.TagType getType()
           
 XmlTag getXmlTag()
           
 boolean isClose()
           
 boolean isOpen()
           
 boolean isOpenClose()
           
 void onBeforeRender(Component component, MarkupStream markupStream)
          For subclasses to override.
 void setFlag(int flag, boolean set)
          THIS METHOD IS NOT PART OF THE WICKET PUBLIC API.
 java.lang.CharSequence toCharSequence()
           
 java.lang.String toString()
          Converts this object to a string representation.
 java.lang.String toUserDebugString()
          Converts this object to a string representation including useful information for debugging
 void writeOutput(Response response, boolean stripWicketAttributes, java.lang.String namespace)
          Write the tag to the response
 
Methods inherited from class org.apache.wicket.markup.MarkupElement
closes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

xmlTag

protected final XmlTag xmlTag
The underlying xml tag

Constructor Detail

HtmlSpecialTag

public HtmlSpecialTag(XmlTag tag,
                      IXmlPullParser.HttpTagType httpTagType)
Construct.

Parameters:
tag - The underlying xml tag
httpTagType -
Method Detail

setFlag

public final void setFlag(int flag,
                          boolean set)
THIS METHOD IS NOT PART OF THE WICKET PUBLIC API. DO NOT USE IT!

Parameters:
flag - The flag to set
set - True to turn the flag on, false to turn it off

getFlag

public final boolean getFlag(int flag)
THIS METHOD IS NOT PART OF THE WICKET PUBLIC API. DO NOT USE IT!

Parameters:
flag - The flag to test
Returns:
True if the flag is set

getLength

public final int getLength()
Gets the length of the tag in characters.

Returns:
The tag's length

getPos

public final int getPos()
Returns:
Tag location (index in input string)
See Also:
XmlTag.getPos()

getType

public final XmlTag.TagType getType()
Returns:
the tag type (OPEN, CLOSE or OPEN_CLOSE).

isClose

public final boolean isClose()
Returns:
True if this tag is a close tag
See Also:
XmlTag.isClose()

isOpen

public final boolean isOpen()
Returns:
True if this tag is an open tag
See Also:
XmlTag.isOpen()

isOpenClose

public final boolean isOpenClose()
Returns:
True if this tag is an open and a close tag
See Also:
XmlTag.isOpenClose()

toCharSequence

public java.lang.CharSequence toCharSequence()
Specified by:
toCharSequence in class MarkupElement
Returns:
Gets the charsequence representation of this element

toString

public final java.lang.String toString()
Converts this object to a string representation.

Overrides:
toString in class java.lang.Object
Returns:
String version of this object

writeOutput

public final void writeOutput(Response response,
                              boolean stripWicketAttributes,
                              java.lang.String namespace)
Write the tag to the response

Parameters:
response - The response to write to
stripWicketAttributes - if true, wicket:id are removed from output
namespace - Wicket's namespace to use

toUserDebugString

public final java.lang.String toUserDebugString()
Converts this object to a string representation including useful information for debugging

Specified by:
toUserDebugString in class MarkupElement
Returns:
String version of this object

getXmlTag

public final XmlTag getXmlTag()
Returns:
Returns the underlying xml tag.

equalTo

public boolean equalTo(MarkupElement element)
Description copied from class: MarkupElement
This is not an implementation of equals because we don't care about hashCodes for MarkupElements yet. Also, this method only compares the namespace, name and attributes of the given MarkupElements.

Specified by:
equalTo in class MarkupElement
Parameters:
element - The markup element to compare with
Returns:
True if the other element equals this one

onBeforeRender

public void onBeforeRender(Component component,
                           MarkupStream markupStream)
For subclasses to override. Gets called just before a Component gets rendered. It is guaranteed that the markupStream is set on the Component and determineVisibility is not yet called.

Parameters:
component - The component that is about to be rendered
markupStream - The current amrkup stream

getHttpTagType

public final IXmlPullParser.HttpTagType getHttpTagType()
Gets httpTagType.

Returns:
httpTagType


Copyright © 2006-2011 Apache Software Foundation. All Rights Reserved.