|
Expresso 5-6 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.jcorporate.expresso.services.html.HtmlElement
Base class for all of the HTML elements on a page
| Field Summary | |
protected Hashtable |
attributes
|
protected Vector |
contents
|
protected String |
cSSClass
|
protected String |
cSSID
|
| Constructor Summary | |
HtmlElement()
Constructor |
|
HtmlElement(HtmlElement newElement)
Constructor Create the element with the given element as it's contents |
|
HtmlElement(String elementName)
Constructor Create an element with a name |
|
| Method Summary | |
void |
add(HtmlElement newElement)
Add a new element to this element's contents |
protected void |
display(OutputStream out)
Alternate display method using an output stream |
protected abstract void |
display(PrintWriter out,
int depth)
Display the element to the client Each HtmlElement must implement this method |
protected void |
finalize()
See if the object has been displayed |
Object |
getAttribute(String attribName)
Get an attribute from this element |
int |
getContentCount()
Return the count of contents in this item |
String |
getCSSClass()
|
String |
getName()
Return the name of this element |
protected void |
padWithTabs(PrintWriter out,
int count)
Pad the output with particular nesting tabs supplies in essence source formatting. |
void |
setAttribute(String attribName,
Object attribValue)
Set an attribute for this element |
void |
setCSSClass(String className)
|
void |
setCSSID(String id)
|
protected void |
setDisplayed()
Mark this object as having been displayed |
void |
setName(String newName)
Set the name of this element |
protected void |
setParent(HtmlElement newParent)
Set the parent of this element to the named element |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected Vector contents
protected String cSSClass
protected String cSSID
protected Hashtable attributes
| Constructor Detail |
public HtmlElement()
throws HtmlException
HtmlException - If the superclass constructor fails
public HtmlElement(HtmlElement newElement)
throws HtmlException
newElement - Element to use as contents of this new element
HtmlException - If the element cannot be used or the paramter is invalid
public HtmlElement(String elementName)
throws HtmlException
elementName - The name of the new element
HtmlException - If the element cannot be created| Method Detail |
public void add(HtmlElement newElement)
throws HtmlException
newElement - Element to be added
HtmlException - If the element cannot be added
protected void display(OutputStream out)
throws HtmlException
out - Outputstream to use to display to the client
HtmlException - If the element (or it's contents) cannot be displayed
protected abstract void display(PrintWriter out,
int depth)
throws HtmlException
out - PrintWriter to display to the clientdepth - the number of tabs to indent
HtmlException - If the element (or it's contents) cannot be displayed
protected void finalize()
throws HtmlException
HtmlException - if the object has never been displayed
public Object getAttribute(String attribName)
throws HtmlException
attribName - Name of the attribute to be set
HtmlException - If the attribute cannot be retrievedpublic int getContentCount()
public String getCSSClass()
public String getName()
throws HtmlException
HtmlException - If the name cannot be accessed or the object has itself
as a parent
protected void padWithTabs(PrintWriter out,
int count)
out - the output streamcount - the number of tabs to display
public void setAttribute(String attribName,
Object attribValue)
throws HtmlException
attribName - Name of the attribute to be setattribValue - Value of the attribute to be set
HtmlException - If the attribute cannot be setpublic void setCSSClass(String className)
className - the CSS class namepublic void setCSSID(String id)
id - the CSS id
protected void setDisplayed()
throws HtmlException
HtmlException - If the object has already been displayed
public void setName(String newName)
throws HtmlException
newName - The new name
HtmlException - If the name cannot be set
protected void setParent(HtmlElement newParent)
throws HtmlException
newParent - The new parent element of this element
HtmlException - If the given element cannot be used as a parent or the
parameter is invalid
|
Expresso 5-6 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||