Class 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 containing Form is sent to the web server.

    See Also:
    Form
    • Constructor Detail

      • TextAreaElement

        public TextAreaElement​(long cPtr,
                               boolean cMemoryOwn)
        For internal use only. Of no interest to the user.
        Parameters:
        cPtr - pointer to the CPP wrapped object
        cMemoryOwn - indicates if this object is responsible for memory management of the CPP object
    • 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
      • rowCount

        public int rowCount()
        Gets the number of rows of text that this TextAreaElement 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 the TextAreaElement.

        Returns:
        the number of rows in this TextAreaElement
      • columnCount

        public int columnCount()
        Gets the number of columns that this TextAreaElement 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 the TextAreaElement.

        Returns:
        the number of columns in this TextAreaElement
      • isSuccessfulControl

        public boolean isSuccessfulControl()
        Returns true if this TextAreaElement 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 class HtmlElement
        Returns:
        true if this TextAreaElement represents a successful control
      • clone

        public HtmlElement clone()
        Description copied from class: HtmlElement
        Creates a copy of this HTML element.
        Overrides:
        clone in class HtmlElement
        Returns:
        a new HtmlElement object which is an exact copy of this HTML element