net.sf.tacos.markup
Class ExtendedMarkupWriterImpl
java.lang.Object
net.sf.tacos.markup.ExtendedMarkupWriterImpl
- All Implemented Interfaces:
- IExtendedMarkupWriter, org.apache.tapestry.IMarkupWriter
public class ExtendedMarkupWriterImpl
- extends Object
- implements IExtendedMarkupWriter
Decorates an existing IMarkupWriter in order to add
a few shortcut methods.
- See Also:
create(String, String...),
createEmpty(String, String...)
|
Method Summary |
void |
appendAttribute(String name,
boolean value)
|
void |
appendAttribute(String name,
int value)
|
void |
appendAttribute(String name,
String value)
|
void |
appendAttributeRaw(String name,
String value)
|
void |
attribute(String name,
boolean value)
|
void |
attribute(String name,
int value)
|
void |
attribute(String name,
String value)
|
void |
attributeRaw(String name,
String value)
|
void |
begin(String name)
|
void |
beginEmpty(String name)
|
boolean |
checkError()
|
void |
clearAttributes()
|
void |
close()
|
void |
closeTag()
|
void |
comment(String value)
|
IExtendedMarkupWriter |
create(String tag,
String... attributes)
Starts a new element and appends
the given attributes and values. |
IExtendedMarkupWriter |
createEmpty(String tag,
String... attributes)
Starts an element that will not later be matched with an end() call
( this is useful for elements that do not need closing tags ) and appends
the given attributes and values. |
void |
end()
|
void |
end(String name)
|
void |
flush()
|
org.apache.tapestry.markup.Attribute |
getAttribute(String name)
|
String |
getContentType()
|
org.apache.tapestry.NestedMarkupWriter |
getNestedWriter()
|
boolean |
hasAttribute(String name)
|
void |
print(char value)
|
void |
print(char[] data,
int offset,
int length)
|
void |
print(char[] data,
int offset,
int length,
boolean raw)
|
void |
print(int value)
|
void |
print(String value)
|
void |
print(String value,
boolean raw)
|
void |
println()
|
void |
printRaw(char[] buffer,
int offset,
int length)
|
void |
printRaw(String value)
|
org.apache.tapestry.markup.Attribute |
removeAttribute(String name)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ExtendedMarkupWriterImpl
public ExtendedMarkupWriterImpl(org.apache.tapestry.IMarkupWriter writer)
createEmpty
public IExtendedMarkupWriter createEmpty(String tag,
String... attributes)
- Starts an element that will not later be matched with an end() call
( this is useful for elements that do not need closing tags ) and appends
the given attributes and values.
- Specified by:
createEmpty in interface IExtendedMarkupWriter
- Parameters:
tag - The html tag to generate.attributes - An alterating list of attributes and values.
- Returns:
- See Also:
IMarkupWriter.beginEmpty(String)
create
public IExtendedMarkupWriter create(String tag,
String... attributes)
- Starts a new element and appends
the given attributes and values.
- Specified by:
create in interface IExtendedMarkupWriter
- Returns:
- See Also:
IMarkupWriter.begin(String)
attribute
public void attribute(String name,
int value)
- Specified by:
attribute in interface org.apache.tapestry.IMarkupWriter
attribute
public void attribute(String name,
boolean value)
- Specified by:
attribute in interface org.apache.tapestry.IMarkupWriter
attribute
public void attribute(String name,
String value)
- Specified by:
attribute in interface org.apache.tapestry.IMarkupWriter
attributeRaw
public void attributeRaw(String name,
String value)
- Specified by:
attributeRaw in interface org.apache.tapestry.IMarkupWriter
appendAttribute
public void appendAttribute(String name,
int value)
- Specified by:
appendAttribute in interface org.apache.tapestry.IMarkupWriter
appendAttribute
public void appendAttribute(String name,
boolean value)
- Specified by:
appendAttribute in interface org.apache.tapestry.IMarkupWriter
appendAttribute
public void appendAttribute(String name,
String value)
- Specified by:
appendAttribute in interface org.apache.tapestry.IMarkupWriter
appendAttributeRaw
public void appendAttributeRaw(String name,
String value)
- Specified by:
appendAttributeRaw in interface org.apache.tapestry.IMarkupWriter
hasAttribute
public boolean hasAttribute(String name)
- Specified by:
hasAttribute in interface org.apache.tapestry.IMarkupWriter
getAttribute
public org.apache.tapestry.markup.Attribute getAttribute(String name)
- Specified by:
getAttribute in interface org.apache.tapestry.IMarkupWriter
removeAttribute
public org.apache.tapestry.markup.Attribute removeAttribute(String name)
- Specified by:
removeAttribute in interface org.apache.tapestry.IMarkupWriter
clearAttributes
public void clearAttributes()
- Specified by:
clearAttributes in interface org.apache.tapestry.IMarkupWriter
begin
public void begin(String name)
- Specified by:
begin in interface org.apache.tapestry.IMarkupWriter
beginEmpty
public void beginEmpty(String name)
- Specified by:
beginEmpty in interface org.apache.tapestry.IMarkupWriter
checkError
public boolean checkError()
- Specified by:
checkError in interface org.apache.tapestry.IMarkupWriter
close
public void close()
- Specified by:
close in interface org.apache.tapestry.IMarkupWriter
closeTag
public void closeTag()
- Specified by:
closeTag in interface org.apache.tapestry.IMarkupWriter
comment
public void comment(String value)
- Specified by:
comment in interface org.apache.tapestry.IMarkupWriter
end
public void end()
- Specified by:
end in interface org.apache.tapestry.IMarkupWriter
end
public void end(String name)
- Specified by:
end in interface org.apache.tapestry.IMarkupWriter
flush
public void flush()
- Specified by:
flush in interface org.apache.tapestry.IMarkupWriter
getNestedWriter
public org.apache.tapestry.NestedMarkupWriter getNestedWriter()
- Specified by:
getNestedWriter in interface org.apache.tapestry.IMarkupWriter
print
public void print(char[] data,
int offset,
int length)
- Specified by:
print in interface org.apache.tapestry.IMarkupWriter
print
public void print(char[] data,
int offset,
int length,
boolean raw)
- Specified by:
print in interface org.apache.tapestry.IMarkupWriter
print
public void print(char value)
- Specified by:
print in interface org.apache.tapestry.IMarkupWriter
print
public void print(int value)
- Specified by:
print in interface org.apache.tapestry.IMarkupWriter
print
public void print(String value)
- Specified by:
print in interface org.apache.tapestry.IMarkupWriter
print
public void print(String value,
boolean raw)
- Specified by:
print in interface org.apache.tapestry.IMarkupWriter
println
public void println()
- Specified by:
println in interface org.apache.tapestry.IMarkupWriter
printRaw
public void printRaw(char[] buffer,
int offset,
int length)
- Specified by:
printRaw in interface org.apache.tapestry.IMarkupWriter
printRaw
public void printRaw(String value)
- Specified by:
printRaw in interface org.apache.tapestry.IMarkupWriter
getContentType
public String getContentType()
- Specified by:
getContentType in interface org.apache.tapestry.IMarkupWriter
Copyright ? 2007-2008 SourceForge.net. All Rights Reserved.