|
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.Label
This class builds the HTML LABEL tags (<label></label>) for annotating input tags.
| Field Summary |
| Fields inherited from class org.pajes.html.Tag |
ON_CLICK_ATTRIBUTE, TAG_CLOSE, TAG_LEFT, TAG_RIGHT |
| Constructor Summary | |
Label(HTML text,
Input input)
Create a HTML Label tag. |
|
Label(HTML text,
java.lang.String id)
Create a HTML Label tag. |
|
Label(java.lang.String text,
Input input)
Create a HTML Label tag. |
|
Label(java.lang.String text,
java.lang.String id)
Create a HTML Label tag. |
|
| Method Summary | |
Container |
add(HTML htmlObject)
Adds an HTML object to the current container |
java.lang.String |
getAccessKey(Browser browser)
Returns the shortcut key for giving focus to this LABEL. |
java.lang.String |
getContainedText()
Returns the text that this object contains. |
java.lang.String |
getFor()
Returns the ID of the INPUT this label refers to. |
java.lang.String |
getFor(Browser browser)
Returns the ID of the INPUT this label refers to. |
Input |
getInput()
Returns or locates the input element associated with this tag. |
java.lang.String |
getOnBlurHandler(Browser browser)
Returns the JavaScript handler for return this event. |
java.lang.String |
getOnFocusHandler(Browser browser)
Returns the JavaScript handler for return this event. |
protected void |
init()
Called by the constructor and the Container.destroy() method to correctly
clear and initialise internal variables. |
Label |
setAccessKey(char key)
Specifies a single Unicode character as a shortcut key for giving focus to this LABEL, which passes the focus on to the associated form control. |
Label |
setAccessKey(java.lang.String key)
Specifies a single character String, or a character entity reference (a valid entity that begins with an & and ends with a ;) as a shortcut key for giving focus to this LABEL, which passes the focus on to the associated form control. |
Label |
setFor(Input input)
Sets the ID of the HTML INPUT element this label describes. |
Label |
setFor(java.lang.String id)
Sets the ID of the HTML INPUT element this label describes. |
Label |
setOnBlurHandler(java.lang.String onBlurHandler)
Sets the JavaScript handler for this event. |
Label |
setOnFocusHandler(java.lang.String onFocusHandler)
Sets the JavaScript handler for this event. |
Label |
setText(HTML text)
Sets the text of the label. |
Label |
setText(java.lang.String text)
Sets the text of the label. |
| Methods inherited from class org.pajes.html.Container |
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 Label(java.lang.String text,
Input input)
text - the text to appear in the label.input - the INPUT element this label describes.
public Label(HTML text,
Input input)
text - the text to appear in the label.input - the INPUT element this label describes.
public Label(java.lang.String text,
java.lang.String id)
text - the text to appear in the label.id - the ID of the HTML INPUT element this label describes.
public Label(HTML text,
java.lang.String id)
text - the text to appear in the label.id - the ID of the HTML INPUT element this label describes.| Method Detail |
public Label setAccessKey(char key)
key - the shortcut key.
public Label setAccessKey(java.lang.String key)
key - the shortcut key.
TagException - if the key specified is a null value, or a String
that is longer than a single character, or a malformed
character entity reference.public java.lang.String getAccessKey(Browser browser)
browser - the browser to which the output is being sent.
public java.lang.String getContainedText()
TextContainer
getContainedText in interface TextContainerTextContainer.getContainedText()public Label setFor(java.lang.String id)
id - the ID of the HTML INPUT element this label describes.
TagException - if the specified ID is null or an empty string.public Label setFor(Input input)
input - the INPUT element this label describes.
public java.lang.String getFor(Browser browser)
browser - the browser object.
public java.lang.String getFor()
public Input getInput()
TagException - if the FOR attribute has not been specified.public Label setOnBlurHandler(java.lang.String onBlurHandler)
onBlurHandler - The new onBlurHandler value
public java.lang.String getOnBlurHandler(Browser browser)
browser - the browser to which the output is being sent.
public Label setOnFocusHandler(java.lang.String onFocusHandler)
onFocusHandler - The new onFocusHandler value
public java.lang.String getOnFocusHandler(Browser browser)
browser - the browser to which the output is being sent.
public Label setText(java.lang.String text)
text - is the text to be displayed.
public Label setText(HTML text)
text - is the HTML text object to be displayed.
public Container add(HTML htmlObject)
Container
add in class ContainerhtmlObject - - the Object to add (eg. doc.add(new htmlBody);)
Container.add(org.pajes.html.HTML)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 | |||||||||