Methods Summary |
---|
public IElementList | add(IContent content)Overridden to add to the doc body.
m_body.add (content);
return this;
|
public void | addEmptyP()
add (IElement.Factory.create (Tag.P));
|
public void | addH(int level, java.lang.String text, java.lang.String classID)
final Tag Hl = Tag.Hs [level];
final IElement h = IElement.Factory.create (Hl);
h.setText (text, true);
h.setClass (classID);
add (h);
|
public void | addH(int level, IContent text, java.lang.String classID)
final Tag Hl = Tag.Hs [level];
final IElement h = IElement.Factory.create (Hl);
h.add (text);
h.setClass (classID);
add (h);
|
public void | addHR(int size)
final IElement hr = IElement.Factory.create (Tag.HR);
hr.getAttributes ().set (Attribute.SIZE, size);
add (hr);
|
public void | addLINK(java.lang.String type, java.lang.String href)Adds a <LINK> to the head.
final ISimpleElement link = ISimpleElement.Factory.create (Tag.LINK);
// TODO: add REL="STYLESHEET"
link.getAttributes ().set (Attribute.TYPE, type); // TODO: escape
link.getAttributes ().set (Attribute.HREF, href); // TODO: escape
link.getAttributes ().set (Attribute.SRC, href); // TODO: escape
m_head.add (link);
|
public void | addStyle(java.lang.String css)
if (css != null)
{
final IElement style = IElement.Factory.create (Tag.STYLE);
style.getAttributes ().set (Attribute.TYPE, "text/css");
final StringBuffer def = new StringBuffer ("<!--");
def.append (IConstants.EOL);
style.setText (css, false);
def.append (IConstants.EOL);
def.append ("-->");
m_head.add (style);
}
|
public void | emit(HTMLWriter out)Overridden to ensure header/footer appear first/last in the body.
if (m_header != null) m_body.add (0, m_header);
if (m_footer != null) m_body.add (m_body.size (), m_footer);
super.emit(out);
|
public IElement | getBody()
return m_body;
|
public IContent | getFooter()
return m_footer;
|
public IElement | getHead()
return m_head;
|
public IContent | getHeader()
return m_header;
|
public java.lang.String | getTitle()
return m_title;
|
public void | setFooter(IContent footer)
if (footer != null) m_footer = footer;
|
public void | setHeader(IContent header)
if (header != null) m_header = header;
|