Package com.facilita.fc.web
Class TextAreaElement
- java.lang.Object
-
- com.facilita.fc.web.HtmlElement
-
- com.facilita.fc.web.TextAreaElement
-
public class TextAreaElement extends HtmlElement
Represents an HTML textarea element within an HTML form. An HTML element is everything from the start tag to the end tag.A
TextAreaElement
is used to define a multi-line text input control.e.g.
<textarea name="userMessage" rows="4" cols="50"> Some lines of text. </textarea>
A
TextAreaElement
is submitted as a key/value pair when the containingForm
is sent to the web server.- See Also:
Form
-
-
Constructor Summary
Constructors Constructor Description TextAreaElement(long cPtr, boolean cMemoryOwn)
For internal use only.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description HtmlElement
clone()
Creates a copy of this HTML element.int
columnCount()
Gets the number of columns that thisTextAreaElement
has space for.void
delete()
static long
getCPtr(TextAreaElement obj)
For internal use only.boolean
isSuccessfulControl()
Returnstrue
if thisTextAreaElement
currently represents a successful control.static TextAreaElement
makeFrom(HtmlElement htmlElement)
For internal use only.int
rowCount()
Gets the number of rows of text that thisTextAreaElement
has space for.-
Methods inherited from class com.facilita.fc.web.HtmlElement
getAfterEndTagPosition, getAfterStartTagPosition, getAttribute, getAttributes, getCharEncoding, getContent, getContentPosition, getCPtr, getId, getName, getTag, getValue, hasAttribute, isDisabled, removeAttribute, setAttribute, setAttribute, setCharEncoding, setContent, setDisabled, setId, setName, setValue
-
-
-
-
Method Detail
-
getCPtr
public static long getCPtr(TextAreaElement obj)
For internal use only. Of no interest to the user.- Parameters:
obj
- a reference to an object of this class- Returns:
- a long containing the address of the CPP wrapped object
-
makeFrom
public static TextAreaElement makeFrom(HtmlElement htmlElement)
For internal use only. Of no interest to the user.- Parameters:
htmlElement
- Internal use only- Returns:
- a new TextAreaElement
-
delete
public void delete()
- Overrides:
delete
in classHtmlElement
-
rowCount
public int rowCount()
Gets the number of rows of text that thisTextAreaElement
has space for.This is equivalent to
getAttribute("rows")
, and is unlikely to be the same as the number of actual lines of text in theTextAreaElement
.- Returns:
- the number of rows in this
TextAreaElement
-
columnCount
public int columnCount()
Gets the number of columns that thisTextAreaElement
has space for.This is equivalent to
getAttribute("cols")
, and is unlikely to be the same as the number of actual characters of text in theTextAreaElement
.- Returns:
- the number of columns in this
TextAreaElement
-
isSuccessfulControl
public boolean isSuccessfulControl()
Returnstrue
if thisTextAreaElement
currently represents a successful control. A successful control is one that is valid for submission, i.e. one that will be sent to the web server when the form is submitted.A
TextAreaElement
is successful if it contains text.- Overrides:
isSuccessfulControl
in classHtmlElement
- Returns:
true
if thisTextAreaElement
represents a successful control
-
clone
public HtmlElement clone()
Description copied from class:HtmlElement
Creates a copy of this HTML element.- Overrides:
clone
in classHtmlElement
- Returns:
- a new
HtmlElement
object which is an exact copy of this HTML element
-
-