Package org.apache.wicket.markup
Class HtmlSpecialTag
- java.lang.Object
-
- org.apache.wicket.markup.MarkupElement
-
- org.apache.wicket.markup.HtmlSpecialTag
-
public class HtmlSpecialTag extends MarkupElement
- Author:
- Juergen Donnerstag
-
-
Constructor Summary
Constructors Constructor Description HtmlSpecialTag(XmlTag tag, IXmlPullParser.HttpTagType httpTagType)
Construct.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.CharSequence
toCharSequence()
String
toString()
Converts this object to a string representation.String
toUserDebugString()
Converts this object to a string representation including useful information for debuggingvoid
writeOutput(Response response, boolean stripWicketAttributes, String namespace)
Write the tag to the response-
Methods inherited from class org.apache.wicket.markup.MarkupElement
closes
-
-
-
-
Constructor Detail
-
HtmlSpecialTag
public HtmlSpecialTag(XmlTag tag, IXmlPullParser.HttpTagType httpTagType)
Construct.- Parameters:
tag
- The underlying xml taghttpTagType
-
-
-
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 setset
- 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 CharSequence toCharSequence()
- Specified by:
toCharSequence
in classMarkupElement
- Returns:
- Gets the charsequence representation of this element
-
writeOutput
public final void writeOutput(Response response, boolean stripWicketAttributes, String namespace)
Write the tag to the response- Parameters:
response
- The response to write tostripWicketAttributes
- if true, wicket:id are removed from outputnamespace
- Wicket's namespace to use
-
toUserDebugString
public final String toUserDebugString()
Converts this object to a string representation including useful information for debugging- Specified by:
toUserDebugString
in classMarkupElement
- Returns:
- String version of this object
-
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 classMarkupElement
- 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 renderedmarkupStream
- The current amrkup stream
-
getHttpTagType
public final IXmlPullParser.HttpTagType getHttpTagType()
Gets httpTagType.- Returns:
- httpTagType
-
-