|
PAJES 3.0.21 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.pajes.html.PlainText
public class PlainText
This class emits the text that is used within containers such as Script and StyleSheet, where no substitution of
character entities should be performed.
FormattedText,
Span,
Text,
Serialized Form| Constructor Summary | |
|---|---|
protected |
PlainText()
Default constructor does nothing. |
|
PlainText(java.lang.String text)
Creates a line of unformatted text. |
|
PlainText(java.lang.String text,
boolean suppressNewLine)
Creates a line of unformatted text. |
| Method Summary | |
|---|---|
PlainText |
add(java.lang.String text)
Adds more text to the existing text. |
void |
addContent(java.lang.String content)
Adds more text to the existing text. |
java.lang.Object |
clone()
Allows the text to be cloned. |
void |
destroy()
Sets all the internal variables of this object to null, to assist in garbage collection. |
java.lang.String |
getContainedText()
Returns the text that this object contains. |
Container |
getContainer()
Deprecated. Use getParent() |
java.lang.String |
getDocument()
Gets the the unique name of the document containing the container to which this text was added. |
java.lang.String |
getId()
Always returns null for text objects, as they cannot have
an ID attribute. |
Traversable |
getParent()
Returns the last parent to which this HTML instance has been added. |
protected java.lang.StringBuilder |
getText()
Returns the internal string buffer. |
WritePermission |
getWritePermission()
Returns the object which will be used to determine whether this container to which this text was added 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. |
boolean |
isNewLineSuppressed()
Determines whether a new line at the end of the text is suppressed or not. |
boolean |
isWritable()
Determines whether this object should be displayed or not. |
void |
setContainer(Container container)
Deprecated. Use setParent(Traversable) |
void |
setContent(java.lang.String content)
Replaces the text in this object. |
void |
setParent(Traversable parent)
Sets the container to which this HTML instance has been added. |
PlainText |
setText(java.lang.String text)
Replaces the current text, rather than appending. |
PlainText |
setWritable(boolean visible)
Determines if this object should be displayed. |
HTML |
setWritePermission(WritePermission control,
java.lang.String document,
java.lang.String id)
Sets the object which will be used to determine whether this container will be returned to the requesting browser. |
java.lang.String |
toString()
Returns the text represented by this object as a string. |
void |
write(Browser browser)
Returns the text. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public PlainText(java.lang.String text)
text - the line of text.
public PlainText(java.lang.String text,
boolean suppressNewLine)
text - the line of text.suppressNewLine - suppresses a new line after the text.protected PlainText()
| Method Detail |
|---|
public PlainText add(java.lang.String text)
text - the line of text.
public void addContent(java.lang.String content)
addContent in interface HTMLcontent - the line of content.public java.lang.Object clone()
clone in interface HTMLclone in class java.lang.Objectjava.lang.RuntimeException - if a CloneNotSupportedException is thrown, which should never
happen.public void destroy()
Sub-classes MUST call super.destroy(); if
over-riding this method!
destroy in interface HTMLpublic java.lang.String getContainedText()
getContainedText in interface TextContainer@Deprecated public Container getContainer()
getParent()
getContainer in interface HTMLpublic java.lang.String getDocument()
getDocument in interface HTMLsetWritePermission(org.pajes.security.WritePermission, java.lang.String, java.lang.String)public java.lang.String getId()
null for text objects, as they cannot have
an ID attribute.
getId in interface HTMLnullpublic Traversable getParent()
getParent in interface HTMLpublic WritePermission getWritePermission()
getWritePermission in interface HTMLpublic boolean isChildOf(HTML html)
HTML
isChildOf in interface HTMLhtml - the parent item
HTML.isChildOf(org.pajes.html.HTML)public boolean isChildOf(java.lang.String id)
HTML
isChildOf in interface HTMLid - the parent id.
HTML.isChildOf(java.lang.String)public boolean isNewLineSuppressed()
public boolean isWritable()
@Deprecated public void setContainer(Container container)
setParent(Traversable)
setContainer in interface HTMLcontainer - the container to which this HTML instance has been added.public void setContent(java.lang.String content)
setContent in interface HTMLcontent - the line of text.setText(java.lang.String)public void setParent(Traversable parent)
setParent in interface HTMLparent - the parent HTML object to which this HTML instance has been
added.public PlainText setText(java.lang.String text)
text - the line of text.
public PlainText setWritable(boolean visible)
visible - true if this element should be displayed.
public HTML setWritePermission(WritePermission control,
java.lang.String document,
java.lang.String id)
WARNING! This will modify the WritePermission of the container to which this text was last added.
setWritePermission in interface HTMLcontrol - 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.
public java.lang.String toString()
toString in class java.lang.Object
public void write(Browser browser)
throws java.io.IOException
write in interface HTMLbrowser - the browser to which the results are to be output.
java.io.IOException - if an error occurs writing the content to the browser.protected java.lang.StringBuilder getText()
|
PAJES 3.0.21 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||