PAJES 3.0.21

org.pajes.html
Interface HTML

All Known Subinterfaces:
OptionItem, Traversable
All Known Implementing Classes:
Anchor, AnchorButton, Applet, Big, Body, Bold, Break, Button, Center, Cite, Code, Container, DefinitionDescription, DefinitionList, DefinitionTerm, Dfn, Div, Em, FieldSet, FileUploadForm, Font, Form, FormattedText, Frame, FrameSet, Head, Head.Base, Head.Link, Head.Meta, Head.Title, Heading, HorizontalLine, IFrame, Image, Input, InputCheckBox, InputChecked, InputDate, InputDateTimeString, InputDecimal, InputField, InputFile, InputFormattedString, InputHidden, InputInteger, InputNumber, InputPassword, InputPasswordConfirm, InputRadio, InputRadioButtonSet, InputString, InputTextArea, InputTime, InputTimestamp, Italic, Kbd, Label, Legend, ListContainer, ListItem, NoBreak, NoFrames, NoScript, Option, OptionGroup, OrderedList, Paje, Paragraph, Parameter, PlainText, PreFormatted, ResetButton, Samp, Script, Select, SelectJavaScriptList, SelectList, SingleElementContainer, Small, Span, Strike, Strong, StyleSheet, Submit, SubmitAnchor, SubmitButton, SubmitImage, Subscript, Superscript, Table, Table.Body, Table.Cell, Table.Column, Table.ColumnGroup, Table.Foot, Table.Head, Table.HeadingCell, Table.Row, Table.RowContainer, TableContainer, Tag, Teletype, Text, TraversableElement, TreePaje, Underline, UnOrderedList, Var

public interface HTML

The HTML interface is implemented by all HTML objects.


Method Summary
 void addContent(java.lang.String content)
          Adds content to this HTML tag.
 java.lang.Object clone()
          Allows the Object to be cloned.
 void destroy()
          Sets all the internal variables of this object to null, to assist in garbage collection.
 Container getContainer()
          Deprecated. Use getParent()
 java.lang.String getDocument()
          Gets the the unique name of the document containing this tag.
 java.lang.String getId()
          Gets the unique ID of the HTML object.
 Traversable getParent()
          Returns the last parent to which this HTML instance has been added.
 WritePermission getWritePermission()
          Returns the object which will be used to determine whether this piece of HTML will be returned to the requesting browser.
 boolean isChildOf(HTML html)
          Determines if the specified item is in the ancestry of this tag.
 boolean isChildOf(java.lang.String id)
          Determines if the specified id is in the ancestry of this tag.
 void setContainer(Container container)
          Deprecated. Use setParent(Traversable)
 void setContent(java.lang.String content)
          Sets the content of this HTML tag, replacing all existing content.
 void setParent(Traversable parent)
          Sets the container to which this HTML instance has been added.
 HTML setWritePermission(WritePermission control, java.lang.String document, java.lang.String id)
          Sets the object which will be used to determine whether this piece of HTML will be returned to the requesting browser.
 void write(Browser browser)
          Defines the method by which results are returned to the browser.
 

Method Detail

addContent

void addContent(java.lang.String content)
Adds content to this HTML tag.

Parameters:
content - the content to be added to this HTML tag.

clone

java.lang.Object clone()
Allows the Object to be cloned.

This is required because servlets are usually only instantiated once, and if each request modifies an HTML object initialised at the servlet creation, the object will retain those changes and return them to the next request.

Returns:
a shallow clone of the HTML object.

destroy

void destroy()
Sets all the internal variables of this object to null, to assist in garbage collection.


getContainer

@Deprecated
Container getContainer()
Deprecated. Use getParent()

Returns the last container to which this HTML instance has been added.

Returns:
the last container to which this HTML instance has been added.

getDocument

java.lang.String getDocument()
Gets the the unique name of the document containing this tag.

Returns:
the name of the document.

getId

java.lang.String getId()
Gets the unique ID of the HTML object.

Returns:
the modified Tag object

getParent

Traversable getParent()
Returns the last parent to which this HTML instance has been added.

Returns:
the last parent to which this HTML instance has been added.

getWritePermission

WritePermission getWritePermission()
Returns the object which will be used to determine whether this piece of HTML will be returned to the requesting browser.

Returns:
the implementation of the WritePermission interface which can be used in the write() method to determine if this object should be returned to the browser.

isChildOf

boolean isChildOf(HTML html)
Determines if the specified item is in the ancestry of this tag.

Parameters:
html - the parent item
Returns:
true if the specified item is in the ancestry of this tag.

isChildOf

boolean isChildOf(java.lang.String id)
Determines if the specified id is in the ancestry of this tag.

Parameters:
id - the parent id.
Returns:
true if the specified id is in the ancestry of this tag.

setContainer

@Deprecated
void setContainer(Container container)
Deprecated. Use setParent(Traversable)

Sets the container to which this HTML instance has been added.

Parameters:
container - the container to which this HTML instance has been added.

setContent

void setContent(java.lang.String content)
Sets the content of this HTML tag, replacing all existing content.

Parameters:
content - the content of this HTML tag.

setParent

void setParent(Traversable parent)
Sets the container to which this HTML instance has been added.

Parameters:
parent - the parent HTML object to which this HTML instance has been added.

setWritePermission

HTML setWritePermission(WritePermission control,
                        java.lang.String document,
                        java.lang.String id)
Sets the object which will be used to determine whether this piece of HTML will be returned to the requesting browser.

Parameters:
control - the instance of the WritePermission interface which can be used in the write() method to determine if this object should be returned to the browser.
document - the unique name of the page containing this tag.
id - the unique ID of the tag.
Returns:
the modified Tag object

write

void write(Browser browser)
           throws java.io.IOException
Defines the method by which results are returned to the browser.

Parameters:
browser - the browser to which the results are to be output.
Throws:
java.io.IOException - if an error occurs writing the content to the browser.

PAJES 3.0.21

Copyright 1998-2007 Viridian Pty Limited. All Rights Reserved.