|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnextapp.echoservlet.html.Element
echopoint.ui.util.NoNameElement
public class NoNameElement
The NoNameElement
class is used to contain other elements
however it does not generate an HTML element itself. It can be used when
you need an element parent but dont need a corresponding HTML parent tag
For example the JspTemplate code needs a "dummy" element into which it can render its children. However its does not need an parent HTML DIV element to do this. Rather it uses a NoNameElement to "contain" the child components output.
So instead of "<div> some content inside </div>" it would just generate "some content inside".
This component also allows you to "reach" into the element and extract child Renderable objects.
Field Summary |
---|
Fields inherited from interface nextapp.echoservlet.html.Renderable |
---|
INDENT_STRING |
Constructor Summary | |
---|---|
NoNameElement()
|
Method Summary | |
---|---|
void |
add(int index,
Renderable child)
Adds a renderable object to the element at a specified index. |
void |
add(Renderable child)
Adds a renderable object to the element. |
void |
addHtml(int index,
java.lang.String html)
Adds raw HTML to the body of the element at a specified index. |
void |
addHtml(java.lang.String html)
Adds raw HTML to the body of the element. |
void |
addText(int index,
java.lang.String text,
boolean encodeNewLines)
Adds plain text to the body of the element at a specified index. |
void |
addText(java.lang.String text)
Adds plain text to the body of the element. |
void |
addText(java.lang.String text,
boolean encodeNewLines)
Adds plain text to the body of the element. |
Renderable |
getChild(int index)
Returns the Renderable child at index |
ElementContent |
getContents()
|
int |
indexOf(java.lang.Object child)
Returns the index of the specified object if it is a child of this Element. |
void |
render(java.io.PrintWriter pw,
int depth,
boolean parentWhitespaceRelevant)
Renders this element and its children to a PrintWriter. |
java.util.Iterator |
renderables()
Returns an iterator of all the Renderable objects within this NoNameElement. |
Methods inherited from class nextapp.echoservlet.html.Element |
---|
addAttribute, addAttribute, addAttribute, addElement, addElement, addElementContent, addElementContent, allocate, allocate, getAttribute, getCreationCount, getName, isSticky, releaseElements, removeAttribute, render, renderAsStyleAttribute, reset, setClosingTagRequired, setSticky, setWhitespaceRelevant |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NoNameElement()
Method Detail |
---|
public void add(int index, Renderable child)
Element
add
in class Element
index
- The index at which to add the renderable.child
- The renderable object to add to the element.Element.add(int, nextapp.echoservlet.html.Renderable)
public void add(Renderable child)
Element
add
in class Element
child
- The renderable object to add to the element.Element.add(nextapp.echoservlet.html.Renderable)
public void addHtml(int index, java.lang.String html)
Element
addHtml
in class Element
index
- The index at which to add the HTML.html
- Encoded HTML content to be added to this element.Element.addHtml(int, java.lang.String)
public void addHtml(java.lang.String html)
Element
addHtml
in class Element
html
- Encoded HTML content to be added to this element.Element.addHtml(java.lang.String)
public void addText(int index, java.lang.String text, boolean encodeNewLines)
Element
addText
in class Element
index
- The index at which to add the text.text
- Unencoded text to be added as HTML to the body of the element.encodeNewLines
- A flag indicating if new line characters should be translated
to <BR>s.Element.addText(int, java.lang.String, boolean)
public void addText(java.lang.String text)
Element
addText
in class Element
Element.addText(java.lang.String)
public void addText(java.lang.String text, boolean encodeNewLines)
Element
addText
in class Element
text
- Unencoded text to be added as HTML to the body of the element.encodeNewLines
- A flag indicating if new line characters should be translated
to <BR>s.Element.addText(java.lang.String, boolean)
public void render(java.io.PrintWriter pw, int depth, boolean parentWhitespaceRelevant)
Element
render
in interface Renderable
render
in class Element
pw
- The print writer to render the element to.depth
- The indentation depth to indent the element to.parentWhitespaceRelevant
- A flag indicating whether the parent element had the
WhitespaceRelevant property set.Renderable.render(java.io.PrintWriter, int, boolean)
public java.util.Iterator renderables()
public Renderable getChild(int index)
index
- - the index to look at
public int indexOf(java.lang.Object child)
Element
indexOf
in class Element
child
- The child object whose index is desired.
Element.indexOf(java.lang.Object)
public ElementContent getContents()
getContents
in class Element
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |