|
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.PlainText
org.pajes.html.Text
This class emits the text that is to be displayed in the browser. Text converts the text into a WritePermission object, but does NOT apply any formatting. It does, however, replace special HTML characters with HTML Named Character Entities.
Use FormattedText or Span to format a block of text.
FormattedText,
Span,
PlainText,
Serialized Form| Constructor Summary | |
protected |
Text()
Default constructor. |
protected |
Text(boolean encode)
Creates an emtpty text string. |
|
Text(java.lang.String text)
Creates a line of unformatted text. |
|
Text(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. |
static java.lang.String |
decodeCharacterEntities(java.lang.String toDecode)
Converts any HTML named character entities (", &, < and >) found in the specified String are to be converted to the actual character. |
static java.lang.String |
encodeCharacterEntities(java.lang.String toEncode)
Converts any ", &, < or > characters found in the specified String to the equivalent HTML named character entity (", &, < or >). |
static java.lang.String |
encodeDBCSText(java.lang.String toEncode,
java.lang.String enc)
Converts a String of DBCS text to a correctly encoded
Unicode String of valid HTML, where characters with a
values greater than 127 are encoded using &#...; notation. |
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 current tag. |
WritePermission |
getWritePermission()
Returns the object which will be used to determine whether this piece of HTML will be returned to the requesting browser. |
HTML |
setId(java.lang.String id)
Sets the ID of the current tag. |
PlainText |
setText(java.lang.String text)
Replaces the current text, rather than appending. |
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. |
| Methods inherited from class org.pajes.html.PlainText |
addContent, clone, destroy, getContainedText, getContainer, getText, isNewLineSuppressed, isWritable, setContainer, setContent, setWritable, toString, write |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public Text(java.lang.String text)
text - the line of text.
public Text(java.lang.String text,
boolean suppressNewLine)
text - the line of text.suppressNewLine - suppresses a new line after the text.protected Text()
protected Text(boolean encode)
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.| Method Detail |
public PlainText add(java.lang.String text)
add in class PlainTexttext - the line of text.
public static java.lang.String decodeCharacterEntities(java.lang.String toDecode)
toDecode - the string that may contain named entities to be
converted to characters.
public static java.lang.String encodeCharacterEntities(java.lang.String toEncode)
toEncode - the string that may contain characters to be converted
to named entities.
public static java.lang.String encodeDBCSText(java.lang.String toEncode,
java.lang.String enc)
throws java.io.UnsupportedEncodingException
String of DBCS text to a correctly encoded
Unicode String of valid HTML, where characters with a
values greater than 127 are encoded using &#...; notation.
toEncode - the string of DBCS text.enc - The name of a supported character encoding.
java.io.UnsupportedEncodingException - if the named encoding is not
supported.public java.lang.String getDocument()
getDocument in interface HTMLgetDocument in class PlainTextsetWritePermission(org.pajes.security.WritePermission, java.lang.String, java.lang.String)public HTML setId(java.lang.String id)
id - the unique ID of the tag
setWritePermission(org.pajes.security.WritePermission, java.lang.String, java.lang.String)public java.lang.String getId()
getId in interface HTMLgetId in class PlainTextpublic PlainText setText(java.lang.String text)
setText in class PlainTexttext - the line of text.
public HTML setWritePermission(WritePermission control,
java.lang.String document,
java.lang.String id)
setWritePermission in interface HTMLsetWritePermission in class PlainTextcontrol - 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 WritePermission getWritePermission()
getWritePermission in interface HTMLgetWritePermission in class PlainText
|
PAJES 2.3.9 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||