|
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
org.pajes.html.Span
Generate the <span> tags.
FormattedText,
Text,
PlainText,
Serialized Form| Field Summary |
| Fields inherited from class org.pajes.html.Tag |
ON_CLICK_ATTRIBUTE, TAG_CLOSE, TAG_LEFT, TAG_RIGHT |
| Constructor Summary | |
Span()
Creates an empty span. |
|
Span(java.lang.String text)
Creates a string of HTML formatted text. |
|
Span(java.lang.String text,
boolean bold)
Creates a string of HTML formatted text. |
|
Span(java.lang.String text,
boolean bold,
boolean italic)
Creates a string of HTML formatted text. |
|
Span(java.lang.String text,
boolean bold,
boolean italic,
boolean underline)
Creates a string of HTML formatted text. |
|
Span(java.lang.String text,
java.lang.String styleSheetClass)
Creates a string of HTML formatted text. |
|
Span(java.lang.String text,
java.lang.String styleSheetClass,
java.lang.String styleSheetID)
Creates a string of HTML formatted text. |
|
| Method Summary | |
Span |
encodeCharacterEntities(boolean encode)
Detrmines if any ", &, < or > characters found in the text will be converted to the equivalent HTML named character entity (", &, < or >). |
java.lang.String |
getContainedText()
Returns the text that this object contains. |
java.lang.String |
getText()
Retrieves the text that has been assigned to this span. |
protected void |
init()
Called by the constructor and the Container.destroy() method to correctly
clear and initialise internal variables. |
Span |
setBold(boolean bold)
Sets the text to be in bold face. |
Span |
setFontColor(Color color)
Sets the font color. |
Span |
setFontDefaults(Color fontColor,
java.lang.String fontFamily,
java.lang.String fontSize)
Sets the font color, family and size. |
Span |
setFontFamily(java.lang.String family)
Sets the font family. |
Span |
setFontSize(java.lang.String size)
Sets the font size. |
Span |
setItalics(boolean italics)
Sets the text to be italicised. |
Span |
setText(HTML text)
Sets the text to be displayed. |
Span |
setText(java.lang.String text)
Sets the text to be displayed. |
Span |
setUnderlined(boolean underline)
Sets the text to be underlined. |
void |
write(Browser browser)
Prints the <span> tags and the contained text to the browser. |
| Methods inherited from class org.pajes.html.Container |
add, add, add, add, addContent, clear, clone, delete, delete, destroy, get, getContent, getContents, getPosition, insert, replace, set, setContent, setContent, size, writeContent |
| 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 Span()
public Span(java.lang.String text)
text - the text to display.
public Span(java.lang.String text,
java.lang.String styleSheetClass)
text - the text to display.styleSheetClass - applies the specified style sheet class to the
text.
public Span(java.lang.String text,
java.lang.String styleSheetClass,
java.lang.String styleSheetID)
text - the text to display.styleSheetClass - applies the specified style sheet class to the
text.styleSheetID - sets the unique identifier of this object within the
Document Object Model.
public Span(java.lang.String text,
boolean bold)
text - the text to display.bold - if true, the text is displayed in bold.
public Span(java.lang.String text,
boolean bold,
boolean italic)
text - the text to display.bold - if true, the text is displayed in bold.italic - if true, the text is displayed italicised.
public Span(java.lang.String text,
boolean bold,
boolean italic,
boolean underline)
text - the text to display.bold - if true, the text is displayed in bold.italic - if true, the text is displayed italicised.underline - if true, the text is displayed underlined.| Method Detail |
public Span setBold(boolean bold)
bold - if true, the text is displayed in bold.
public java.lang.String getContainedText()
getContainedText in interface TextContainerpublic Span setFontColor(Color color)
color - specifies the font color.
public Span setFontDefaults(Color fontColor,
java.lang.String fontFamily,
java.lang.String fontSize)
fontColor - specifies the font color.fontFamily - specifies the font family.fontSize - specifies to the font size.
public Span setFontFamily(java.lang.String family)
family - specifies the font family.
public Span setFontSize(java.lang.String size)
size - specifies to the font size.
public Span setItalics(boolean italics)
italics - if true, the text is displayed in italics.
public Span setText(HTML text)
text - is the HTML text object to be displayed.
public Span setText(java.lang.String text)
text - the display text.
public java.lang.String getText()
public Span setUnderlined(boolean underline)
underline - if true, the text is displayed underlined.
public Span encodeCharacterEntities(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. The default is
false.
Text.encodeCharacterEntities(java.lang.String)
public void write(Browser browser)
throws java.io.IOException
write in interface HTMLwrite 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),
Tag.writeContent(org.pajes.servlet.Browser)protected void init()
Container.destroy() method to correctly
clear and initialise internal variables.
Sub-classes must call super.init() before doing
anything else to ensure the Tag is initialised correctly.
init in class Tag
|
PAJES 2.3.9 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||