|
PAJES 2.3.9 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.pajes.html.Tag
org.pajes.html.TraversableElement
org.pajes.html.Container
The base class for all HTML objects that contain other HTML objects. Also used by utility sub-classes that may or may not end up in a specified container.
| Field Summary |
| Fields inherited from class org.pajes.html.Tag |
ON_CLICK_ATTRIBUTE, TAG_CLOSE, TAG_LEFT, TAG_RIGHT |
| Constructor Summary | |
Container()
Creates an empty Container. |
|
Container(java.lang.String name)
Creates an empty Container. |
|
| Method Summary | |
Container |
add(HTML htmlObject)
Adds an HTML object to the current container |
Container |
add(java.lang.String htmlCodeOrString)
Adds a string or piece of HTML code to the current container. |
Container |
add(java.lang.String htmlCodeOrString,
boolean suppressNewLine)
Adds a string or piece of HTML code to the current container |
Container |
add(java.lang.String htmlCodeOrString,
boolean suppressNewLine,
boolean encode)
Adds a string or piece of HTML code to the current container |
void |
addContent(java.lang.String content)
Adds the specified String to this container. |
Container |
clear()
Empties the container. |
java.lang.Object |
clone()
Allows a tag to be cloned. |
Container |
delete(int position)
Deletes the HTML object at a specified position in the container. |
Container |
delete(java.lang.Object htmlObject)
Deletes the specified HTML object from the container. |
void |
destroy()
Loops through the container and retrieves each object contained within it and then invokes that objects destroy method. |
HTML |
get(int position)
Gets the HTML object from the specified position in the container. |
HTML |
getContent()
Returns the content in this container. |
java.lang.String |
getContents()
Returns the contents of this container as a String, without
any enclosing container specific tags. |
int |
getPosition(HTML htmlObject)
Returns the position of the specified HTML object in the container. |
Container |
insert(HTML htmlObject,
int position)
Inserts an HTML object at a specified position in the container. |
Container |
replace(Container container)
Deletes all the objects in this container, and replaces them with the cloned objects from another container. |
Traversable |
set(HTML htmlObject,
int position)
Sets an HTML object at a specified position in the container. |
void |
setContent(HTML html)
Clears the contents of this container, and then adds the specified HTML as the only content. |
void |
setContent(java.lang.String content)
Clears the contents of this container, and then adds the specified String as the only content. |
int |
size()
Returns the number of HTML objects contained within this object. |
protected void |
writeContent(Browser browser)
Loops through the container and gets each object contained within it and invokes that objects write method. |
| Methods inherited from class org.pajes.html.TraversableElement |
dump, dump, getAll, getFieldByName, getFirstFieldByName, getFirstTagByAttribute, getFirstTagByClass, getFirstTagByID, getFirstTagByName, getTagByAttribute, getTagByClass, getTagByID, getTagByName, setWritable |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public Container(java.lang.String name)
name - the tag name.public Container()
| Method Detail |
public void setContent(HTML html)
setContent in class Taghtml - the content of this Container.clear(),
add(HTML),
getContent()public void setContent(java.lang.String content)
setContent in interface HTMLsetContent in class Tagcontent - the content of this Container.clear(),
add(java.lang.String),
getContent()public HTML getContent()
getContent in class TagsetContent(HTML),
setContent(String)public java.lang.String getContents()
String, without
any enclosing container specific tags.
String.public int getPosition(HTML htmlObject)
htmlObject - - the Object to locate
public Container add(HTML htmlObject)
htmlObject - - the Object to add (eg. doc.add(new htmlBody);)
TagException - if an attempt is made to add an invalid object to
the container.public Container add(java.lang.String htmlCodeOrString)
htmlCodeOrString -
public Container add(java.lang.String htmlCodeOrString,
boolean suppressNewLine)
htmlCodeOrString - suppressNewLine - suppresses a new line after the text.
public Container add(java.lang.String htmlCodeOrString,
boolean suppressNewLine,
boolean encode)
htmlCodeOrString - suppressNewLine - suppresses a new line after the text.encode - true if any special HTML characters in the text are to be
converted to their equivalent HTML named character entity, or
false if no changes are to be made to the text.
public void addContent(java.lang.String content)
addContent in interface HTMLaddContent in class Tagcontent - the additonal content for this Container.add(java.lang.String),
setContent(java.lang.String)public Container clear()
public java.lang.Object clone()
clone in interface HTMLclone in class Tagpublic Container delete(int position)
position - the position in the container of the object to be
deleted.
public Container delete(java.lang.Object htmlObject)
htmlObject - the object to be deleted.
public void destroy()
Sub-classes MUST call super.destroy(); if
over-riding this method!
destroy in interface HTMLdestroy in class Tagpublic HTML get(int position)
position - the position to get the html object
public Container insert(HTML htmlObject,
int position)
htmlObject - - the Object to add (eg. doc.add(new htmlBody);)position - - the position to place the html object
public Container replace(Container container)
container - the Container from which objects are to be copied.
public Traversable set(HTML htmlObject,
int position)
htmlObject - the Object to add.position - the position at which to place the html object.
public int size()
protected void writeContent(Browser browser)
throws java.io.IOException
writeContent in class Tagbrowser - the browser to which the results are to be output.
java.io.IOException - if an I/O error occurs writing to the browser.Tag.setWriteEndTag(boolean)
|
PAJES 2.3.9 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||